[exim] Conditionally skip filtering

Top Page
Delete this message
Reply to this message
Author: useatownrisk
Date:  
To: exim-users
New-Topics: Re: [exim] Conditionally skip filtering
Subject: [exim] Conditionally skip filtering
Hi all,

I have some trouble configuring exim to not filter incoming messages
given a flag in a database is set. I have tried using the following
configuration:

QUERY_FILTER    = ${lookup mysql{SELECT filter FROM mail WHERE \
                  local_part="${quote_mysql:$local_part}" AND domain= \
                  "${quote_mysql:$domain}"}}


[...]

acl_check_data:

  deny  message = Spam detected.
  spam = spamd:true/defer_ok
  condition = ${if and { \
                         {<{$message_size}{128K}} \
                         {>{$spam_score_int}{64}} \
                         {eq{'1'}{QUERY_FILTER}} \
                       } \
               {1}{0}}


In the SQL database mail.filter is either set to '1' (=filter mails) or
'0' (=don't filter). Unfortunately, no mail is going to be filtered, no
matter whether filter is set to '1' or to '0'.

Any ideas?

Thank you for your help in advance.

Pete