I use Amavis and was looking to disable ClamAV, but not SpamAssassin.
First, I tried stopping the ClamAV service, but the following messages appeared in
/var/log/mail.log:
Code:
amavis[3188]: (03188-16) (!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: 2, retrying (2)
amavis[3188]: (03188-16) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 117) line 373.\n
amavis[3188]: (03188-16) (!!)WARN: all primary virus scanners failed, considering backups
Needless to say, I didn't want these messages in my log, even though Amavis appeared to function OK despite them.
So, I tried this approach next:
Quote:
Originally Posted by till
Uninstall clamav and restart amavisd.
|
But
/var/log/mail.log began filling-up with these similar but slightly longer messages:
Code:
amavis[14163]: (14163-01) (!)ClamAV-clamd: Can't connect to UNIX socket /var/run/clamav/clamd.ctl: 2, retrying (2)
amavis[14163]: (14163-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /var/run/clamav/clamd.ctl (Can't connect to UNIX socket /var/run/clamav/clamd.ctl: No such file or directory) at (eval 117) line 373.\n
amavis[14163]: (14163-01) (!!)WARN: all primary virus scanners failed, considering backups
amavis[14163]: (14163-01) (!!)TROUBLE in check_mail: virus_scan FAILED: AV: ALL VIRUS SCANNERS FAILED
amavis[14163]: (14163-01) (!)PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20120103T111031-14163
Next, I tried what seemed to be a "proper fix", per
http://opensource.apple.com/source/a.../amavisd.conf:
Quote:
# COMMONLY ADJUSTED SETTINGS:
# @bypass_virus_checks_maps = (1); # uncomment to DISABLE anti-virus code
|
So, I un-commented the following lines in
/etc/amavis/conf.d/15-content_filter_mode:
Code:
#@bypass_virus_checks_maps = (
# \%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
and restarted Amavis:
Code:
service amavis restart
Well, this still didn't do the job. The same messages continued to appear in the mail log.
So, as a last resort, I commented-out the following lines (the lines with ##) in
/etc/amavis/conf.d/15-av_scanners:
Code:
### http://www.clamav.net/
## ['ClamAV-clamd',
## \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
## qr/\bOK$/m, qr/\bFOUND$/m,
## qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
# NOTE: run clamd under the same user as amavisd, or run it under its own
# uid such as clamav, add user clamav to the amavis group, and then add
# AllowSupplementaryGroups to clamd.conf;
# NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
# this entry; when running chrooted one may prefer socket "$MYHOME/clamd".
and, again, restarted Amavis.
I was shocked to find the following in the log, still:
Code:
amavis[17441]: (17441-01) (!!)WARN: all primary virus scanners failed, considering backups
amavis[17441]: (17441-01) (!!)TROUBLE in check_mail: virus_scan FAILED: AV: NO VIRUS SCANNERS AVAILABLE
amavis[17441]: (17441-01) (!)PRESERVING EVIDENCE in /var/lib/amavis/tmp/amavis-20120103T113827-17441
postfix/smtp[17600]: B499634E422E: to=<user@example.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.21, delays=0.12/0.01/0.01/0.08, dsn=4.5.0, status=deferred (host 127.0.0.1[127.0.0.1] said: 451 4.5.0 Error in processing, id=17441-01, virus_scan FAILED: AV: NO VIRUS SCANNERS AVAILABLE (in reply to end of DATA command))
I'm running out of ideas. Does anyone know how to disable virus-checking within Amavis altogether?