On Sat, Mar 27, 2010 at 1:02 AM, Scott McEachern <[email protected]> wrote: > Hi folks, I'm running into a bit of a routing gotcha getting two mail > servers to send mail out using their own respective IP addresses. (While > this involves postfix, this is not a postfix support question, it's a > routing question)
I don't see anything about routing in your question. What I see is an issue involving the binding of the client-side of TCP connections. ... > The setup (which works fine): > - the two domains have their own external IPs, dns-wise. > - two instances of postfix listen on their respective external IPs taking > mail for their domains (set in master.cf) > - postfix acts as a mail gateway on the firewall, which shuffles mail to > either of two instances of postfix on an internal mail server > - 5 (non-contiguous) IPs are assigned to me by ADSL, so I have one physical > connection, with 1 'main' IP and 4 aliases. ... > The problem: > - mail sent out via either instance of postfix, regardless of the master.cf > setting, go out on the 'main' IP, such that mail headers appear like such: > > Received: from mail.domain2.com (erratic.ca [75.119.251.119]) > > The goal: > I'd prefer it to read ".. from mail.domain2.com (domain2.com [a.b.c.d])" You need to configure the postfix for domain2.com to explicitly bind() to the IP address of a.b.c.d and not use the default for the host. (You might think "but I've configured this postfix instance to only listen on IP A.B.C.D, why isn't it sending from that IP?". The answer is "because, in general, such a restriction is *not* correct behavior for MTAs, and therefore is not the default for postfix".) Philip Guenther

