Discussion:
postfix listening on 10025, relaying to localhost:25 ; problem
(too old to reply)
David Lewis
2005-01-27 18:44:51 UTC
Permalink
To test a greylisting filter upstream of my MTA, but on the same
machine, I have set up an instance of postfix to listen to smtp
connections on port 10025. The only smtpd line in master.cf is :

10025 inet n - n - 10 smtpd -o
myhostname=fictitious.name.org

Once past the greylist barrier, I want messages to be relayed to a
non-postfix smtp listener (Interscan Virus Wall) on port 25.

To cover all eventualities my postconf has

relayhost = [localhost]:25
fallback_transport = smtp:[localhost]:25

However, after greylist-clearance, all messages just bounce :
status=bounced (mail for localhost loops back to myself)

I've tried replacing [localhost] by the domain name of my server,
messing around with myhostname in postconf as well as in master.cf in
order to get past the loopback test, but to no avail :
status=bounced (mail for my.server.name loops back to myself)

I can't declare multiple IP addresses for the server in question, since
only one network interface, and a kernel without IP aliasing.

There's got to be some configuration that fools postfix into letting me
relay to a different port on the same server, even when that other port
happens to be 25 ... hasn't there ?

Any solutions gratefully received.

David
David Lewis
2005-01-28 11:23:06 UTC
Permalink
Post by David Lewis
There's got to be some configuration that fools postfix into letting me
relay to a different port on the same server, even when that other port
happens to be 25 ... hasn't there ?
Sure. You already have two addresses : the address of your network
interface, plus 127.0.0.1.

What you have to do make sure postfix DOESN'T listen on 127.0.0.1, but
only on your network address ww.xx.yy.zz, and then relay to 127.0.0.1.
That lets you sneak right past that old loopback test.

By default, postfix claims all active interfaces on the machine.

To stop it claiming 127.0.0.1 you need to have

inet_interfaces = ww.xx.yy.zz

That way you'll have no trouble with

relayhost = 127.0.0.1:25

Have fun!

Loading...