Re: [exim] Weird errors with conditions

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Fred Viles
日付:  
To: exim-users
題目: Re: [exim] Weird errors with conditions
On 20 Sep 2005 at 17:22, Yves Goergen wrote about
    "Re: [exim] Weird errors with condit":


|...
| This is my next try:
| > condition = ${if and {{eq {$recipients_count} {1}} \
| >                       {${lookup mysql{MYSQL_Q_SPAMFILTER} {$value}
| >                       {0}}}} \
| >                  {true}}
| 
| And here's the error:
| > temporarily rejected after DATA: failed to expand ACL string "${if
| > and {{eq {$recipients_count} {1}} {${lookup mysql{SELECT spamfilter
| > FROM users WHERE CONCAT(local, "@",
| > domain)='${quote_mysql:$recipients}' LIMIT 1} {$value} {0}}}}
| > {true}}": condition name expected, but found "${lookup mysql{S"
| > inside "and{...}" condition
| 
| What is a "condition name"?


Anything listed in section 11.7 (Expansion conditions} or 11.8.
Things like "eq", "match", "exists", "or", etc. Note that none of
them begin with '$'...

| Isn't the syntax like this:
|     and {{cond1} {cond2}}
| and for conditions:
|     ${if {cond} {truepart} [{falsepart}]}


Yes. But ${lookup... is not a condition.

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


Outside braces, definitely. Inside grouping braces, OK. Inside
braces that delimit a string, be careful. If the braces delimit a
string, the spaces are included in the string value.

- Fred