Re: [Exim] Problems using "condition" in a router block

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Ralf G. R. Bergs
Data:  
Para: exim-users ML
Asunto: Re: [Exim] Problems using "condition" in a router block
On Tue, 29 Apr 2003 17:55:22 +0200, Nico Erfurth wrote:

>Ralf G. R. Bergs wrote:
>
>> Before I changed it to the above I had
>>
>> condition = ${if exists{/etc/exim/virtual/${domain}/passwd}{true}{false}}
>>
>> but that didn't help either. :-(
>
>The problem is, that the condition is evaluated as the last
>router-precondition, but the local_parts check happens before (see 3.9
>for the whole story).
>
>Use this instead:
>
>condition = ${if exists {/etc/exim/virtual/$domain/passwd} \
>                    {${lookup {$local_part} lsearch \
>                        {/etc/exim/virtual/$domain/passwd}{1}{0}}}\
>                    {0}}

>
>and remove the local_parts condition


Now that Phil told me what my problem was I would have chosen exactly THIS
approach. You saved me even the typing work. :-)

Thank you, too!


--
   L I N U X       .~.
  The  Choice      /V\
   of a  GNU      /( )\
  Generation      ^^-^^