[Mimedefang] multiple antivirus engines

Cormack, Ken kcormack at acs.roadway.com
Tue Jun 3 15:52:01 EDT 2003


It would be nice to see it do something like this pseudo code:
(where: all_installed_scanners = "the list of installed scanners")

master_scan_status="ok"
for $scanner in $all_installed_scanners
do
	scan with $scanner
	status=$status_of_this_scan
	if $status != "not_ok"
	then
		master_scan_status="not_ok"
	endif
done

if $master_scan_status="not_ok"
then
	process the infected message as desired
else
	process the clean message as desired
endif

Ken

-----Original Message-----
From: Aaron Paetznick [mailto:aaronp at critd.com]
Sent: Tuesday, June 03, 2003 2:25 PM
To: mimedefang at lists.roaringpenguin.com
Subject: Re: [Mimedefang] multiple antivirus engines



The following works great for me:

sub message_contains_virus () {
   my($code, $cat, $act);
   ($code, $cat, $act) = message_contains_virus_filescan();
   return (wantarray ? ($code, $cat, $act) : $code) if ($act ne "ok");
   ($code, $cat, $act) = message_contains_virus_clamd();
   return (wantarray ? ($code, $cat, $act) : $code) if ($act ne "ok");
   return (wantarray ? (0, 'ok', 'ok') : 0);
}

sub entity_contains_virus ($) {
   my($e) = @_;
   my($code, $cat, $act);
   ($code, $cat, $act) = entity_contains_virus_filescan($e);
   return (wantarray ? ($code, $cat, $act) : $code) if ($act ne "ok");
   ($code, $cat, $act) = entity_contains_virus_clamd($e);
   return (wantarray ? ($code, $cat, $act) : $code) if ($act ne "ok");
   return (wantarray ? (0, 'ok', 'ok') : 0);
}


--Aaron



David F. Skoll wrote:
> On Tue, 3 Jun 2003, Jim Shewmaker wrote:
> 
> 
>>  Any tips on using multiple AV engines with mimedefang?
> 
> 
> It's easy; just write the Perl code to try them one after the other
> until one of them returns a virus indication.
> 
> Regards,
> 
> David.
> _______________________________________________
> MIMEDefang mailing list
> MIMEDefang at lists.roaringpenguin.com
> http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


_______________________________________________
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang



More information about the MIMEDefang mailing list