Search

Thursday, July 07, 2011

Fight spam with MailScanner

One of our clients is using MailScanner (http://www.mailscanner.info/ ) 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 spamcop.net
 
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.
 
spam.lists.conf
--------------------
spamhaus.org                    sbl.spamhaus.org.
spamhaus-XBL                    xbl.spamhaus.org.
spamhaus-PBL                    pbl.spamhaus.org.
spamhaus-ZEN                    zen.spamhaus.org.
SBL+XBL                         sbl-xbl.spamhaus.org.
spamcop.net                     bl.spamcop.net.
NJABL                           dnsbl.njabl.org.
 
Next, we need to define how to handle spam emails in /etc/MailScanner/MailScanner.conf:
 
Spam Actions = store forward admin@mydomain.com
 
The above instructs ms to store a copy of the incoming spam in quarantine and also forward to admin@mydomain.com.  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