These instructions will configure ClamAV to use the clamd daemon:
/scripts/ensurerpm gmp gmp-devel bzip2-devel
useradd clamavSome OS's require you to add the group as well:
groupadd clamavDon't worry if the user and/or group already exist.
mkdir /usr/local/share/clamav chown clamav:clamav /usr/local/share/clamav
tar -xzf clamav-* cd clamav* ./configure --disable-zlib-vcheck make make install
mv -fv /usr/local/etc/freshclam.conf.sample /usr/local/etc/freshclam.conf nano -w /usr/local/etc/freshclam.confComment out the line (put a # as the first character on the line) near the top that says simply:
mv -fv /usr/local/etc/clamd.conf.sample /usr/local/etc/clamd.conf nano -w /usr/local/etc/clamd.confComment out the line (put a # as the first character on the line) near the top that says simply:
ExampleChange the following line:
#LocalSocket /tmp/clamd.socketto this:
curl https://download.configserver.com/clamd -o /etc/init.d/clamd chown root:root /etc/init.d/clamd chmod +x /etc/init.d/clamd chkconfig clamd onservice clamd restart
rm -fv /etc/init.d/clamd curl https://download.configserver.com/clamd.service -o /usr/lib/systemd/system/clamd.service systemctl daemon-reload systemctl enable clamd.service systemctl restart clamd.service
nano -w /etc/chkserv.d/clamavAdd the following line:
service[clamav]=x,x,x,service clamd restart,clamd,root
touch /var/log/clam-update.log chown clamav:clamav /var/log/clam-update.log
nano -w /etc/chkserv.d/chkservd.confAdd the following line:
nano -w /usr/mailscanner/etc/MailScanner.confSet the following options:
Virus Scanners = clamd Clamd Socket = /tmp/clamd
service MailScanner restart
That's it. If you don't feel confident doing any of this yourself, or if you get into a horrible mess, we offer a cheap package to do it all for you, and more, over here.
*Remember that adding virus scanning of emails to MailScanner will add load to your server.