From: Philip Hazel Date: Wed, 6 Apr 2005 14:03:53 +0000 (+0000) Subject: Make $acl_verify_message available in following conditions and modifiers X-Git-Tag: exim-4_51~24 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/475fe28a6a039803d280266e29e755a603d1dfe7 Make $acl_verify_message available in following conditions and modifiers in an ACL statement, not just when expanding message and log_message. --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index db1162f26..8f648575b 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.113 2005/04/06 10:53:47 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.114 2005/04/06 14:03:53 ph10 Exp $ Change log file for Exim from version 4.21 ------------------------------------------- @@ -158,6 +158,16 @@ PH/26 Change scripts/os-type so that when "uname -s" returns just "GNU", the answer is "GNU", and only if the return is "GNU/something" is the answer "Linux". +PH/27 $acl_verify_message is now set immediately after the failure of a + verification in an ACL, and so is available in subsequent modifiers. In + particular, the message can be preserved by coding like this: + + warn !verify = sender + set acl_m0 = $acl_verify_message + + Previously, $acl_verify_message was set only while expanding "message" + and "log_message" when a very denied access. + A note about Exim versions 4.44 and 4.50 ---------------------------------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index b2563f30c..4a2739188 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -1,4 +1,4 @@ -$Cambridge: exim/doc/doc-txt/NewStuff,v 1.33 2005/04/05 13:58:34 ph10 Exp $ +$Cambridge: exim/doc/doc-txt/NewStuff,v 1.34 2005/04/06 14:03:53 ph10 Exp $ New Features in Exim -------------------- @@ -130,6 +130,17 @@ PH/06 Macros may now be defined or redefined between router, transport, driver or ACL, or in the local_scan, retry, or rewrite sections of the configuration. +PH/07 $acl_verify_message is now set immediately after the failure of a + verification in an ACL, and so is available in subsequent modifiers. In + particular, the message can be preserved by coding like this: + + warn !verify = sender + set acl_m0 = $acl_verify_message + + Previously, $acl_verify_message was set only while expanding "message" + and "log_message" when a very denied access. + + Version 4.50 ------------ diff --git a/src/src/acl.c b/src/src/acl.c index 1d20ff7c7..c0a5e944f 100644 --- a/src/src/acl.c +++ b/src/src/acl.c @@ -1,4 +1,4 @@ -/* $Cambridge: exim/src/src/acl.c,v 1.27 2005/04/05 13:58:35 ph10 Exp $ */ +/* $Cambridge: exim/src/src/acl.c,v 1.28 2005/04/06 14:03:53 ph10 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * @@ -2099,10 +2099,13 @@ for (; cb != NULL; cb = cb->next) /* If the verb is WARN, discard any user message from verification, because such messages are SMTP responses, not header additions. The latter come - only from explicit "message" modifiers. */ + only from explicit "message" modifiers. However, put the user message into + $acl_verify_message so it can be used in subsequent conditions or modifiers + (until something changes it). */ case ACLC_VERIFY: rc = acl_verify(where, addr, arg, user_msgptr, log_msgptr, basic_errno); + acl_verify_message = *user_msgptr; if (verb == ACL_WARN) *user_msgptr = NULL; break;