AVG 8.5 with Amavisd-new

Amavisd-new is a quite powerful tool capable to co-operate with a large amount of AV scanners. Today I have decided to test it with free AVG 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://download.avgfree.com/filedir/inst/avg85flx-r287-a2632.i386.rpm
rpm -Uhv avg85flx-r287-a2632.i386.rpm --test
rpm -Uhv avg85flx-r287-a2632.i386.rpm
chown amavis: /opt/avg -R
vi /opt/avg/avg8/etc/init.d/avgdinit.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

We can start AVG with:

/etc/init.d/avgd start

Finally we have to change Amavisd-new configuration by commenting out  AVG section and changing the port:

 ### http://www.grisoft.com/
 ['AVG Anti-Virus',
   \&ask_daemon, ["SCAN {}\n", ''],
   qr/^200/, qr/^403/, qr/^403 .*?: ([^\r\n]+)/ ],