[exim] Possible bug -- def:acl_m0 operator misbehavior.

Pàgina inicial
Delete this message
Reply to this message
Autor: Rafał Kupka
Data:  
A: exim-users
Assumpte: [exim] Possible bug -- def:acl_m0 operator misbehavior.
Hello,

Sometimes def:acl_xx returns false even if variable has a value.

Exim version 4.50 #1 built 02-Mar-2005 07:42:40, standard debian package
exim4-daemon-heavy 4.50-4 with custom configuration.

I prepared special acl config (RCPT TO:) for testing, it looks like:
  defer   !senders  = :
          senders   = <, GET_PERSONAL_WHITELIST
          message   = try this address in the next batch
          logwrite = DEBUG_PRE_SET: $ACL_PROTECTION
          set acl_m0 = 0
          logwrite = DEBUG_POST_SET: $ACL_PROTECTION
          condition = ${if def:ACL_PROTECTION}
          condition = ${if >={$ACL_PROTECTION}{0}}


Debug info (exim4 -d+alc+expand -bh <ip>) fragment:
...
expanding: DEBUG_PRE_SET: $acl_m0
   result: DEBUG_PRE_SET:
check logwrite = DEBUG_PRE_SET: $acl_m0
               = DEBUG_PRE_SET:
LOG: MAIN
  DEBUG_PRE_SET:
check set acl_m0 = 0
expanding: DEBUG_POST_SET: $acl_m0
*1)   result: DEBUG_POST_SET: 0
check logwrite = DEBUG_POST_SET: $acl_m0
               = DEBUG_POST_SET: 0
LOG: MAIN
  DEBUG_POST_SET: 0
condition: def:acl_m0
*2)   result: false
expanding: ${if def:acl_m0}
   result:
check condition = ${if def:acl_m0}
                =
defer: condition test failed


In line *1 $acl_m0 is "0", but check with def:acl_0 returns false (*2).

Exim spec says:
"The condition is true if the named expansion variable does not contain
the empty string, ..."

Regards,
Kupson