[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Patch for looping spambucket

From: Andrew Daviel
Subject: Patch for looping spambucket
Date: Fri, 13 Jul 2007 11:59:46 -0700 (PDT)

If "-b" is set to define a spambucket, and "-i" is not set, and "-r" is set, rejected spam may loop in sendmail until the loop counter overflows (21 ?).

Although setting "-i" seems to solve the looping problem, some
mail setups may wish to filter outgoing mail (webmail interface on the same server) or preprocess so that all mail comes via localhost.

The following patch forces mail sent to the spambucket as the only recipient to be accepted:

@@ -904,7 +994,13 @@
        debug(D_RCPT, "Total of %d actual 
+       debug(D_RCPT, "size %d rcpt -%s- spambucket 
-%s-",assassin->expandedrcpt.size(),envrcpt[0],spambucket) ;
+       if (assassin->expandedrcpt.size() == 1 && strcmp(envrcpt[0],spambucket) 
== 0) {
+          debug(D_RCPT, "Accept mail for spambucket") ;
+          return SMFIS_ACCEPT;  // avoid sendmail loop
+       }

        if (assassin->numrcpt() == 0)

I had to set '-b <address@hidden>' rather than just
'-b spambucket' for this to work.

Andrew Daviel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]