slow virus scanning with clam, amavisd-new and postfix



Hey

I've been running this setup for several years, and haven't had any problems
so far... But after upgrading to v. clamav-0.90.3-1.el4.rf scanning emails
for virus is taking 50-60 seconds per email... :-(

By searching the net, I found out that it's because I've been using clamav
as a backup email scanner in amavisd-new, and I should use the deamon, as
primary virus scanner, but enabling these lines i amavisd.conf only gives an
error in my log, and the mail is still beeing scanned by my backup
emailscanner... (clamc)

I've enabled these lines i amavisd.conf
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.pid"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],

And get this error in the logfile:
(!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.pid:
Connection refused, retrying (2)
(!)run_av (ClamAV-clamd, built-in i/f): Too many retries to talk to
/var/run/clamav/clamd.pid (Can't connect to UNIX socket
/var/run/clamav/clamd.pid: Connection refused) at (eval 57) line 310.

The pid file is there, and are owned by the clamav user, and the amavis user
is a member of the clamav group, and file permissions on clamav folder with
the pid file is 755, I've also tried 775 but with no change.

Clamd is running:
service clamd status
clamd (pid 10793) is running...

Anyone has an idea how to fix this ? :-)

software versions:
CentOS 4.5
postfix-2.2.10-1.1.el4
amavisd-new-2.5.1-1.el4.rf
clamav-db-0.90.3-1.el4.rf
clamd-0.90.3-1.el4.rf
clamav-0.90.3-1.el4.rf


Thanks in advance.

Best regards
jacob



.



Relevant Pages

  • slow virus scanning with clam, amavisd-new and postfix
    ... for virus is taking 50-60 seconds per email... ... The pid file is there, and are owned by the clamav user, and the amavis user ... Clamd is running: ...
    (linux.redhat)
  • Re: Worm.SCO.A
    ... Clamav does not seems to offer that. ... SCO.A does tell me that it could be how they call the Mydoom virus, ... > Ethical Hacking at InfoSec Institute. ... > We provide Ethical Hacking, Advanced Ethical Hacking, Intrusion ...
    (Security-Basics)
  • Re: clamav
    ... > the virus updates from the net, how to setup the clamav if there is ... > any virus then repair or delete the file, ... ClamAV comes with the freshclam service to do automatic virus signature ... > it.Do i have to download updates regularly for Mailscanner just like ...
    (Fedora)
  • Re: postfix + clamav = problems
    ... I looked at your error messages again, and this one jumped out at me: ... Amavisd works by passing the file name to clamd. ... clamd.conf has 'AllowSupplementaryGroups yes', and to be save, I gave clamav to vscan and vscan to clamav. ...
    (comp.unix.bsd.freebsd.misc)
  • Re: Exim4 + Clamav
    ... > In this way clamav intercept the virus, ... > without notifying it to the receiver. ...
    (Debian-User)