This page will guide you in configuring MailScanner, ClamAV and SpamAssassin to work in Postfix. Before proceeding, make sure Postfix is installed and working.
Configuring MailScanner
%org-name% = your organization name %org-long-name% = your full organization name %web-site% = your mail support website or company website Run As User = postfix Run As Group = postfix Incoming Queue Dir = /var/spool/postfix/hold Outgoing Queue Dir = /var/spool/postfix/incoming Incoming Work Group = clamav Incoming Work Permissions = 0640 MTA = postfix Virus Scanners = clamd Use SpamAssassin = yes SpamAssassin User State Dir = /var/spool/MailScanner/spamassassin
Integrating MailScanner into Postfix

1. Edit the file /etc/postfix/main.cf and add the line below
header_checks = regexp:/etc/postfix/header_checks

2. Create the file /etc/postfix/header_checks and add the line below
/^Received:/ HOLDThis will now place all incoming mail into the holding area until released by MailScanner.


3. Use the commands below to start MailScanner.
sudo service postfix restart sudo service clamav-daemon start sudo service mailscanner start

4. Test if Postfix is still working. See Test Postfix using Telnet.
If you encounter any problems, check the log file at /var/log/mail.log.Congratulations
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.
The English language message templates used in MailScanner is stored in /etc/MailScanner/reports/en and can even be configured to add a disclaimer message to outgoing mails.Visit the forum to ask for help or to give a comment.
***
Posted on 9/18/2011 and last updated on 9/18/2011
Filed under Anti-spam/Anti-virus , MailScanner , Postfix , Ubuntu 10.04




