Postfix LogoYou've probably been using Postfix and ClamAV for a long time. Prior to Postfix 2.3, you had to have an AMaViS daemon running to act as the glue between Postfix and ClamAV.

As of version 2.3, Postfix now supports Sendmail 8 Milter protocol. Now you can cut AMaViS (and all that port 10025 junk in master.cf) out of the loop and have Postfix contact clamd directly.

Simply install clamav-milter (via apt, yum, or the source --enable-milter option). When clamav-milter is started a Unix socket is created based on the LocalSocket configuration directive (the CentOS default is /var/run/clamav-milter/clamav.sock). Specify this socket as a smtpd_milter by editing main.cf, or issuing

$ sudo postconf -e smtpd_milters=unix:/var/run/clamav-milter/clamav.sock

You can now remove the port 10025 configuration from master.cf. In my case, this removed 14 lines of configuration. Once this is done, restart Postfix. If the mail server was heavily loaded, you should see a significant decrease in load.