[Mimedefang] Any point in using File::Scan as well as clamav?
Peter Campion-Bye
peter at pandasys.co.uk
Tue Aug 5 06:14:01 EDT 2003
Sorry, I see what you meen, a cut and paste error on my part, thanks for
pointing it out.
So here's the code I have now for the two functions, does it look correct?
# Scan for a virus using all installed scanners, stop on the first positive
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);
}
>> Thanks for that. I've got it working, but I had to change
>> message_contains_virus... ()
>> to
>> entity_contains_virus... ($e)
>> in the second sub.
More information about the MIMEDefang
mailing list