Re: [exim] Bug in string expansion of exim configuration?

Top Page

Reply to this message
Author: Forum
Date:  
To: exim-users
Subject: Re: [exim] Bug in string expansion of exim configuration?
Am 22.12.2016 um 20:22 schrieb Jasen Betts:
>
>> That's what i want to do:
>>
>>        condition = ${if >{$spam_score_int}{${eval:10*{${lookup mysql{ SELECT DISTINCT spam_threshold FROM user WHERE
>> username='${quote_mysql:$local_part}' AND domain='${quote_mysql:$domain}' AND SMTP_allowed='YES'}}}}}{true}{false}}

>>
>>
>> This will result in:
>>
>> temporarily rejected after DATA: failed to expand ACL string
>> "${if >{$spam_score_int}{${eval:10*{${lookup mysql{ SELECT DISTINCT spam_threshold FROM user WHERE
>> username='${quote_mysql:$local_part}' AND domain='${quote_mysql:$domain}' AND SMTP_allowed='YES'}}}}}{true}{false}}":
>> error in expression evaluation: expecting number or opening parenthesis (after processing "10*")
>>
>>
>> From my point of view the syntax is correct.
>> Can you help me to see the error?
> from that error message:
>
> that bit where it says "eval:10*{${lookup"
> should say "eval:10*(${lookup" or possibly "eval:10*${lookup"
>
>
> looking at the lookup
>
> and you're probably going to want a default expansion in the lookup
> so "SMTP_allowed='YES'}}" becomes "SMTP_allowed='YES'}{$value}{-99}}"
>
> or something like that to cover the cases where no result is found in
> the database
>


That's very interesting - Thank you.

As i remeber i did get the same error message in exim 4.84 before with the string without this parenthesis.
"eval:10*${lookup" causes the same error crying for a parenthesis.

But this string worked before in the delivery section of exim 4.80.
Here the string that is currently in usage: "{${eval:10*${lookup mysql{ SELECT DISTINCT spam_threshold ..."
So the behaviour of exim has changed.

When i have a look at the documentation:
http://www.exim.org/exim-html-current/doc/html/spec_html/ch-string_expansions.html
i can't find anything about using normal ( parenthesis ). Everywhere {} is used, so i expected to use this.

So it is an important information that in case of this error normal ( parenthesis ) should be used if {} will not work.