Jack Snodgrass wrote:
> On Thu, 13 Mar 2008 13:58:25 +0100, Peter Ludikovsky wrote:
>
>> Jack Snodgrass wrote:
>>> I'm pretty sure that this has been asked before... but I googled a bit
>>> and could not find an answer....
>>>
>>> I have a server running postfix ( don't think that the mail server
>>> software will make a difference ) and it has a primary IP Address
>>> and a 2nd / virtual IP Address. The 2nd / virtual IP address is
>>> reverse mapped back to my domain so when I send mail, I want that
>>> IP Address to be associated with the connection. Normally, the main
>>> IP Address on the Interface is used.... this does not reverse back
>>> to my domain so I need to use the 2nd / virtual Ip address on the
>>> outgoing mail connects. Some mail servers do a reverse lookup on
>>> the incoming connection and act differently if you say that you
>>> are 'y' but your reverse lookup says that you are 'x'.
>>>
>>> I am pretty sure that iptables is the answer... but I'm not sure
>>> if I want to mangle or snat or what....
>>>
>>> Thanks - jack
>>>
>> In postfix main.cf set (according to man 5 postconf
>> [http://linux.die.net/man/5/postconf])
>> inet_interfaces =
>>
>> HTH
>> /peter
>
> thanks... but that is for incoming mail... that tells postfix which
> ip addresses you want to listen on... when it send mails, it goes
> out the default iface and uses the main ip address associated with
> it...
>
> jack
>
Quote postconf(5), under inet_interfaces:
When inet_interfaces specifies just one IPv4 and/or IPv6 address that
is not a loopback address, the Postfix SMTP client will use this
address as the IP source address for outbound mail....
...
Setting $inet_interfaces to a single IPv4 and/or IPV6 address is
primarily useful with virtual(5,8) host- ing of domains on secondary IP
addresses
HTH
/peter