![]() This page is part of the EmailServer article. ClamAV AntivirusClam 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. To install ClamAV, I recommend installing from source or getting the binary from the Crash-Hat yum repository. Download the latest source from http://www.clamav.net/stable.php then: # groupadd clamav # useradd -g clamav -s /bin/false -c "Clam AntiVirus" -M clamav # gpasswd -a clamav amavis # cd /usr/local/src/ # tar xzvf clamav-#.##.#.tar.gz # cd /usr/local/src/clamav-#.##.# # ./configure --sysconfdir=/etc # make # make install # cp /usr/local/src/clamav-#.##.#/contrib/init/RedHat/clamd /etc/init.d/ # chmod 0755 /etc/init.d/clamd # chkconfig --add clamd # chkconfig --levels 235 clamd on Note: you may need to upgrade the Edit LogFile /var/log/clamav/clamd.log LogFileMaxSize 10M LogTime LogSyslog PidFile /var/run/clamav/clamd.pid TemporaryDirectory /tmp DatabaseDirectory /var/clamav LocalSocket /var/run/clamav/clamd.sock FixStaleSocket MaxConnectionQueueLength 30 MaxThreads 20 ReadTimeout 300 User clamav AllowSupplementaryGroups DetectBrokenExecutables ScanMail ArchiveMaxCompressionRatio 300 All other parameters should be commented, in particular Now we need to tell Amavisd-New to enable virus scanning. Edit # @bypass_virus_checks_maps = (1); <- This line should be commented out Look for the following section in Automated update of Virus definitionsEdit the #Example <- This line should be commented out Now create a new 05 * * * * /usr/local/bin/freshclam --quiet Now Note: Make sure that the name of the socket file Testing the AntiVirusStart our AntiVirus service and restart our setup to check if everything works fine. # service postfix stop # service amavisd stop # service clamd stop # service clamd start # service amavisd start # service postfix start Note: Postfix should always start after amavisd! Send an email with the following in the message body (in an HTML email) or as an attachment (in a text file if you are sending the email as plain text only): This is a recognised fake virus signature that should trigger the ClamAV. That message should normally only be received by the account we set up in Resources< SpamAssassinImproved | EmailServer | SquirrelMail > Comments fgrtv pbaeyoMonday 02 April 2007, at 10:09 GMT+8 [X] rozdxb kufvgh vjoyfi ynfoukjx gprjdn wxkfytg rqwk |