On Tue, 21 Oct 2003, Andy Rabagliati wrote:
> I would like to add this condition to smart_route :-
>
> "If the MX record resolves to an address 196.7.14.* , do not smart_route".
>
> How would I do this ?
Folks,
I got the following reply from Dmitriy <neo@???> :-
From: Dmitriy <neo@???>
Subject: Re: [Exim] condition to check for MX in local class C block
You can simply use NAT.
Also you should remove smartroute at all(simple smtp transport).
In case of Linux iptables:
iptables -t nat -A OUTPUT -p tcp --dport 25 -d ! 196.7.14.0/24 -j DNAT
--to-destination $smartroute:25
Every connection on tcp 25 port will be NAT`ed to smarthost except
connections to 196.7.14.0/24 subnet.
That is all and very simple :)
--
With Respect
Dmitriy Kuznetsov
So simple it borders on off-topic :-)
Thank you, Dmitriy.
Cheers, Andy!