[Raw Msg Headers][Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: SBL blocklist query trouble



On Sun, Nov 02, 2003 at 08:47:03AM -0600, Roy Bixler wrote:
> On Fri, Oct 31, 2003 at 08:09:33PM -0600, Roy Bixler wrote:
> > I'm wondering if anyone else has had a problem with trying to query
> > the SBL (sbl.spamhaus.org) blocklist via the SMTP server.  I first saw
> > this trouble with a Debian Linux box running the 2.99.55 prepackaged
> > SSL version of ZMailer.  Inbound SMTP connexions just hang and the
> > smtpserver process consumes 99% of the CPU.  With sufficient number of
> > these stuck SMTP connexions, the system gets very slow.
> 
> I've done a bit more testing on this.  I've been able to reproduce the
> problem on a Solaris 8 system running ZMailer 2.99.51 and with the
> NetBSD 1.6.1 system running the CVS version of 1st/2nd November
> (depending on time zone.)  It's looking more and more like a problem
> with the ZMailer blocklist lookup code looping infinitely.

Here's some debug output that illustrates the problem:

000- Alias-recursion: 4
000- Key: 8/TAG/'_rbl0'
000-   Attribute:
-126/test-dns-rbl/'relays.ordb.org.:l1.spews.dnsbl.sorbs.net.:http.dnsbl
.sorbs.net.:socks.dnsbl.sorbs.net.:misc.dnsbl.sorbs.net.:sbl.spamhaus.or
g.'000-     accepted!000-   Attribute: 0/??/''000-     not interested,
skipped...000-   Attribute: 0/??/''
000-     not interested, skipped...
000-   Attribute: 0/??/''
000-     not interested, skipped...
000-   Attribute: 0/??/''
000-     not interested, skipped...
000-   Attribute: 0/??/''
000-     not interested, skipped...
000-   Attribute: 0/??/''
<continues until killed -- infinite loop>

Here's a patch which seems to fix the symptom:

--- smtpserver/policytest.c	Tue Nov  4 09:13:46 2003
+++ smtpserver/policytest.c.new	Tue Nov  4 09:14:12 2003
@@ -522,6 +522,11 @@
 	    type(NULL,0,NULL," Every request found. Finishing search.");
 	  break;
 	}
+	if (!str[0]) {
+	  if (debug)
+	    type(NULL,0,NULL," Would loop infinitely.  Breaking.");
+	  break;
+	}
     }				/* End of while. */
 
     /* Free memory from attribute list. Allocated in dbquery. */

Of course, I'm sure it would be better to find out how the attribute
is getting set wrong and fix that.

-- 
Roy Bixler <rcb@ucp.uchicago.edu>
The University of Chicago Press
-
To unsubscribe from this list: send the line "unsubscribe zmailer" in
the body of a message to majordomo@nic.funet.fi