Spamfilter
All incoming mail to the student web mails (s......@student.dtu.dk) are filtered by two mail scanners: qmail-scanner and SpamAssasin.
Please check out Databar Support's mail system page.
The short story:
- qmail-scanner is non-bypassable and filters out mails containing the follwing files:
- .exe
- .com
- .dll
- ... many more. See the list at Dbs' mail system page.
- SpamAssasin inserts a header (X-Spam-Status: Yes/No) reflecting whether it thinks the mail is a spam mail. It does not automatically filter the mail. You have to set up this, either by
- maildrop, as described by Dbs' mail system page, or
- qmail and condredirect - see below.
Using qmail and condredirect
If you prefer to use qmail (if you for instance already have complex mail delivery setup and do not want to port it to maildrop), this is how to do it:
- Make a mail folder for your spam:
maildirmake ~/Maildir/.spam ln -s ../Maildir/.spam ~/mail/spam
- Edit your .qmail-file and insert the following line at the top (replacing USER with your sXXXXXX-number):
|condredirect USER-spam perl -e 'while (<>) {if($_ =~ m,^X-Spam-Status: Yes,)
{exit(0)}; if($_ =~ m,^$,) {exit(99)}} exit(99)'
Please note that these two lines are actually just one. This applies to the other condredict lines as well.
If you need help on qmail-files, please see our short intro Internet#Can_I_have_my_e-mail_forwarded_to_another_address_automatically or Databar Support's description of .qmail.
- Example: From
&my.home@mail.address.dk ./Maildir/
to:
|condredirect s000000-spam perl -e 'while (<>) {if($_ =~ m,^X-Spam-Status:
Yes,) {exit(0)}; if($_ =~ m,^$,) {exit(99)}} exit(99)'
&my.home@mail.address.dk
./Maildir/
If you do not have a .qmail file, create a new and type the following:
|condredirect s000000-spam perl -e 'while (<>) {if($_ =~ m,^X-Spam-Status:
Yes,) {exit(0)}; if($_ =~ m,^$,) {exit(99)}} exit(99)'
./Maildir/
- Create a new .qmail-spam file with the following content:
./Maildir/.spam/
- Make sure file permissions are correct:
chmod 600 .qmail*
In order to see what's been caught in the spam filter, open up Pine and check out the mail folder spam. Alternatively you can use Thunderbird or the webmail at CampusNet. If you use the webmail, you have to activate the spam-folder in the webmail interface.

