[Mimedefang] Re: Bounce AND send a copy?

Matthew.van.Eerde at hbinc.com Matthew.van.Eerde at hbinc.com
Fri Oct 1 12:20:57 EDT 2004


Tim Boyer wrote:
>     if ($Features{"SpamAssassin"}) {
> <snip>
>             if ($hits >= $req) {
>                 md_graphdefang_log('spam', $hits, $RelayAddr);
>                 action_add_part($entity, "text/plain", "-suggest",
>                                 "$report\n",
>                                 "SpamAssassinReport.txt", "inline");
>                 # Add a header with original recipients, just for info
>                 action_add_header("X-Orig-Rcpts", join(", ",
>                 @Recipients)); foreach $recip (@Recipients) {
>                     delete_recipient($recip);
>                     }
> 
> resend_message_one_recipient('spamassassin at dg.denmantire.com');
>                 action_bounce("SpamAssassin has identified this email
>                 as possible spam"); return ();
>                 }
> 
> It's bouncing:
> 
> Sep 30 21:14:43 melbourne2 sm-mta[17694]: i911EUd5017694: Milter:
> data, reject=554 5.7.1 SpamAssassin has identified this email as
> possible spam.  Please see  http://www.denmantire.com/blocklist.html
> if you think this is incorrect.
> 
> ... but never remailing.

I imagine the remail is also bouncing, as it is also being detected as spam.
I worry that each remail is spawning another remail... so every spam is spawning its own infinite loop. (uh-oh!)
Try this...

Instead of
	if ($hits >= $req) {

do this (untested:)
	if ($hits >= $req and $RelayAddr ne "127.0.0.1") {

This will allow the remailed items to skip over the action_bounce.



More information about the MIMEDefang mailing list