On Mon, Mar 03, 2008 at 07:55:23PM +0100, Pawel Rutkowski wrote:
> if he found [EMAIL PROTECTED] in file /etc/exim/direct/$domain and all these:
> ...
> expression is true then the email is accepted in that router.

OK, well in that case your main choices are:

- embed the "if" inside the "lookup", a bit like this:

  condition = [EMAIL PROTECTED]/etc/exim/direct/$domain}\
        {${if and{ ... add conditions here ... }} \
        {no} \
  }

  (i.e. if the lookup succeeds, try the "if", otherwise the answer is "no")

- or, add the lookup as another condition:

>      {!def:h_X-Spam-Flag:} \
>      {!eq {$received_protocol}{spam-scanned}} \
>      {!eq {$received_protocol}{local}} \
>      {exists{/etc/exim/spam/$domain/user_prefs}} \
       {!eq {} {${lookup ...}}}

  (i.e. an extra "and" condition which verifies that the lookup expands to
  non-empty)

- or, add the lookup as part of the "true" expansion of the "if":

  condition = ${if and { ... } \
        {${lookup ...}  {yes}{no}}\
  }

  (i.e. try all the "if", and if those tests are true then try the lookup)

I suspect the second option will be the most readable.

-- 
Dave Evans
http://djce.org.uk/
http://djce.org.uk/pgpkey

Attachment: signature.asc
Description: Digital signature

-- 
## List details at http://lists.exim.org/mailman/listinfo/exim-users 
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/

Reply via email to