Re: [exim] Weird errors with conditions

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Fred Viles
Datum:  
To: exim-users
Betreff: Re: [exim] Weird errors with conditions
On 20 Sep 2005 at 17:53, Yves Goergen wrote about
    "Re: [exim] Weird errors with condit":


| On 20.09.2005 17:36 (+0200), Jakob Hirsch wrote:
| > ${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}}}}
| 
| Why is that 'and' unnecessary when I want to check for 'A and B'?


Because, as you say, the ${lookup will return '0' or '1' - so it can
be used directly as the "then" value of the ${if.

| According to the documentation, 'eq' only takes 2 parameters, not 3.


Right, so follow that line of thought. If the {${lookup... in
Jacob's syntax isn't be a parameter of the 'eq', the syntax rules say
it must be whatever comes next - the {then_string} parameter of the
${if.

- Fred