[Mimedefang] clamav vs clamd vs clamscan

Cliff Hayes chayes at afo.net
Wed Oct 8 16:05:22 EDT 2014


Ok.
Is it advisable to use clamd first and clamav as a fallback (per code 
example below)?  If so, do I still need to set the Features in 
mimedefang.pl like this ...

$Features{'Virus:CLAMAV'}   = ('/usr/bin/clamscan' ne '/bin/false' ? 
'/usr/bin/clamscan' : 0);
$Features{'Virus:CLAMD'}    = ('/bin/false' ne '/bin/false' ? 
'/bin/false' : 0);

... since I'm calling the appropriate module instead of the generic 
message_contains_virus() module?

code example:

my ($code, $category, $action) = message_contains_virus_clamd();
if ($category eq 'virus') {
   $FoundVirus = 1;
} elsif ($category ne 'ok') {
   md_syslog('err',"$QueueID: clamd error: code=$code, 
category=$category, action=$action");
# try clamscan if clamd failed
   my ($code, $category, $action) = message_contains_virus_clamav();
   if ($category eq 'virus') {
     $FoundVirus = 1;
   } elsif ($category ne 'ok') {
     md_syslog('err',"$QueueID: clamav error: code=$code, 
category=$category, action=$action"
     );
     action_tempfail("error: problem running virus scanners");
     return;
   }
}

On 10/8/2014 2:18 PM, Kevin A. McGrail wrote:
> On 10/8/2014 3:05 PM, Cliff Hayes wrote:
>> I will have to go with clamd because clamav is taking 12 seconds to
>> scan an email with five words in it.
> Correct.  Using anything but clamd is not going to work for anything but
> the smallest of installations.
> _______________________________________________
> NOTE: If there is a disclaimer or other legal boilerplate in the above
> message, it is NULL AND VOID.  You may ignore it.
>
> Visit http://www.mimedefang.org and http://www.roaringpenguin.com
> MIMEDefang mailing list MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
>



More information about the MIMEDefang mailing list