[exim-dev] [Bug 1518] New: router condition silently ignored…

Góra strony
Delete this message
Reply to this message
Autor: PP
Data:  
Dla: exim-dev
Temat: [exim-dev] [Bug 1518] New: router condition silently ignored if too many back braces
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=1518
           Summary: router condition silently ignored if too many back
                    braces
           Product: Exim
           Version: 4.76
          Platform: x86-64
        OS/Version: Linux
            Status: NEW
          Severity: bug
          Priority: high
         Component: Routing
        AssignedTo: nigel@???
        ReportedBy: bugzilla@???
                CC: exim-dev@???



Created an attachment (id=747)
--> (http://bugs.exim.org/attachment.cgi?id=747)
Basic configuration for Exim that should trigger a silent fail/ignore of router
condition

If I construct a router and give it a condition with more back-curly-braces
than forward-curly-braces then Exim ignores that condition (assumes condition
succeeds) without any warning or failure.

e.g.

    dnslookup:
      driver = dnslookup
      condition = ${if eq {${lc:$domain}} {google.com}} {yes} {no}}
      transport = remote_smtp


If I test this with a condition that SHOULD fail (test@???):

    # exim -C test2.conf -d -bt test@???
    Considering test@???
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    routing test@???
    --------> dnslookup router <--------
    checking "condition"
    calling dnslookup router


However if I fix my condition line with correct brace balance:

      condition = ${if eq {${lc:$domain}} {google.com} {yes} {no}}


and re-test:

    # exim -C test2.conf -d -bt test@???
    Considering test@???
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    routing test@???
    --------> dnslookup router <--------
    checking "condition"
    dnslookup router skipped: condition failure


This is correct behaviour.

Note that the silent fail also occurs with the following condition lines:

      condition = ${if eq {${lc:$domain}} {google.com}}}} {yes} {no}}


and

      condition = ${if eq {${lc:$domain}} {google.com} {yes} {no}} \
        }


Pretty dangerous consider that users may never discover this issue unless a
customer complains e-mail is never being delivered!

I think silent fails are severe and am proposing this has a priority of high. I
know that, as a system administrator, this has the potential to cause major
trouble.

Attaching test2.conf - a basic configuration to trigger this error.


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email