Forum OpenACS Q&A: Qmail Question...

Collapse
Posted by Jamie Ross on
Ok.. not exactly on topic but its part of my OpenACS installation. I am running qmail-smtpd under tcperver with the tcprules database. For some reason it doesnt seem to be setting the RELAYCLIENT variable. When I run tcprules check it works fine and when I set RELAYCLIENT manually and invoke qmail-smtpd it works.. but they dont seem to work together. I am going crazy because this should all work and I want to get back to coding intranet stuff so ANY suggestions are welcome

I am running tcperver with -x /etc/tcp.smtp.cdb .. is there anyway to check an see if RELAYCLIENT is being set?

thanks !!!!!!!!!!

Jamie

I have restarted the smtpd server many times.. and testing both with client on local network and telnet give me same results. qmail-injects works just fine.. seems like RELAYCLIENT is not getting set

Collapse
Posted by Gilbert Wong on
Did you follow the instructions here?

http://www.palomine.net/qmail/selectiverelay.html

Collapse
Posted by Jamie Ross on
Subject: Response to Qmail Question... Yep, followed all of the assorted instruction so it "should" work. I am guessing there is some permission or something set wrong somewhere.. I just don't know where

the tcp.smtp rules looks like

 
127.:allow,RELAYCLIENT=""  
192.168.:allow, RELAYCLIENT=""  
:allow  
The qmail-smtpd daemon is running under daemontools as :
 
#!/bin/sh  
QMAILDUID=`id -u qmaild`  
NOFILESGID=`id -g qmaild`  
exec /usr/local/bin/tcpserver -x /etc/tcp.smtp.cdb -v -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /usr/local/bin/recordio /var/qmail/bin/qmail-smtpd 2>&1   
The log entry for smtpd shown below. Notice is doesn't "deny" the incoming message (not even if I set default rule to :deny), it just doesnt seem to be setting the RELAYCLIENT and bypassing rcpthosts like it should
 
@400000003cea9a2000817a7c tcpserver: status: 1/40  
@400000003cea9a2000842614 tcpserver: pid 15838 from 192.168.100.50  
@400000003cea9a200092cc14 tcpserver: ok 15838 development.research.kinetx.com:192.168.100.20:25 mycroft.research.kinetx.com:192.168.100.50::53910  
 400000003cea9a2000b96eb4 15838 > 220 development.research.kinetx.com ESMTP  
 400000003cea9a20016fbaac 15838 < EHLO mycroft.research.kinetx.com  
 400000003cea9a200170c064 15838 > 250-development.research.kinetx.com  
 400000003cea9a200170e38c 15838 > 250-PIPELINING  
 400000003cea9a200170fee4 15838 > 250 8BITMIME  
 400000003cea9a20018a43a4 15838 < MAIL FROM: <jross@research.kinetx.com> 
 400000003cea9a20018b1a7c 15838 > 250 ok  
 400000003cea9a2001937eec 15838 < RCPT TO: <jross@starboundtech.com> 
@400000003cea9a2001944df4 15838 > 553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1   
 400000003cea9a2001ab19e4 15838 < QUIT  
@400000003cea9a2001ad5fec tcpserver: end 15838 status 0  
@400000003cea9a2001ad86fc tcpserver: status: 0/40  
 400000003cea9a2001ade8a4 15838 > 221 development.research.kinetx.com  
@400000003cea9a2001aef244 15838 > [EOF]  
so I am stumped...
Collapse
Posted by Tom Jackson on

Your tcprules line 2 has a space after the comma. I don't think there are supposed to be spaces. From man tcprules:

Each  rule  contains  an  address,  a  colon, and a list of instructions, with no extra spaces. When
       tcpserver(1) receives a connection from that address, it follows the instructions.
          
Collapse
Posted by Stephen . on
Is the cdb database up to date?
strings /etc/tcp.smtp.cdb
Collapse
Posted by Jamie Ross on
Tom, you rock!

Yes that seems to have been the problem.. I removed the space and it works as expected

thanks to everyone for the help!

cheers

Jamie