Re: [Exim] rewrite dest. addr. based on sender ip

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Tony Finch
Date:  
À: Adam J. Henry
CC: exim-users
Sujet: Re: [Exim] rewrite dest. addr. based on sender ip
On Wed, 23 Jun 2004, Adam J. Henry wrote:
>
> I can't find any way to 'rewrite' the destination address using ACL,
> so I am looking at routers. What I have come up with is the
> following:
>
> # carbon_copy:
> #       driver = redirect
> #       data = carbon@???
> #
> #        condition = "${if and {                                        \
> #               {eq {${lookup {$host_address} iplsearch                 \
> #                       {ETC_PATH/host/carbon_copy}{1}{0}}}{1}          \
> #               }                                                       \
> #       } {1}{0} }"


You don't need to wrap the lookup in an if, because a lookup has built-in
then and else clauses. I don't know why you have an and{} there, since
there's only one condition.

condition = ${lookup {$host_address} iplsearch{ETC_PATH/host/carbon_copy} \
                {1} {0} }


Tony.
--
f.a.n.finch <dot@???> http://dotat.at/
LOUGH FOYLE TO CARLINGFORD LOUGH: NORTHWEST 6 OR 7 LOCALLY GALE 8 GRADUALLY
DECREASING 5 OCCASIONALLY 6. SHOWERS OR LONGER SPELLS OF RAIN. MODERATE OR
GOOD, LOCALLY POOR FOR A TIME. MODERATE OR ROUGH DECAYING SLIGHT TO MODERATE.