From 362145b5072e8d863d74c4fed8d7c1377c783b87 Mon Sep 17 00:00:00 2001 From: Jeremy Harris Date: Thu, 4 Oct 2012 23:05:04 +0100 Subject: Add expansion variable $headers_added returning newline-sep list of headers added in ACLs. Bug 199. --- doc/doc-docbook/spec.xfpt | 12 +++++++++++- doc/doc-txt/ChangeLog | 4 ++++ doc/doc-txt/NewStuff | 3 +++ 3 files changed, 18 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 5961c4bd4..4ba31a0ce 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -11063,6 +11063,12 @@ inserting the message header line with the given name. Note that the name must be terminated by colon or white space, because it may contain a wide variety of characters. Note also that braces must &'not'& be used. +.vitem &$headers_added$& +.vindex "&$headers_added$&" +Within an ACL this variable contains the headers added so far by +the ACL modifier add_header (section &<>&). +The headers are a newline-separated list. + .vitem &$home$& .vindex "&$home$&" When the &%check_local_user%& option is set for a router, the user's home @@ -27340,7 +27346,9 @@ message is rejected after DATA or by the non-SMTP ACL, all added header lines are included in the entry that is written to the reject log. .cindex "header lines" "added; visibility of" -Header lines are not visible in string expansions until they are added to the +Header lines are not visible in string expansions +of message headers +until they are added to the message. It follows that header lines defined in the MAIL, RCPT, and predata ACLs are not visible until the DATA ACL and MIME ACLs are run. Similarly, header lines that are added by the DATA or MIME ACLs are not visible in those @@ -27349,6 +27357,8 @@ passing data between (for example) the MAIL and RCPT ACLs. If you want to do this, you can use ACL variables, as described in section &<>&. +The list of headers yet to be added is given by the &%$headers_added%& variable. + The &%add_header%& modifier acts immediately as it is encountered during the processing of an ACL. Notice the difference between these two cases: .display diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index 6e91c1070..84948f6ac 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -74,6 +74,10 @@ JH/07 Avoid using a waiting database for a single-message-only transport. JH/08 Strip leading/trailing newlines from add_header ACL modifier data. Bugzilla 884. +JH/09 Add $headers_added variable, with content from use of ACL modifier + add_header (but not yet added to the message). Bugzilla 199. + + Exim version 4.80 ----------------- diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff index ccf2dc63a..680d96cd1 100644 --- a/doc/doc-txt/NewStuff +++ b/doc/doc-txt/NewStuff @@ -115,6 +115,9 @@ Version 4.81 13. New dnsdb lookup pseudo-type "a+". A sequence of "a6" (if configured), "aaaa" and "a" lookups is done and the full set of results returned. +14. New expansion variable $headers_added with content from ACL add_header + modifier (but not yet added to messsage). + Version 4.80 ------------ -- cgit v1.2.3