[Mimedefang] action_bounce after stream_by_domain create real bounces

Marcus lists at localguru.de
Sat Feb 20 22:24:59 EST 2010


Hi,

I'm using the stream_by_domain to be able to use action_bounce at
different spam hits if an incoming email contains more than one local
domain as recipient. Those emails will be split and resent by localhost
(= stream_by_domain). This is working fine as long as an resent email
isn't detected as spam. In the case of spam the resent mail will be
refused by my action_bounce function and localhost is sending a real
bounce to the sender.

My workaround to avoid real bounces is to check if the email is resent
by using the global variable $WasResent and just to discard if it's
spam. The action_bounce function is used if the email is not resent.

sub filter_end {
[...]
if ($WasResent && $hits >= 8) {
  return action_discard();
} elsif ($Domain eq 'localguru.de' && $hits >= 8) {
  action_bounce("Recipient refuses mail due to high spam probability");
}
[...]

Is there better way to do that?

Ciao,
Marcus






More information about the MIMEDefang mailing list