Install ClamAV
clamav-data - clamav data files clamav-getfiles - Update script for clamav clamav-base - anti-virus utility for Unix - base package clamav-daemon - anti-virus utility for Unix - scanner daemon clamav-dbg - debug symbols for ClamAV clamav-docs - anti-virus utility for Unix - documentation clamav-freshclam - anti-virus utility for Unix - virus database update utility clamav-milter - anti-virus utility for Unix - sendmail integration clamav-testfiles - anti-virus utility for Unix - test files clamav - anti-virus utility for Unix - command-line interface
Find where amavisd-new is expecting to find the clamAV socket by looking in amavisd.conf
# cat /etc/amavisd.conf | grep CONTSCAN
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],Now modify clamd.conf and set the socket so that it matches what's in amavisd.conf
LocalSocket /var/run/clamav/clamd
While you are editing clamd.conf, also set
AllowSupplementaryGroups true
And now add clamav to the amavis group.
# usermod -G amavis clamav
By adding clamav to the amavis group, we have allowed amavis and clamAV to be friends and talk to each other. You'll get errors about amavis not being able to find clamAV if you don't.
Should amavis still not be able to find clamAV and use it to scan, you can change permission on the socket.
# ls -l /var/run/clamav/ total 4.0K srw-rw---- 1 clamav amavis 0 2010-04-23 11:19 clamd -rw-rw---- 1 clamav amavis 4 2010-04-17 07:14 freshclam.pid

