On Tue, 2011-03-08 at 12:36 +0100, Ákos Maróy wrote: > Hi, > > I wonder how postfix decides on what IP address to bind to / initiation > IP connections from, in terms of sending outgoing mail? > > I have a server with 5 IP addresses, where the IP address I'm using for > receiving mail is the main IP address for the machine. I've set the > following in main.cf to enforce this: > > inet_interfaces = x.x.x.170,127.0.0.1 > > > the range of IP addresses the machine is configured to ranges from .170 > to .174. > > interestingly, when my postfix sends mail, it initiates connections from > IP address .174, instead of .170. this is despite the fact the postfix > doesn't listed on anything but .170. > > I wonder why this is happenning, and how one can force postfix to > initiate connections from an explicitly specified IP address. >
If I'm not mistaken, the setting of inet_interfaces is for the _listening_ port only and not for the outgoing one. It depends on the the routing table which interface is used for outgoing mail. Regards, -- Bas.