[Mimedefang] quarantine_entire_message: I don't get it

David F. Skoll dfs at roaringpenguin.com
Mon Sep 20 14:08:47 EDT 2004


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.



More information about the MIMEDefang mailing list