Zoner Antivirus with Amavisd-new

Today I have decided to test Amavisd-new with free Zoner Antivirus for Linux. First of all you have to download the package, (test it), install, and change the ownership. Then edit the configuration.

wget http://update.zonerantivirus.com/download/zav-1.2.2-redhat-i586.rpm --nodeps
rpm -Uhv zav-1.2.2-redhat-i586.rpm --test
rpm -Uhv zav-1.2.2-redhat-i586.rpm
chown amavis: /opt/zav -R
chown amavis: /var/run/zav -R
vi /etc/zav/zavd.conf

So, we have changed the ownership. Now we have to change the daemon user to amavis too.

# user under which to run the daemon
ZAVD_USER               = "amavis"
ZAVD_GROUP              = "amavis"
# Your license key for accessing ZAV update
UPDATE_KEY              = "11111-22222-SAMPLE-33333-44444"

We can start and update ZAV with:

/etc/init.d/zavd start
/etc/init.d/zavd update

Finally we have to change Amavisd-new configuration by adding the following:

 ### http://www.grisoft.com/
 ['Zoner Anti-Virus',
#  '/opt/zav/bin/zavcli', '-z /var/run/zav/zavd.sock {}',
  '/opt/zav/bin/zavcli', ' {}',
  [0,1,2,3,4], [5,6,7,11],
  qr/^.\*:\\ (SUSPICIOUS|PROBINFECTED|INFECTED)\ \((.*)\)$/
]