Re: [exim] Weird errors with conditions

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Jakob Hirsch
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] Weird errors with conditions
Yves Goergen wrote:

>> ${if eq {$recipients_count}{1} \
>> {${lookup mysql{MYSQL_Q_SPAMFILTER} {1}}}}
> The database query will return "0" or "1" or an error if the record is


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

or if you insist on the unnecessary "and":

${if and { \
    {eq {$recipients_count} {1}} \
    {eq {lookup...} {1}}}}


> And here's the error:
>> LIMIT 1} {$value} {0}}}} {true}}": condition name expected, but found
>> "${lookup mysql{S" inside "and{...}" condition


as the error message says, a lookup is not a condition.

> What is a "condition name"? Isn't the syntax like this:


http://exim.org/exim-html-4.50/doc/html/spec_11.html#SECT11.7

> I guess additional spaces between all that braces don't matter. That
> makes it a bit easier to read.


right. as long as you don't use them like that:

${if eq { bla } {bla} {right} { wrong }}