Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a Postfix mail server, using Amavis and Spamassassin to check for unwanted e-mails. I have removed ClamAV because it'd basically freeze the whole server every time someone received an e-mail, and server-side virus-scanning does not seem to important for my use case.

Spamassassin is still triggered by Amavis, and I'd like to keep it that way.
Basically what I want is for Amavis to stop trying to trigger a virusscan for each e-mail.

May 29 07:49:14 robinj amavis[19859]: (19859-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
May 29 07:49:15 robinj amavis[19859]: (19859-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
May 29 07:49:15 robinj amavis[19859]: (19859-01) (!)ClamAV-clamd: All attempts (1) failed connecting to /tmp/clamd.socket, retrying (2)
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!)connect to /tmp/clamd.socket failed, attempt #1: Can't connect to UNIX socket /tmp/clamd.socket: No such file or directory
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!)ClamAV-clamd av-scanner FAILED: run_av error: Too many retries to talk to /tmp/clamd.socket (All attempts (1) failed connecting to /tmp/clamd.socket) at (eval 139) line 603.\n
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!)WARN: all primary virus scanners failed, considering backups
May 29 07:49:21 robinj amavis[19859]: (19859-01) (!!)AV: ALL VIRUS SCANNERS FAILED

I've tried commenting out several options in /etc/amavis/conf.d/15-av_scanners, but it's starting to look like if I comment something out it'll just use the default config for that which is the same as what was there in the first place.

# ['ClamAV-clamd',
#   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
#   qr/\bOK$/m, qr/\bFOUND$/m,
#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],

This is, as you can see, commented out. As a result it simply looks for backup scanners, none of which are present. This, however, still spams the logs with the above messages and delays mail delivery.
Commenting out backup scanners has absolutely no effect on this (in fact when this is commented out it'll still trigger what used to be there if it exists).

How can I configure Amavis to still use Spamassassin, but stop trying to scan every e-mail for virusses?

share|improve this question

1 Answer 1

up vote 3 down vote accepted

Since you want to disable virus checking entirely, the easiest way to do so is find the @bypass_virus_checks_maps line in the Amavis configuration files (amavis.conf or conf.d/50-user) and change it to this;

bypass_virus_checks_maps => [1];
share|improve this answer
    
@RobinJ glad you changed it to fit your distro, you might want to alter the tags in your question so it's accurate (mine is based on my knowledge of CentOS :) ) –  NickW May 30 at 8:26
    
Huh? Is Amavis distro-dependent? –  RobinJ May 30 at 9:34
    
No, but the way it is configured in your distro is :) It's not a criticism, it just helps people who are searching how to do something on a particular distribution! Thanks, BTW :) –  NickW May 30 at 9:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.