Re: [exim] saving variables

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marc Sherman
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] saving variables
Rainer Sigl wrote:
> Hi all,
> I would like to save the content of $local_part into another variable
> that I can use the orignal value later. How to do this?
>
> my configuration is:
>
> lists:
>         driver = redirect
> # allow_fail
>       local_save=$local_part      ????????????????????? this doesn't 
> work??????????????????????


Why did you think it would work? This syntax doesn't appear in the docs
anywhere.

>         data = ${lookup pgsql{select process_list('$local_part','$domain')}}
>         errors_to = ${lookup pgsql {select owner || '@mpe.mpg.de' from 
> lists where alias='$local_save'}{$value}}


In your particular use case, you don't need a variable at all;
$local_part will not be changed while the errors_to line is being
processed. However, you may find $original_local_part or
$parent_local_part useful in similar situations; see chapter 11 of the docs:
http://exim.org/exim-html-4.62/doc/html/spec_html/ch11.html#SECTexpvar

In the general case, the only scratch variable available in routers is
address_data; see chapter 15:
http://exim.org/exim-html-4.62/doc/html/spec_html/ch15.html

- Marc