[exim] Router Conditional Lookup Fails

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Patrick Porteous
Date:  
À: exim-users
Sujet: [exim] Router Conditional Lookup Fails
Hello,

I am trying to build a router that filters messages with certain words
in the subject into a spam transport using a words contained in an
external lookup file. I don't want to drop the message but instead
filter it into a specific folder based on what is contained in the
subject. I have had limited success with a few conditional statements
but can't quite put it all together the way I would like. Here is an
example of my router setup with comments on what errors I receive in
each case:

localuser_filter:
driver = accept
transport = local_spam_delivery
condition = ${lookup {Spam}
lsearch{/etc/exim/banned_subjects}{yes}{no}} # This works if the word
Spam is anywhere in the message.
condition = ${if match{$h_Subject:}{[Spam]}{yes}{no}} # This works if
the word Spam is in the subject.
condition = ${lookup {$h_Subject}
wildlsearch{/etc/exim/banned_subjects}{yes}{no}} # This fails and
gives me the following error.

Error:
failed to expand condition "${if and{{bool_lax{NULL}}{bool_lax{${lookup
{$h_Subject} wildlsearch{/etc/exim/banned_subjects}{yes}{no}}}}}}" for
localuser_filter router: missing lookup type inside "and{...}" condition
*** The last condition is what I am trying to accomplish.

I am doing this on a virtual host with multiple domains without local
users. The user accounts are in a database. I'm trying to avoid
filtering using the .forward file in each user directory and do this
system wide instead.

Thanks for the help...