Re: [exim] How long does $value last?

Top Page
Delete this message
Reply to this message
Author: Jeremy Harris
Date:  
To: exim-users
Subject: Re: [exim] How long does $value last?
On 31/01/2019 17:26, Ian Zimmerman via Exim-users wrote:
>   warn
>     condition = ${lookup dnsdb{>; txt=${reverse_ip:$sender_host_address}.ASN_DOMAIN}}
>     set acl_c_sender_asn = $value

>
> and later on, I check acl_c_sender_asn, but it seems to be empty. I
> peeked in my named log and I see the query indeed takes place and
> returns the expected information. So why is $value unset (apparently)?
> Does it only last till the end of the current expansion? That is not
> the sense I got from the documentation.
>


The docs say, regarding ${lookup } :-

If the lookup succeeds, <string1> is expanded and replaces the entire
item. During its expansion, the variable $value contains the data
returned by the lookup. Afterwards it reverts to the value it had
previously (at the outer level it is empty).

Which part of the docs were you reading, to get a different sense?
--
Cheers,
Jeremy