
dropdeadster at gmail
Feb 24, 2011, 7:46 PM
Post #3 of 3
(876 views)
Permalink
|
|
Re: can't figure out why RBLSMTPD isn't working.
[In reply to]
|
|
On Thu, Feb 24, 2011 at 6:10 PM, Andrew Richards <ar-djblists [at] acrconsulting> wrote: > On Thursday 24 February 2011 15:59:17 you wrote: >> please bear with me, I haven't set up a qmail box in a few years. >> Using lifewithqmail install so assume if I mention something it's in >> that context. >> >> basically if I set an RBLSMTPD= env in my /etc/tcp.smtp and rebuild >> the cdb, the RBLSMTP= part is not used. I tested with RELAYCLIENT as >> wel, and that is picked up properly, so I'm really confused as to what >> could be wrong. >> >> my tcp.smtp file is as so: >> >> xxxx:allow,RBLSMTPD="beat it" >> :allow >> >> I do not have any other lines that could possibly involve this guy (in >> fact I commented everything else out to just make sure) >> >> my smtp run line is as so: >> >> exec /usr/local/bin/softlimit -m 4000000 \ >> /usr/local/bin/tcpserver -v -R -l "$LOCAL" -x /etc/tcp.smtp.cdb -c >> "$MAXSMTPD" \ >> -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp >> /usr/local/bin/rblsmtpd -r zen.spamhaus.org \ >> /var/qmail/bin/qmail-smtpd 2>&1 > > It's not clear where your lines end: Do you have continuation characters ('/') > on all lines? Is there any stray white space beyond them? the format was fine, I do notice it does looks a bit odd how I pasted them though, oops. > >> if I run this from command line it works as expected: >> >> RBLSMTPD="bye" /usr/local/bin/rblsmtpd -r zen.spamhaus.org echo hi >> rblsmtpd: pid 6230: 451 screw >> 220 rblsmtpd.local > > That doesn't really test rblsmtpd, and the output you're getting looks a bit > weird. yes, it does really test rblsmtpd. if you check the documentation, rblsmtpd looks at RBLSMTPD env variable, if it's empty it unconditionally allows the connection, if it's a string it returns 451, unless it starts with a '-' it then returns a 553 error, if RBLSMTPD doesn't exist it looks for TCPREMOTEIP against the RBLs listed in -r or -a arguments. how it's invoked is irrelevant. >> if I add RELAYCLIENT= to the tcp.smtp line above that does work and I can >> relay. >> >> how else can I test this? > > Try matching against your loopback address, > > 127.0.0.1:allow,RBLSMTPD="beat it" [snip] as mentioned at top of the mail, I did these sorts of tests, they didn't work until I restarted qmail-smtpd. I was under the impression that each connection invoked a new process but this is not so it seems. I added the rblsmptd part of the exec line without restarting qmail-smtpd, thinking it'd run the exec for each connection. Guess my understanding of the process flow at this point was weak. Rebuilding the cdb with different RELAYCLIENTs set and it working confused the situation more for me. "My bad", as it where. thanks, brian
|