On Mon, 20 Sep 2004, Paul Boven wrote:

> replace_entire_message() may only be called from filter_end(), but the
> virus-scanning gets done in filter_begin(). What would be the proper way
> to transfer the outcome of the virus-scan between those two functions,
> or should I just move the virus-scanning to filter_end() too?

You could either set a global variable in filter_begin:

sub filter_begin {
        $FoundVirus = 0;
        if (message_contains_virus()) {
                $FoundVirus = 1;
                # ...
        }
}

sub filter_end {
        if ($FoundVirus) {
                # ...
        }
}

or you could run the virus check in filter_end.

Regards,

David.
_______________________________________________
Visit http://www.mimedefang.org and http://www.canit.ca
MIMEDefang mailing list
[EMAIL PROTECTED]
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to