Reject virus messages using Postifx

The Postfix mail server is in place to received and send emails. To improve security incoming and outgoing messages should be scanned for malware. If the scanner detects a virus, Postfix should be reject the message in order to prevent users from receiving malware.
1 answer

Use clamav and connect it to Postfix using clamav-milter

The ClamAV scanner is available for many operating systems and detects several malware. In order to configure Postfix to reject a message during the SMTP delivery a pre-queue filter is needed. clamav-milter can be configured as a pre-queue filter, forwards messages to clamav and sends its feedback back to postifx.

Detailed steps:
install clamav and clamav-milter
configure clamav-milter to "reject" infected messages
tell postfix to use the clamav-milter socket as a smtpd_milters

Taggings: