linux poison RSS
linux poison Email

Postfix + ClamAV + MailScanner in OpenSuse

1) Install the anti virus software (Clamav) –> (here)
rpm -ivh clamav-db-0.88.2-1.i386.rpm
rpm -ivh clamav-devel-0.88.2-1.i386.rpm
rpm -ivh clamav-server-0.88.2-1.i386.rpmrpm -ivh clamav-0.88.2-1.i386.rpm
/etc/init.d/clamd start
2. Once the anti-virus is install then we need to install the MailScanner software the RPM along with the source files can be found at
Now get ready to install the mailscanner, this is going to take a long time.
gzip -d MailScanner-4.46.2-2.rpm.tar.gz
tar -xvf MailScanner-4.46.2-2.rpm.tar
cd MailScanner-4.46.2-2
3. In your MailScanner.conf file in /etc/MailScanner, there are 5 settings you need to change. The settings are:
Run As User = postfixRun As Group = postfixIncoming Queue Dir = /var/spool/postfix/holdOutgoing Queue Dir = /var/spool/postfix/incomingMTA = postfix
4. You will need to ensure that the user “postfix” can write to
/var/spool/MailScanner/incoming and /var/spool/MailScanner/quarantine
chown postfix:postfix /var/spool/MailScanner/incoming
chown postfix:postfix /var/spool/MailScanner/quarantine
5. Edit file MailScanner.conf
Virus Scanners = clamav

6. Edit virus.scanners.conf
clamav /usr/lib/MailScanner/clamav-wrapper /var/lib/clamav

7. Now we need to edit the postfix file, go all the way to the bottom of the file and add the following
header_checks = regexp:/etc/postfix/header_checks

8. In the file /etc/postfix/header_checks add this line:
/^Received:/ HOLD

9. Set the servers to run on startup and then start them
chkconfig MailScanner on
chkconfig postfix on
chkconfig clamd on
/etc/init.d/Mailscanner start
/etc/init.d/postfix start
/etc/init.d/clamd start


Post a Comment

Related Posts with Thumbnails