Re: [exim] More integer annoyances in 4.65

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: David Saez Padros
Dátum:  
Címzett: Exim Mailing List
Tárgy: Re: [exim] More integer annoyances in 4.65
Hi !!

>    warn dnslists = sbl-xbl.spamhaus.org
>         set acl_m0 = 1

>
>    warn dnslists = dnsbl.njabl.org
>         set acl_m0 = 2

>
>    deny condition = ${if >{$acl_m0}{0}}

>
> Keep in mind that it is *documented* that acl_m0 is reset at the beginning
> of each message, so a reasonable person may assume that doing a numeric
> comparison against it is always safe.


why ? exim variables are not by itself numeric, they are strings and is
not the same to reset a string than a number. The example you propose
has the kind of error i pointed, who ensures that acl_m0 was not set to
anything else (maybe also 1 or 2) in a previous part of the acl ? this
will lead to unexpected and possible very wrong results. Take in account
that config files may be large and me be split in different files, where
the same variable could be used and take other values. Also, if you do
this kind of check on acl_rcpt you could end rejecting some recipients
not because the fail the test but because the previous recipient failed
the test (which will not be the case when using dnslists, but could be
possible when using other tests). In that situations it will be more
difficult to trace the error for a novice user because it will need
debugging, but not if exim fails with a descriptive error.

> To make this work, I would have to add the following at the beginning, which
> a new user to Exim may overlook as being unnecessary:
>
>    warn set acl_m0 = 0


but that the safest and better way of doing things.

--
Best regards ...

I am Homer of Borg. Prepare to be assim... mmmm, donuts.

----------------------------------------------------------------
    David Saez Padros                http://www.ols.es
    On-Line Services 2000 S.L.       e-mail  david@???
    Pintor Vayreda 1                 telf    +34 902 50 29 75
    08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------