Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Qmail: users

can't figure out why RBLSMTPD isn't working.

 

 

Qmail users RSS feed   Index | Next | Previous | View Threaded


dropdeadster at gmail

Feb 24, 2011, 7:59 AM

Post #1 of 3 (1450 views)
Permalink
can't figure out why RBLSMTPD isn't working.

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


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


if I add RELAYCLIENT= to the tcp.smtp line above that does work and I can relay.

how else can I test this?

thanks
brian


ar-djblists at acrconsulting

Feb 24, 2011, 3:10 PM

Post #2 of 3 (1402 views)
Permalink
Re: can't figure out why RBLSMTPD isn't working. [In reply to]

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?

> 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.

> 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"

rebuild your cdb, then telnet to the loopback addresses on port 25 to see what
result you get (type the SMTP commands as below),

$ telnet 127.0.0.1 25
Trying 127.0.0.1...
Connected to 127.0.0.1.
Escape character is '^]'.
220 rblsmtpd.local
mail from:<a@b>
250 rblsmtpd.local
rcpt to:<a@b>
553 beat it
quit
221 rblsmtpd.local
Connection closed by foreign host.
$

cheers,

Andrew.
--
====================================================================
* Custom email solutions * Systems Administration * Networking
http://www.acrconsulting.co.uk/email/qmail.html
====================================================================


dropdeadster at gmail

Feb 24, 2011, 7:46 PM

Post #3 of 3 (1393 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

Qmail users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.