[Mimedefang] File::Scan
Rich West
Rich.West at divatv.com
Wed Apr 10 12:52:36 EDT 2002
Hrmm.. just curious, but if one wanted to try using this particular perl
module to scan for viruses, I'm guessing it would be best to write a
particular routine to do that within the mimedefang-filter file, and
then call that from the filter() procedure?
Maybe something like the following? I am not sure how $entity is being
used, and I honestly do not know if ./INPUTMSG is accurate within
filter()...
-Rich
sub my_antivirus_scan
{
use File::Scan;
my $fs;
my ($entity) = @_;
$fs = File::Scan->new();
$fs->scan(@_);
return(1) if ($fs->suspicious);
return(0);
}
[...]
sub filter
{
[...]
if (my_antivirus_filter("./INPUTMSG"))
{
action_drop_with_warning(
"The attachment to this message contained a computer virus and has been\n" .
"removed from the message completely. Please notify the sender and
take\n" .
"any appropriate action.\n"
);
}
return action_accept();
}
More information about the MIMEDefang
mailing list