Re: [EXIM] Some q. about EXIM filters

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Philip Hazel
Data:  
Para: Andrey Chernomyrdin
CC: exim-users
Assunto: Re: [EXIM] Some q. about EXIM filters
On Fri, 27 Nov 1998, Andrey Chernomyrdin wrote:

> if foranyaddress $h_from 
>    ( 
>      "${lookup {$thisaddress} lsearch {$home/etc/announce} {$value} {} }" is not ""
>    )
> then
>         deliver $value
> endif


> Why I can't use $value after lookup expressions ?


Because you can only use $value inside a lookup expression.

Why is it like this?

(1) Because ${lookup...} was implemented a very long time ago, long
before "foranyaddress" was thought of.

(2) Because ${lookup...} can be nested, and $value is preserved at each
level, so the unset value gets preserved at the outer level.

It would make more sense to leave the value of $thisaddress set when the
testing loop exits. At the moment it is explicitly unset. I think this
would occur if the line

      filter_thisaddress = NULL;


which is around line 1532 in filter.c in Exim 2.05 were just removed.

I will think about this possibility.


-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.



--
*** Exim information can be found at http://www.exim.org/ ***