[Mimedefang] Virus check specific domains
David F. Skoll
dfs at roaringpenguin.com
Thu Mar 25 14:39:04 EST 2004
On Thu, 25 Mar 2004, Robert Covell wrote:
> sub filter_begin () {
> if (stream_by_domain()) {
> return;
> }
> if ((lc $Domain) eq "domain1.com") {
> my($code, $category, $action) = message_contains_virus();
> $FoundVirus = ($category eq "virus");
... etc ...
> } else {
> $action = "";
> }
> if ($FoundVirus) {
Danger, danger, danger!
You're never initializing $FoundVirus to false.
Change the top of your filter to read:
sub filter_begin () {
if (stream_by_domain()) {
return;
}
$FoundVirus = 0;
if ((lc $Domain) eq "domain1.com") {
my($code, $category, $action) = message_contains_virus();
$FoundVirus = ($category eq "virus");
... etc ...
How much do you charge for virus-scanning? I'll take 10% for this
fix, thanks! :-)
--
David.
More information about the MIMEDefang
mailing list