I'm running Postfix 2.5.4 on a central, public-facing mail server/
firewall which acts as a relay for several internal hosts. I'd like
to have mail coming from a particular sender go out a different IPv4
bind address on the box.
I thought the best way to do this was to use a different internal-
facing port and have the other servers relay through that port and
have that port relay directly to the Internet, but I can't seem to
find a way to make it work.
I have tried a number of configurations in master.cf, but can't seem
to get one that doesn't just relay it through the main bind address...
in this example (in which I think I've tried every variation of)...
Y.Y.Y.Y is the second IP I would like it to send mail from to and
X.X.X.X is the main server which is already running. I would just
have the internal machines connect to 10.20.30.1:2525 if they were
supposed to use the other bind address. In this configuration things
are still sending from X.X.X.X even though I would like mail that is
relayed through port 2525 to go out Y.Y.Y.Y. I tried chalking it up
to my misunderstanding of the complexities of master.cf, but also
failed to get a completely separate Postfix instance on the same
machine to do what I wanted.
# from master.cf
10.20.30.1:2525 inet n - - - -
smtpd
-o content_filter= -o smtp_bind_address=Y.Y.Y.Y -o
default_transport=smtp:[Y.Y.Y.Y]:smtp -o relayhost=[Y.Y.Y.Y]:smtp -o
syslog_name=postfix4 -vv
Y.Y.Y.Y:smtp inet n - - - - smtpd
-o content_filter=spamassassin -o myhostname=mail02.ourdomain.net -o
syslog_name=postfix5 -vv
10.20.30.1:smtp inet n - - - -
smtpd
-o content_filter=
127.0.0.1:smtp inet n - - - -
smtpd
-o content_filter=
X.X.X.X:smtp inet n - - - - smtpd
-o content_filter=spamassassin
Thoughts?