On 20.01.2014 12:42, [email protected] wrote:
Am 20.01.2014 12:25, schrieb [email protected]:
I'm trying to have postfix use smtp_bind_address with the address set to multiple IP-aliasses (eg. eth1:0, eth1:1 etc.). As the default gateway is on eth0 and IP packets get routed based on their destination, it still seems that despite the smtp_bind_address setting, packets get directed out of eth0.

What's the proper solution to this?

please *always* post your configuration and logfiles to
show your problem instead a abstract description

did you read http://www.postfix.org/postconf.5.html#smtp_bind_address?

- you define *one* ip-address there
- you define a ip-address there and *not* a interface name
- eth1:0 is *not* a interface, the interface is eth1

the intention of "smtp_bind_address" is on machines with more then one
ip-address to define the one used for outgoing connections to match
hostname/PTR/SPF

Yes I read that page and understand it. Sorry I wasn't more clear, I should have said 'eg. the IP-addresses configured on eth1:0, eth1:1. I know an IP address is not an interface.

I can't simply attach the literal config file, my employer might not appreciate me disclosing such information, but let me show you what I've done.

- First: in main.cf I added 'sender_dependent_default_transport_maps = hash:/etc/postfix/sender_transport' - Second: I create /etc/postfix/sender_transport with lines looking like: '@3dn.nl smtp3dn:'
- Third: I ran postmap on the sender_transport file
- Fourth: I added a line 'smtp3dn unix n - n - - smtpd -v -o smtp_bind_address=172.24.25.19' to master.cf

172.24.25.19 is configured to be on eth1:0.

The default gateway goes out over eth0. Based on the destination IP-address of the remote MTA, the kernel decides that it's not in a local network so it sends it out over eth0 as that's where the default gateway is.

eth0 and eth1 are in different VLAN's, I must send SMTP out over eth1[:*] as the source addresses are NAT'ed on their way out and the NAT device is in eth1's VLAN but not eth0's.

Regards,
Fred Leeflang

Reply via email to