Many days I have fighted with selective relaying, read FAQs, manuals, descriptions and 
every articles from usenet even far-close to the matter 

but no success, so, I have to ask help, sorry!
I have installed qmail on RH7.1 by help of LWQ and run it's services via tcpserver. 
Everything works just fine, pop3 for example, but cannot 

get work selective relaying. I can send and receive mails from the server, can 
download them from the server with pop3 (through tcpserver) to 

any PC on my local network (192.168.100.0), even to a remote network (193.40.78.74, my 
home), but can't use it as a relay.

If I try to send a mail from home to sombody.another-domain.com via my server, I get 
this message in /var/log/qmail/smtpd:

@400000003b8e5b360243662c tcpserver: pid 5668 from 193.40.78.74
@400000003b8e5b36025e7bc4 tcpserver: ok 5668 0:193.40.78.66:25 193.40.78.74::1648
@400000003b8e5b360260a28c tcpserver: warning: dropping connection, unable to run -x: 
file does not exist
@400000003b8e5b360267de1c tcpserver: end 5668 status 28416
@400000003b8e5b360267edbc tcpserver: status: 0/20

When I put sombody.another-domain.com to rcpthosts it works, but, the heck, I can't 
put there all the world!

The contents of /qmail-smtp/run is:

#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`

exec /usr/local/bin/softlimit -m 2000000 \
    /usr/local/bin/tcpserver -v -R -l 0 -c "$MAXSMTPD" 0 25 -x  /etc/tcp.smtp.cdb  \
        -u "$QMAILDUID" -g "$NOFILESGID" /var/qmail/bin/qmail-smtpd 2>&1

and of /eth/tcp.smtp:

127.:allow, RELAYCLIENT=""
193.40.78.74:allow, RELAYCLIENT=""
192.168.100.:allow, RELAYCLIENT=""

Ofcourse I did run qmailctl cdb and it outputs "Reloaded /etc/tcp.smtp.", I can even 
view all those ip-addresses in the cdb file. I checked 

over the permissions, all seems to be is OK (644).

If I check tcprules, I get:

[root@server /root]# TCPREMOTEIP=193.40.78.74 tcprulescheck /etc/tcp.smtp.cdb
rule 193.40.78.74:
set environment variable  RELAYCLIENT=
allow connection
[root@server /root]# TCPREMOTEIP=192.168.100.11 tcprulescheck /etc/tcp.smtp.cdb
rule 192.168.100.:
set environment variable  RELAYCLIENT=
allow connection


I have played with the order of the options in tcpserver startup line:

    /usr/local/bin/tcpserver -x  /etc/tcp.smtp.cdb -v -R -l 0 -c "$MAXSMTPD" 0 25  \
       -u "$QMAILDUID" -g "$NOFILESGID" /var/qmail/bin/qmail-smtpd 2>&1

now I get:

@400000003b8e5d6a036e2e74 tcpserver: warning: dropping connection, unable to run -u: 
file does not exist

Naturally, if I ps (ps -auxww | more grep mail), there is:

root      6217  0.0  0.2  1332  360 ?        S    17:35   0:00 
/usr/local/bin/tcpserver -x /etc/tcp.smtp.cdb -v -R -l 0 -c 20 0 25 -u 503 -g 

502 /var/qmail/bi
n/qmail-smtpd
root      6417  0.0  0.0     0    0 ?        Z    17:39   0:00 [supervise <defunct>]

I understand that tcpserver tries to run the option -x or -u as a file and can't get 
the real cdb file invoked, why?

Is there anybody who knows everything about this stuff? Ok, not everything, but a 
little more than me? Creators? Please help!

Thanks a lot in advance.




Reply via email to