ClamAV Milter

CentOS 7 – still discovering it. ClamAV & ClamAV Milter related things have changed a bit.

First of all, install what you need

yum install clamav-milter-systemd clamav-scanner-systemd

Then, there’s no configuration file.

cp /usr/share/doc/clamav-server-0.98.4/clamd.conf /etc/clamd.d/clamd.conf

Now edit the file, like so:

# Example
LogSyslog yes
DatabaseDirectory /var/lib/clamav
TCPSocket 3310
User clamscan
AllowSupplementaryGroups yes

Start it with

systemctl restart clamd@clamd.service

Now ClamAV Milter, edit config file /etc/mail/clamav-milter.conf

# Example
MilterSocket inet:8894
User clamilt
AllowSupplementaryGroups yes
ClamdSocket tcp:
LogSyslog yes
OnClean Accept
OnInfected Reject
OnFail Defer

Add the 8894 port to SELinux cnfiguration

semanage port -a -t milter_port_t -p tcp 8894

Then restart ClamAV Milter

systemctl restart clamav-milter

And configure your MTA to use it. In Postfix, edit /etc/postfix/ and to your smtpd_milters line add inet: and restart Postfix.

Don’t forget to install freshclam, to be able to update your antivirus:

yum install clamav-update

Then edit /etc/sysconfig/freshclam and comment the line


In /etc/freshclam.conf comment the line Example

# Example

Now just run once: