Routing emails through non-gateway... how?

Robert Brockway robert-5LEc/6Zm6xCUd8a0hrldnti2O/JbrIOy at public.gmane.org
Fri Jul 17 15:16:59 UTC 2009


On Fri, 17 Jul 2009, William Park wrote:

> Hi all,
>
> If my default gateway is on eth0, how do I route all email through
> another interface, say eth1 or ppp0 ?
>
> Any pointer or keywords would be appreciated.

Hi William.  There are a couple of options here.

In the general sense what you want to do is called 'source routing'.

Linux has advanced routing capabilities available and does allow you to 
source route based on port number.  So you could send all SMTP traffic out 
one interface and all other traffic out another, for example.  Check out 
the ip(8) man page.  The package name to enable advanced routing is 
normally 'iproute' or 'iproute2'.   iproute had a lot of amazing stuff. 
This capability has been around for years and is very stable.

Since you mention mail there is potentially another options.  Depending on 
how your routing is currently configured you may be able to use a 'relay 
host' or a 'transport' capability within the MTA to shunt your mail to the 
right location.  This doesn't directly address whicb interface is used, 
you still need to have the routing set correctly.

Cheers,

Rob

-- 
I tried to change the world but they had a no-return policy
Projected IPv4 exhaustion: http://www.potaroo.net/tools/ipv4/index.html
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list