Qmail - Allow relay for a specific IP address

I found a couple web pages, but I still can’t get it to relay.
http://www.qmail.org/qmail-manual-html/misc/FAQ.html#5.4
http://www.roamer1.org/computing/qmail.html

The second link is closer to the setup of the RH9 Iworx box because it has the config for using xinetd vs inetd in the first post.

I tried what it said, but I still get the:
“553 sorry, that domain isn’t allowed to be relayed thru this MTA (#5.7.1)”

Any other ideas on how to set this up?

Thanks

[edit]
Another Link: http://www.barriebremner.com/qmailxinetd.html

Hi Justec,

Sure, just do the following:

Edit the /etc/tcprules.d/tcp.smtp file
If the IP address you wanted to allow relaying for was 22.22.22.22, add the following line to this file:

22.22.22.22:allow,RELAYCLIENT=“”

Then,

cd /etc/tcprules.d/
tcprules tcp.smtp.cdb tcp.smtp.temp < tcp.smtp

That should do it,

Paul

Hi Paul,

So the interworx setup already has the tcpserver installed.

Wasn’t sure how that worked if you have TCPserver and xinetd installed and running simultaneously.

Going to try it now, I’ll let you know if it still doesn’t work.

Thanks,
Justin

EDIT - Works Great, Thanks again

Found another way to do this with Qmail by looking at an strace.

Just create the file /var/qmail/control/relayclients and just list your relay IPs in here.

Woah, this is an old one. Just wondering if there is some other way to do this now? I tried these steps on a new server I just moved to, but it’s still rejecting my email.

Nevermind, just had to manaully edit /service/smtp/run from:

export FORCE_TLS=1
export DENY_TLS=0
export REQUIRE_AUTH=1
export ALLOW_INSECURE_AUTH=0

to

export FORCE_TLS=0
export DENY_TLS=0
export REQUIRE_AUTH=0
export ALLOW_INSECURE_AUTH=1