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

Páxina inicial
Borrar esta mensaxe
Responder a esta mensaxe
Autor: Heiko Schlittermann
Data:  
Para: exim-users
Asunto: Re: [exim] Bug in string expansion of exim configuration?
Heiko Schlittermann <hs@???> (Do 22 Dez 2016 13:41:42 CET):

> > 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?
>
> Syntax is correct, but not the idea behind. In the DATA ACL you can't
> use $local_part, $domain, since you may have multiple recipients.


I've to correct my self. The syntax above isn't correct

    ${eval:10*{…}}      # WRONG


and probably never was. It *may* be, that older version of Exim
accepted it.

    ${eval:10*${…}}     # RIGHT


should be correct.

The documentation is simple an clear on ${eval:<string>}: String must
(after expansion) yield a conventional arithmetic expression. (my
wording). In the example marked as wrong, the "string" is 10*{…},
which isn't a valid arithmetic expression.

I'm not sure, if there can be even more examples. (Refer to the
spec file around line 9100 (as of 4.84_2, as part of the current stable
debian).

    Best regards from Dresden/Germany
    Viele Grüße aus Dresden
    Heiko Schlittermann
-- 
 SCHLITTERMANN.de ---------------------------- internet & unix support -
 Heiko Schlittermann, Dipl.-Ing. (TU) - {fon,fax}: +49.351.802998{1,3} -
 gnupg encrypted messages are welcome --------------- key ID: F69376CE -
 ! key id 7CBF764A and 972EAC9F are revoked since 2015-01 ------------ -