date: 08/21/2008
This HowTo describes the setup of a Gentoo based spam and virus filtering mailgateway. This server is meant to run in front of the servers keeping the mail accounts i.e. Zarafa, Lotus Notes or Microsoft Exchange.
The MTA is postfix which will listen on port 25 for inbound mail. Recieved mails are forwarded to amavisd-new on port 10024. Amavisd-new filters the mail for virii and spam before passing it back to Postfix on port 10025 for final delivery.
In this Setup ClamAV is used for virusscans, if a virus is found the mail is discarded or optional quarantined, if no virus is found the mail first runs through dspam and afterwards through Spamassassin for antispam. dspam gets better detection rates than SpamAssassin's Bayes filter, it writes it's headers which will then be scored by SpamAssassin together with some other tests.