[Mimedefang] Any point in using File::Scan as well as clamav?
Lucas Albers
admin at cs.montana.edu
Wed Aug 20 19:03:01 EDT 2003
Scan with 4 virus scanners, if none of them find a virus then deliver the
mail.
# Scan for a virus using the first supported virus scanner we find.
Note:need to configure path of virus scanner in /usr/bin/mimedefang.pl
in mimedefang-filter
sub message_contains_virus () {
my($code, $cat, $act);
if ($Features{'Virus:FileScan'}) {
($code, $cat, $act) = message_contains_virus_filescan();
#action_change_header("X-Virus-Scanned by FileScan");
return (wantarray ? ($code, $cat, $act) : $code) if $act ne "ok";
}
if ($Features{'Virus:FPROT'}) {
($code, $cat, $act) = message_contains_virus_fprot();
#md_syslog('warning', "Running Virus Scanner FPROT");
return (wantarray ? ($code, $cat, $act) : $code) if $act ne "ok";
}
if ($Features{'Virus:CLAMAV'}) {
($code, $cat, $act) = message_contains_virus_clamav();
#md_syslog('warning', "Running Virus Scanner CLAMAV");
return (wantarray ? ($code, $cat, $act) : $code) if $act ne "ok";
}
if ($Features{"Virus:NAI"}) {
($code, $cat, $act) = message_contains_virus_nai();
#md_syslog('warning', "Running Virus Scanner Mcafee");
return (wantarray ? ($code, $cat, $act) : $code) if $act ne "ok";
}
return (wantarray ? (0, 'ok', 'ok') : 0);
}
More information about the MIMEDefang
mailing list