Mailing List Archive

[Bug 472] "require" ACL verb is order-sensitive, while it shouldn't
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=472


holmgren@lysator.liu.se changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID




------- Comment #1 from holmgren@lysator.liu.se 2007-02-14 17:31 -------
This is pretty well explained in the specification, section 40.17 to be exact:

"The positioning of the modifiers in an ACL statement important, because the
processing of a verb ceases as soon as its outcome is known. Only those
modifiers that have already been encountered will take effect." This is
followed by an example of exactly this.

So, as soon as a condition of a require statement has failed, Exim stops
processing the ACL and "deny" is returned. Although it may be a bit confusing,
I don't think it's a big problem. If it helps, you can put message modifiers
first in deny statements as well for consistency.

The change you're suggesting is unfortunately incompatible, as the same example
demonstrates; suddenly the last two messages would be used, while the first one
would never be used.

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

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 472] "require" ACL verb is order-sensitive, while it shouldn't [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=472





------- Comment #2 from w@wrzask.pl 2007-02-14 17:47 -------
Well, yeah, it starts making sense. But, could you then add a notion in the
"ACL verbs" section that "require" behaves in this way (or just a link to
40.17)? It may be slightly confusing to someone, as it was to me.

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

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##
[Bug 472] "require" ACL verb is order-sensitive, while it shouldn't [ In reply to ]
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=472





------- Comment #3 from anomie@users.sourceforge.net 2007-02-15 15:08 -------
On Wed, Feb 14, 2007 at 05:47:39PM +0000, w@wrzask.pl wrote:
>
> Well, yeah, it starts making sense. But, could you then add a notion in the
> "ACL verbs" section that "require" behaves in this way (or just a link to
> 40.17)? It may be slightly confusing to someone, as it was to me.

It's not so much that "'require' behaves in this way" as it is that
require exposes the common behavior more readily. You can see it with
any verb using something with side effects, e.g. set or logwrite. For
example, to look up the country of the client by their IP address and
default to '??' if the country is not known:

warn set acl_c0 = ??
dnslists = zz.countries.nerd.dk
set acl_c0 = ${uc:$dnslist_text}

The seconds 'set' will only be executed if the dnslists condition
passes.

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

--
## List details at http://www.exim.org/mailman/listinfo/exim-dev Exim details at http://www.exim.org/ ##