[exim] Cannot seem to figure out condition in acl_check_data

Etusivu
Poista viesti
Vastaa
Lähettäjä: 4d Web Hosting
Päiväys:  
Vastaanottaja: Exim-users
Aihe: [exim] Cannot seem to figure out condition in acl_check_data
Hi All,



Okay, been trawling the internet and cannot seem to figure this one out so
thought I would put it to the experts.



What I'm trying to do is setup conditional spam settings for each of my
"virtual" users in the acl_check_data. Here is what is working:



deny

                spam       = nobody/defer_ok


                condition = ${if >{$spam_score_int}{100}{1}{0}}


                log_message = "SpamAssassin detected message as spam
($spam_score) and denied it"


                message = "The mail server detected your message as spam and
has prevented delivery."




Now my problem, currently the threshold is hardcoded to 100 (10.0) and i
want this value to be set based on the domains specific value. The value is
stored in a file using the following directory sturcture:



/home/mail/<domain>/spamassassin-deny



My first attempt at this was:



deny

                spam       = nobody/defer_ok


                condition = ${if

>{$spam_score_int}{{lsearch{/home/mail/domains/$domain/spamassassin-warn}{$v

alue}}}{1}{0}}

                log_message = "SpamAssassin detected message as spam
($spam_score) and denied it"


                message = "The mail server detected your message as spam and
has prevented delivery."




But that didn't work. For one my condition was wrong and It looked like the
$domain variable was unset.. Why are conditions soooo hard :( Please help.



Kindest Regards,



Phil