[Mimedefang] primary and secondary virus scanner

Marcus lists at localguru.de
Fri Jan 22 19:13:48 EST 2010


what's the "mimedefang-way" to set up a primary and secondary virus
scanner? I'd like to run clamd as primary scanner and AntiVir as
fallback scanner. Mails should run through the fallback if the primary
scanner fails or is down.

In mimedefang.pl.conf I set

 # primary
 $Features{'Virus:CLAMD'}   = 1;
 $ClamdSock = '/var/run/clamav/clamd.ctl';
 # secondary 
 $Features{'Virus:HBEDV'} = '/usr/bin/avscan';

to integrate both scanners.

For testing I shut down clamd and expected that AntiVir is now doing the
job. But I got a tempail

mimedefang.pl[5122]: Problem running virus scanner: code=999,
category=cannot-execute, action=tempfail

As a workaround I changed the "tempfails" to "ok"
in /usr/bin/mimedefang.pl in the sub message_contains_virus_clamd from 

 if (!defined($sock)) {
  return (wantarray ? (999, 'cannot-execute', 'tempfail') : 999);


 return (wantarray ? (555, 'cannot-execute', 'ok') : 555);

Now the mail is going though even if clamd is down and is scanned by the
next virusscanner (AntiVir)?

I'm not sure, but to me this doesn't sound like the correct way to set
up a primary and fallback virus scanner.


More information about the MIMEDefang mailing list