College Logo

Installing ClamAV

ClamAV is an Open Source virus scanner - details of ClamAV at the web site and there's a port for it with FreeBSD

cd /usr/ports/security/clamav
make install

Tick the milter box when the install starts (a milter is a mail filter; wikipedia has an entry here

When it's installed, add the following lines to /etc/rc.conf so that the program will auto-start when FreeBSD starts:

clamav_clamd_enable=YES
clamav_freshclam_enable=YES
clamav_milter_enable=YES

Download and install ClamAV from www.clamav.net as usual. The default locations are under /usr/local/{bin,man,share}. Do the following: perl -MCPAN -e shell install Parse::RecDescent install Inline install Mail::ClamAV In MailScanner.conf, set 'Virus Scanners = clamavmodule'. In MailScanner.conf, check the setting of 'Monitors for ClamAV Updates' to ensure it matches the location of your ClamAV virus database files.

The following is taken from an item on the MailScanner web site entitled "Installing and using the ClamAV Perl module for faster ClamAV scanning"

Do the following:

perl -MCPAN -e shell
install Parse::RecDescent
install Inline
install Mail::ClamAV

During the process you'll see the following set of prompts; if the file is not found then you need to install its port.

Where is your bzip2 program? [/usr/bin/bzip2]
Where is your gzip program? [/usr/bin/gzip]
Where is your tar program? [/usr/bin/tar]
Where is your unzip program? [/usr/local/bin/unzip]
Where is your make program? [/usr/bin/make]
Where is your curl program? [/usr/local/bin/curl]
Where is your lynx program? [/usr/local/bin/lynx]
Where is your wget program? [/usr/local/bin/wget]
Warning: ncftpget not found in PATH
Where is your ncftpget program? [] /usr/bin/ncftp1
Where is your ftp program? [/usr/bin/ftp]
Where is your gpg program? [/usr/local/bin/gpg]
What is your favorite pager program? [more]
What is your favorite shell? [/bin/csh]

In MailScanner.conf, set 'Virus Scanners = clamavmodule'. In MailScanner.conf, check the setting of 'Monitors for ClamAV Updates' to ensure it matches the location of your ClamAV virus database files.