Thursday, July 07, 2011

Fight spam with MailScanner

One of our clients is using MailScanner ( ) as anti-spam filter on a fedora system.  The ms provides many options to fine tune how to handle spam emails.
In the first place, we have to enable the spam check feature in /etc/mail/MailScanner.conf and tells ms which spam filter to use.
# Spam Detection and Spam Lists (DNS blocklists)
# ----------------------------------------------
Spam Checks = yes
Spam List = spamhaus-ZEN
The information we provided to the directive 'Spam List' is a reference to the spam filter definitions in spam.lists.conf.
The default installation of spam.lists.conf already includes some common spam filter definitions and we can add further as necessary.
Next, we need to define how to handle spam emails in /etc/MailScanner/MailScanner.conf:
Spam Actions = store forward
The above instructs ms to store a copy of the incoming spam in quarantine and also forward to  Alternatively, we can simple discard them as below:
Spam Actions = delete
To make the changes effective, we have to restart ms.  Mailscanner will also restart itself regularly (see the 'Restart Every =' in mailscanner.conf).

No comments:

Post a Comment