[Mimedefang] Where in the filter is the virus scanner called?
David F. Skoll
dfs at roaringpenguin.com
Fri Apr 19 07:23:11 EDT 2002
On Fri, 19 Apr 2002, Anthony Giggins wrote:
> Is virus scanner called from filter_begin or filter
Again, it's up to you. You should probably call one of the
message_contains_virus_* functions in filter_begin. If you reject
the message, don't bother calling any virus-related functions in filter.
If you just want to remove the infected part, then call
entity_contains_virus_* inside filter (but don't do it unless
message_contains_virus_* found something.)
Example 1: We bounce messages containing viruses.
sub filter_begin {
if (message_contains_virus_xxx()) {
return action_bounce("Virus found");
}
}
Example 2: We quarantine virus-bearing attachments.
sub filter_begin {
$FoundVirus = message_contains_virus_xxx();
}
sub filter {
if ($FoundVirus && entity_contains_virus_xxx($entity)) {
return action_quarantine($entity, "Virus found");
}
}
Regards,
David.
More information about the MIMEDefang
mailing list