Install ClamAV on DirectAdmin

[Total: 4    Average: 5/5]

How to Install ClamAV on DirectAdmin ?

ClamAV AntiVirus is a very popular open source (GPL) anti-virus for UNIX, designed for e-mail scanning. ClamAV AntiVirus provides a flexible and scalable multi-threaded daemon, a command line scanner and it can detect Trojan horses, viruses, malware and other malicious threats. One of its main uses is on mail servers as a server-side email virus scanner. The application was developed for Unix and has third party versions available for AIX, BSD, HP-UX, Linux, OS X, OpenVMS, OSF (Tru64) and Solaris. ClamAV and its updates are made available free of charge.

Installation

Login as root and enter the following commands. This will include ClamAV in the CustomBuild configuration and compile ClamAV:

cd /usr/local/directadmin/custombuild
./build update
./build set clamav yes
./build clamav

In case you get the following error when trying to start ClamAV:

[root@server ~]# /etc/init.d/clamd start
Starting clamd: LibClamAV Error: cli_loaddb(): No supported database files found in /usr/share/clamav
ERROR: Can't open file or directory
                                                          [FAILED]

or another related error:

LibClamAV Error: cl_load(): Can't get status of /usr/share/clamav

This error simply means the virus database can not be found. You can rebuild the database by using:

cd /usr/share
mkdir -p clamav
chown clamav:clamav clamav
freshclam -v 

Configuration

Edit exim.conf and add the following before “primary_hostname =”:

av_scanner = clamd:127.0.0.1 3310