# tcpserver/tcprules ignoring my lines [SOLVED]

## kic

Hi all,

I have a strange behaviour of tcprules on my system. I'd like to let some hosts in our network use my machine running qmail as an SMTP  relay. What I did was editing /etc/tcprules.d/tcp.qmail-smtp so it contains

127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""

192.168.222.:allow,RELAYCLIENT="",RBLSMTPD=""

:allow

, then running "tcprules tcp.qmail-smtp.cdb tcp.qmail-smtp.cdb.temp < tcp.qmail-smtp"

- but 192.168.222.2 still gets the message

553 sorry, that domain isn't in my list of allowed rcpthosts (#5.7.1)

Restarting /etc/init.d/svscan does not help either.

Checking the rule by

tcprulescheck tcp.qmail-smtp.cdb 192.168.222.2

results in

rule :

allow connection

Now when I open my system WIDE for testing by editing /etc/tcprules.d/tcp.qmail-smtp so it contains

127.0.0.1:allow,RELAYCLIENT="",RBLSMTPD=""

192.168.222.:allow,RELAYCLIENT="",RBLSMTPD=""

:allow,RELAYCLIENT="",RBLSMTPD=""

it's working perfectly - so it really reads my /etc/tcprules.d/tcp.qmail-smtp.cdb file. Also, tcprulescheck tcp.qmail-smtp.cdb 192.168.222.2 now results in

rule :

set environment variable RELAYCLIENT=

set environment variable RBLSMTPD=

allow connection

Why do my first two lines never match? I tried 192.168.222.2, 192.168.222., tried 127.0.0.1 - nothing. Is this a bug or am I doing something wrong? The file in general is working as we can see from the above.

I also reinstalled the package a few times (sys-apps/ucspi-tcp-0.88-r :Cool: , no change.

Please help me, I am running out of possible reasons... 

Thanks a lot and greetings,

TorbenLast edited by kic on Wed Jan 12, 2005 12:17 pm; edited 1 time in total

----------

## rhavens

First, try this:

   TCPREMOTEIP="192.168.222.2" tcprulescheck tcp.qmail-smtp.cdb

instead of:

   tcprulescheck tcp.qmail-smtp.cdb 192.168.222.2

to see if the rules are working.

(I struggled with this one for a couple hours this morning)

----------

## kic

Hey, thank you very much.... how did you find out about THAT??? Now it's working using tcprulescheck.... although qmail still doesn't let me send via SMTP from that host... there must be another bug somewhere...

But thanks a LOT!!! So it was only a bug in the man page!

Greetings from Munich,

Torben

----------

## harlekyn

I ran into the same problem this morning. I upgraded ucspi-tcp a couple of days ago, and today I noticed that I wasn't able to send mail from localhost without authentification. 

This worked before, and the tcprules where set correctly. After looking through the forums, I tried to recompile ucspi-tcp with "-ipv6", and that did the trick! Now tcpserver is honouring the tcprules again correctly.

Hope that helps  :Smile: 

----------

## kic

Yes, it did it!!!  :Smile:  Thanks for your help!!!

Torben

----------

