Clam Antivirus Installation for Qmail

Home » Computer Articles » Linux » Clam Antivirus Installation for Qmail
May 23, 2008 Linux No Comments

ClamAV

Apply the following to all Email servers.

Needed application before installation.

Make sure you have bzip2-devel and gmp-devel installed
swup --install bzip2-devel or yum install bzip2-devel
swup --install gmp-devel or yum install gmp-devel

Download and install CURL
http://curl.haxx.se/download.html

./configure
make
make install

Download ClamAV from this web site Clamav

Untar downloaded file

tar -xvzf clamav-0.92.1.tar.gz

Creat a user and group for Clamav

groupadd clamav
useradd clamav -g clamav -C "Clam Antivirus" -s /bin/false

Configure

./configure --disable-zlib-vcheck
make
make install

Updating Definitions files

touch /var/log/clam-update.log
chmod 600 /var/log/clam-update.log
chown clamav /var/log/clam-update.log

Setup a cronjob to update definitions

crontab -e
# Updating for Antivirus
0 4,8,12,16,20,23 * * * /usr/local/bin/freshclam --quiet --log-verbose --daemon-notify

QClam

Download QClam from this web site QClam

Unzip

bunzip2 qclam-0.8.tar.bz2
tar -xvf qclam-0.8.tar.bz2

If your system is not compatible with shipped QClam binary.
make clean
make install

Make sure that clamd is loaded at run time.

Copy or cut and paste this file to your server Clamd init file

Make sure the permissions of the file are 700
chmod 700 /etc/init.d/clamd

Add to /var/qmail/control/defaultdelivery

|/usr/local/bin/qclam --clam /usr/local/bin/clamdscan
|dot-forward .forward
./Mailbox

Share This:

Leave a Reply

Your email address will not be published. Required fields are marked *