This article will guide you in configuring MailScanner, ClamAV and SpamAssassin to work in Postfix. Before proceeding, please make sure that all of the above components are already installed.
Here are the installation guides for the above components.
- How to install Postfix SMTP Server
- How to install Clam Anti-virus (ClamAV)
- How to install MailScanner
SpamAssassin is included in CentOS 4 and ready to go out of the box. Just add it using the Package Management tool if you haven’t done so during CentOS installation. SpamAssassin is located in the Mail Server package.
%org-name% = your organization name %org-long-name% = your full organization name Run As User = postfix Run As Group = postfix Incoming Queue Dir = /var/spool/postfix/hold Outgoing Queue Dir = /var/spool/postfix/incoming MTA = postfix Virus Scanners = clamd Clamd Socket = /tmp/clamd.socket Use SpamAssassin = yes SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
Integrating MailScanner into Postfix
header_checks = regexp:/etc/postfix/header_checks
/^Received:/ HOLDThis will now place all incoming mail into the holding area until released by MailScanner.
Congratulations, your mails are now checked for spam and viruses. Each mail you send or receive will now contain the lines below to indicate that MailScanner is doing its job.
This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.
Visit the forum to ask for help or to give a comment.