2.7.0: bypass clamd scanning when daemon did not respond

Mark Martinec Mark.Martinec+amavis at ijs.si
Mon Oct 24 19:21:25 CEST 2011


> sometimes the clamd daemon is overloaded and did not respond.
> In this case, amavisd did not want to handle mails and return error to
> postfix.
> Is there any option to force amavis skipping antivirus processing when
> the antivirus engine is down or did not respond in time ?
> I have set ['always-clean', sub {0}], in @av_scanners_backup but
> messages are always rejected when clamd socket is not available: 
> Oct 11 20:03:07 ns1 l/sbin/amavisd (ch2-11525-02)[11525]: (11525-02)
> (!)connect to /var/run/clamav/clamav.sock failed, attempt #1: Can't
> connect to UNIX socket /var/run/clamav/clamav.sock: No such file or
> directory

Adding the

  ['always-clean', sub {0}],

to @av_scanners or to @av_scanners_backup list should suffice to accomplish
what you ask for.  If it doesn't, it would be worth investigating the full
log.  Note that the message "(!)connect to ... failed" would still be logged


More information about the amavis-users mailing list