Re: [exim] Weird errors with conditions

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Jakob Hirsch
Data:  
Para: exim-users
Assunto: Re: [exim] Weird errors with conditions
Yves Goergen wrote:

>> condition = ${if {and {{eq{$recipients_count}{1}} {${lookup
>> mysql{MYSQL_Q_SPAMFILTER}{$value}fail}}}} {true}}


A string (or even a "fail") is not a condition you can use in "if". If you
want to check if the lookup succeeded you have to use a condition, e.g.
"eq":

${if eq {${lookup ...{1}{0}}} {1}}

"condition" in an ACL only expects something like 1, 0, yes or no. You can
rewrite it like that:

${if eq {$recipients_count}{1} \
{${lookup mysql{MYSQL_Q_SPAMFILTER} {1}}}}


> Why can't I use C-like syntax in the Exim config file? All those
> {{{}{}{}}{ all around make me go insane one day...


Exim is not a compiler. And your problem was totally unrelated to braces.