widyachacra wrote: > we have two internet links. one is a leased line other one is an ADSL > broadband line. now i need to route our outgoing emails through the ADSL > broadband line. how can i do that? > > we're using Qmail. > > how to route outgoing emails through a specific network card or IP ADDRESS? > > Please help me. I had the same issue when I had to force my mail to use my ADSL connection instead of my cable connection which is my default route because my cable IP was blacklisted. I solved it by marking packets to port 25 and then routing them via my adsl route. I used the following script on my router where eth2 connects to my LAN on 10.0.0.0. 192.168.1.1 is my adsl router on eth0 and eth1 is my cable modem. ... # Force mail to be sent via ADSL because @home is blacklisted iptables -v -t mangle -A PREROUTING -i eth2 -p tcp --dport 25 \ -j MARK --set-mark 2 ... ## ROUTING ## # Define adsl routing table used by packets MARK'ed with 0x02 ip rule add fwmark 2 table adsl ip route add 10.0.0.0/24 dev eth2 table adsl ip route add 127.0.0.0/8 dev lo table adsl ip route add default via 192.168.1.1 dev eth0 table adsl # Define cable routing table used by packets MARK'ed with 0x01 ip rule add fwmark 1 table cable ip route add 10.0.0.0/24 dev eth2 table cable ip route add 127.0.0.0/8 dev lo table cable ip route add default via 82.73.126.1 dev eth1 table cable Hope this helps, -- / Xavier Neys \_ Gentoo Documentation Project / /\ http://www.gentoo.org/doc/en/