LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to use rblsmtpd 'RSS' patch with xinetd? (https://www.linuxquestions.org/questions/linux-software-2/how-to-use-rblsmtpd-rss-patch-with-xinetd-70238/)

T.J. Systems 07-05-2003 05:25 AM

How to use rblsmtpd 'RSS' patch with xinetd?
 
I am unable to get the rblsmtpd updated with the 'RSS' patch to work properly using xinetd.

The patch is properly applied and works fine when tested at the command prompt:
Code:

env TCPREMOTEIP=192.203.178.107 ./rblsmtpd -r \
  "sbl.spamhaus.org:Open relay problem - see \
  <http://www.mail-abuse.org/cgi-bin/nph-rss?%IP%>" \
  echo whoops

This example works properly (i.e. the custom error is returned and not the word 'whoops').

In the above example, the 'base' variable in rblsmtpd contains:

sbl.spamhaus.org:Open relay problem - see <http://www.mail-abuse.org/cgi-bin/nph-rss?%IP%>

rblsmtpd then proceeds to test the RBL and return the custom error message as indicated in the 'RSS' settings.

After a little tinkering, I believe it is because the xinted does not properly parse the parameter(s)...

For example, if the xinetd smpt section contains:

Code:

rblsmtpd -r server_args = /usr/sbin/rblsmtpd -r \
"sbl.spamhaus.org:Open relay problem - see \
<http://www.mail-abuse.org/cgi-bin/nph-rss?%IP%>" \
...(snip rest of qmail stuff)

In this situation, the 'base' variable ends up containing:

"sbl.spamhaus.org:Open

Which, sends rblsmtpd into a not very nice state, and basically accepting no e-mail (i.e. time-out).

Additionally, it is not only the space issue, but also the leading quote. You will note that the quotes are stripped when tested at the command-prompt level, but are part of the variable when triggered by xinted. If a single word is specified as the message:
Code:

rblsmtpd -r server_args = /usr/sbin/rblsmtpd -r \
"sbl.spamhaus.org:test_text" \
...(snip rest of qmail stuff)

Then the variable contains:

"sbl.spamhaus.org:test_text"

In this situation rblsmtpd does not fail, however it does not check the RBL server either (i.e. no mail bounced).

Naturally, in a single word situation, the quotes are not necesairy, and if removed in the example above, the RBL is checked and messages are bounced with the single word as the error (i.e. test_text). However, this is not very usefull, and defeats the whole 'rss' patch idea.

Also, the lines were broken into short peices for the post, but tested as a single long lines at the command-prompt as well as in xinetd.

Just curious if anyone running xinetd has be able to use the 'rss' patch?

Any suggestions would be greatly appreciated.

[RedHat 7.2-i386/rblsmtpd v0.88/qmail v1.03/xinetd v2.3.9]


All times are GMT -5. The time now is 11:37 PM.