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

Top Page
Delete this message
Reply to this message
Author: Nico Erfurth
Date:  
To: Ralf G. R. Bergs
CC: exim-users ML
Subject: Re: [Exim] Problems using "condition" in a router block
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


Nico