Gabriel Angel Möll Ibacache schrieb:
Hi everyone!
I have a linux box with three interfaces and I want to set postfix
outgoing interface to eth2
eth0 is conected to LAN
eth1 is using a public IP x.x.x.x
eth2 is usign a public IP y.y.y.y
I 'm using linux box to NAT, and firewall with iptables.
The routing tables are
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
wan 0.0.0.0 255.255.255.248 U 0 0 0 eth1
wan 0.0.0.0 255.255.255.248 U 0 0 0 eth2
lan 0.0.0.0 255.255.255.0 U 0 0 0 br0
lan 0.0.0.0 255.255.255.0 U 0 0 0 eth0
169.254.0.0 0.0.0.0 255.255.0.0 U 0 0 0 eth2
0.0.0.0 gw-wan-ip 0.0.0.0 UG 0 0 0 eth1
0.0.0.0 gw-wan-ip 0.0.0.0 UG 0 0 0 eth2
I'm using iptables to nat. The rule is the following
iptables -t nat -A POSTROUTING -o eth1 -j SNAT --to-source x.x.x.x
My main.cf has the following lines
myhostname = server.mi_domain # this is pointing to IP y.y.y.y
mydomain = mi_domain # this is pointing to IP y.y.y.y
inet_interfaces = $myhostname, localhost
Anyone know how can I set the postfix outgoing interface?
smtp_bind_address=your.ip.add.ress
--
Best Regards
MfG Robert Schetterer
Germany/Munich/Bavaria