How to install ClamAV and SpamAssassin on a RHEL or CentOS

  • This tutorial is created for servers with less than 3Gb of ram availalbe. On "big" servers installation is fully automatic.

    ClamAV installation
yum install clamd
wget -O /etc/clamd.conf
wget -O /etc/freshclam.conf
gpasswd -a clam exim
gpasswd -a clam mail
chkconfig clamd on
service clamd start

SpamAssassin installation

yum install spamassassin
chkconfig spamassassin on
service spamassassin start

Exim configuration

sed -i "s/^#SPAMASSASSIN/SPAMASSASSIN/g" /etc/exim/exim.conf
sed -i "s/^#CLAMD/CLAMD/g" /etc/exim/exim.conf
sed -i "s/^#SPAM_SCORE/SPAM_SCORE/g" /etc/exim/exim.conf
service exim restart

Vesta configuration

sed -i "s/ANTIVIRUS.*/ANTIVIRUS_SYSTEM='clamav'/" /usr/local/vesta/conf/vesta.conf
sed -i "s/ANTISPAM.*/ANTISPAM_SYSTEM='spamassassin'/" /usr/local/vesta/conf/vesta.conf