[exim] More integer annoyances in 4.65

Etusivu
Poista viesti
Vastaa
Lähettäjä: Exim Mailing List
Päiväys:  
Vastaanottaja: exim-users
Aihe: [exim] More integer annoyances in 4.65
Hi,

Ok, installed 4.65 and immediately was hit with more integer
annoyances and had to downgrade back to 4.63.

1.  The variable $spam_score_int defaults to a blank value.  Therefore,
    you cannot use something like the following in your config file:


        ${if >{$spam_score_int}{50}}


    without first checking to see if there is a value in it first.  Previously
    I could assume a null value to represent a zero value in comparions.


    I fear that there may be other variables that have this behavior so
    will need to do more checking against the spec and source code to 
    figure that out.


2.  Any numeric tests against ACL variables will need to be fixed to ensure
    that you initialize your ACL variables with a default numeric value.


    That is, if you do something like:


               ${if >{$acl_m0}{100}}


    You'll need to be sure you initialize $acl_m0 to a number first or you'll
    get an error.


3.  I can't seem to find a way to tell whether or not a value is a valid
    integer without resorting to regexes.  I hope I'm missing something
    obvious though, so thought I would ask the group.


    I was hoping for something like:


        ${if >{${if isint{$spam_score_int}{$spam_score_int}{0}}}{50}}


    or some other method to validate a value before I compare it.


Actually, what I was hoping for is that all this nonsense of checking
for valid integers in comparisons be removed, or at least allow a null
value to be used. I can't recall such an incompatible change in Exim
since the release of Exim 4.

In absence of that, perhaps I'll submit an optional patch for people
who want to turn this integer checking off.

--
Dean Brooks
dean@???