Clam AntiVirus is a totally free -in all senses of the word- antivirus scanner. It is released under the GPL and has seen a lot of activity in the recent past.
ClamAV is available as a ready-made package.
# yum -t install clamd
If you prefer to install from source, have a look at my older article on ClamAV.
All other parameters should be commented out, in particular
Now we need to tell Amavisd-New to enable virus scanning. Edit
# @bypass_virus_checks_maps = (1); <- This line must be commented out
Look for the following section in
Automated update of Virus definitions
#Example <- This line should be commented out
Now create a new
05 * * * * /usr/local/bin/freshclam --quiet
Note: Make sure that the name of the socket file
Testing the AntiVirus
Let's restart our setup to check that everything works fine.
# service postfix stop
# service amavisd stop
# service clamd stop
# service clamd start
# service amavisd start
# service postfix start
Go to the eicar antivirus test site and download the eicar.com.txt test file.
Send an email with the eicar.com.txt as an attachment to a test email that you send through the server.
Jan 23 15:13:01 mailserver amavis: (28181-03) Blocked INFECTED (Eicar-Test-Signature), MYNETS LOCAL [192.168.0.101] [192.168.0.101] <email@example.com> -> <firstname.lastname@example.org>, quarantine: virus-9p6fXda5rBjH, Message-ID: <49796DE5.email@example.com>, mail_id: 9p6fXda5rBjH, Hits: -, size: 1069, 253 ms