[Mimedefang] Repeated $VirusScannerMessages?
    David F. Skoll 
    dfs at roaringpenguin.com
       
    Mon Feb 18 09:09:41 EST 2002
    
    
  
On Sun, 17 Feb 2002, Ashley M. Kirchner wrote:
> To me it looks as if MD is passing both attachments to the scanner
> each time.
Yes.  Here's the rationale:
An initial "message_contains_virus_XXXX()" pass scans all the parts quickly.
This is more efficient that scanning each part separately.  Only if
it indicates that there is a virus is it worth scanning each part.
If you want the messages to be particular to each part, use something
like this:
sub filter_begin {
	$VirusFound = message_contains_virus_XXXX();
}
sub filter {
    my($entity, $fname, $ext, $type) = @_;
    if ($VirusFound) {
        $VirusScannerMessages = "";
        if ($entity_contains_virus_XXXX($entity)) {
            action_quarantine($entity, "Known virus: $VirusScannerMessages\n");
	    return;
        }
    }
}
--
David.
    
    
More information about the MIMEDefang
mailing list