[Mimedefang] Where in the filter is the virus scanner called?
Anthony Giggins
AGiggins at synergyit.com.au
Mon Apr 22 02:51:25 EDT 2002
So if you call an action ie. Action_bounce or action_drop etc. in
filter_begin is filter still processed?
-----Original Message-----
From: David F. Skoll [mailto:dfs at roaringpenguin.com]
Sent: Monday, 22 April 2002 7:53 AM
To: mimedefang at lists.roaringpenguin.com
Subject: RE: [Mimedefang] Where in the filter is the virus scanner called?
On Mon, 22 Apr 2002, Anthony Giggins wrote:
> OK, but you didn't answer my other question can you also block by Sender
> and/or attachment extension and maybe even via Subject in filter begin.
> Before the message is actually scanned.
Yes. Just set a flag like this:
sub filter_begin {
$Handled = 0;
if ($Sender eq "<badsender at badboys.org>") {
$Handled = 1;
return action_bounce("Sorry.");
}
if (!$Handled) {
# Do virus-checking
}
}
sub filter {
if (re_match_ext("..whatever..")) {
return action_quarantine();
}
if (!$Handled) {
# Do virus-checking
}
}
> I'm attempting to cut down on as much over head as possible so
> performing all these blocks before the message is scanned will cut down
> on as much as possible and will only call the virus scanner as a last
> ditched effort to protect users.
Yes. It's Perl, so you can code it. It's guaranteed that for a given
e-mail, global variables set in filter_begin persist into filter.
Regards,
David.
_______________________________________________
MIMEDefang mailing list
MIMEDefang at lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang
More information about the MIMEDefang
mailing list