2008/7/31 Robert Schetterer <[EMAIL PROTECTED]>: > 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 >
Well, I tryed to define smtp_bind_address=y.y.y.y but that didn't work, maybe because I had the same default router for both IP (x.x.x.x and y.y.y.y). Or maybe the nat rule in iptables is causing the redirection to x.x.x.x. Anyway, I'll test again without iptables. -- Sin otro particular se despide, Gabriel Möll Ibacache Ingeniero Civil en Computación