[SLUG] Mail forwarding with a twist...

2005-08-11 Thread Alastair Steel
Hi,

I was wondering if anyone knew a simple how to, with iptables, for the following problem. 

I would like to divert email from a particular host to a secondary mail server on a LAN. 

For example we like to divert all incoming port 25 traffic from a
particular address say 111.111.111.111 to port 25 on a particular
internal mail server say 192.168.1.5 but the rest of the traffic needs
to continue going to the normal mail server on the Internet facing
machine.TIAAl Steel
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Re: [SLUG] Mail forwarding with a twist...

2005-08-11 Thread John Clarke
On Thu, Aug 11, 2005 at 04:34:02 +1000, Alastair Steel wrote:

 For example we like to divert all incoming port 25 traffic from a particular 
 address say 111.111.111.111 http://111.111.111.111 to port 25 on a 
 particular internal mail server say 192.168.1.5 http://192.168.1.5 but the 

/sbin/iptables -t nat -A PREROUTING -p tcp -s 111.111.111.111 --dport 25 \
-j DNAT --to-destination 192.168.1.5 


Cheers,

John
-- 
I always envisioned Bill [Gates] as the first guest star on the hot new 
series, Who Wants to Sodomize a Billionaire?  The contestants could vie 
to invent creative methods for Doing What Need Be Done.
-- Patrick R. Wade
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html