6. Mailscanner :: Sendmail :: 07 ClamAV Install
Installing ClamAV.
This section has been adaptoted from
http://aaronwalrath.wordpress.com/2010/04/15/set-up-an-email-gateway-with-centos-linux-5-4/
We need to download and install the latest version of ClamAV
We will use the RPMForge repository which contains an updated version of ClamAV.
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
or
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.i686.rpm
or
wget http://pkgs.repoforge.org/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
Your version will depend on your hardware and what the latest release is.
Go here to have a look.
http://pkgs.repoforge.org/rpmforge-release/
rpmforge-release-0.5.2-2.el5.rf.x86_64.rpm
Becuase we already access dag from our on mrepo, go in to /etc/yum.repos.d/rpmforge.repo and edit all the
enabled = 1
to
enabled = 0
Now we will explicitly call the repo to get ClamAV.
yum install --enablerepo=rpmforge clamav clamav-db clamd
Ensure you have a clean install
Update ClamAV to the latest definitions.
freshclam
If you get an error of:
WARNING: Clamd was NOT notified: Can't connect to clamd through /var/run/clamav/clamd.sock
Start Clamd and set it to start on a reboot, ntsysv
/etc/init.d/clamd start
Edit /etc/MailScanner/MailScanner.conf to properly identify the ClamAV update paths:
Monitors for ClamAV Updates = /var/clamav/*.cld /var/clamav/*.cvd
#Also change
Virus Scanners = clamav
But also check that this is where your system has placed ClamAV updates.
ll /var/clamav/*.cld /var/clamav/*.cvd
One of the last things is to check settings:
MailScanner --lint
If you get the following errors:
ERROR: The "envelope_sender_header" in your spam.assassin.prefs.conf
ERROR: is not correct, it should match X-XXXXXXXXXX-MailScanner-From
Edit:
emacs /etc/MailScanner/spam.assassin.prefs.conf
envelope_sender_header X-XXXXXXXXXX-MailScanner-From
For freshclam to work in MailScanner:
ln -s /usr/bin/freshclam /usr/local/bin/freshclam
to stop this happening
ClamAV-autoupdate[5590]: ClamAV updater /usr/local/bin/freshclam cannot be run