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

Pàgina inicial
Delete this message
Reply to this message
Autor: Adam J. Henry
Data:  
A: exim-users
Assumpte: Re: [Exim] rewrite dest. addr. based on sender ip
On Thu, Jun 24, 2004 at 10:35:22AM +0100, Tony Finch wrote:
> 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} }


Thanks for your reply, Tony.

Unfortunately your suggestion didn't work, either. As a side note, I
don't think the 'if' or 'and' tokens would hurt anything. Perhaps
superfluous, but the logic should evaluate the same, no?

I'm gonna try to run in debugging mode to find out what $host_address
is evaluating to.

thanks,
hank