summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/doc-txt/ChangeLog5
-rw-r--r--doc/doc-txt/NewStuff6
-rw-r--r--src/src/expand.c12
-rw-r--r--test/confs/00063
-rw-r--r--test/mail/0006.CALLER13
-rw-r--r--test/scripts/0000-Basic/00063
6 files changed, 35 insertions, 7 deletions
diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index d19dddad2..b5e0aa221 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.400 2006/10/02 13:38:17 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.401 2006/10/03 08:54:50 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -79,6 +79,9 @@ PH/12 Installed Andrey Panin's patch to add a dovecot authenticator. Various
interface. Fortunately there's a specification; I followed it and
changed what the client sends and it appears to be working now.
+PH/13 Added $message_headers_raw to provide the headers without RFC 2047
+ decoding.
+
Exim version 4.63
-----------------
diff --git a/doc/doc-txt/NewStuff b/doc/doc-txt/NewStuff
index d303864a4..8a509414b 100644
--- a/doc/doc-txt/NewStuff
+++ b/doc/doc-txt/NewStuff
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/NewStuff,v 1.113 2006/10/02 14:30:29 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/NewStuff,v 1.114 2006/10/03 08:54:50 ph10 Exp $
New Features in Exim
--------------------
@@ -72,6 +72,10 @@ Version 4.64
server_name = /var/run/dovecot/auth-client
server_setid = $auth1
+4. The variable $message_headers_raw provides a concatenation of all the
+ messages's headers without any decoding. This is in contrast to
+ $message_headers, which does RFC2047 encoding on the header contents.
+
Version 4.63
------------
diff --git a/src/src/expand.c b/src/src/expand.c
index b47a1bc12..fc4d63aad 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/expand.c,v 1.62 2006/09/19 14:31:07 ph10 Exp $ */
+/* $Cambridge: exim/src/src/expand.c,v 1.63 2006/10/03 08:54:50 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -274,7 +274,8 @@ enum {
vtype_stringptr, /* value is address of pointer to string */
vtype_msgbody, /* as stringptr, but read when first required */
vtype_msgbody_end, /* ditto, the end of the message */
- vtype_msgheaders, /* the message's headers */
+ vtype_msgheaders, /* the message's headers, processed */
+ vtype_msgheaders_raw, /* the message's headers, unprocessed */
vtype_localpart, /* extract local part from string */
vtype_domain, /* extract domain from string */
vtype_recipients, /* extract recipients from recipients list */
@@ -385,6 +386,7 @@ static var_entry var_table[] = {
{ "message_body_size", vtype_int, &message_body_size },
{ "message_exim_id", vtype_stringptr, &message_id },
{ "message_headers", vtype_msgheaders, NULL },
+ { "message_headers_raw", vtype_msgheaders_raw, NULL },
{ "message_id", vtype_stringptr, &message_id },
{ "message_linecount", vtype_int, &message_linecount },
{ "message_size", vtype_int, &message_size },
@@ -1078,7 +1080,8 @@ Arguments:
newsize return the size of memory block that was obtained; may be NULL
if exists_only is TRUE
want_raw TRUE if called for $rh_ or $rheader_ variables; no processing,
- other than concatenating, will be done on the header
+ other than concatenating, will be done on the header. Also used
+ for $message_headers_raw.
charset name of charset to translate MIME words to; used only if
want_raw is false; if NULL, no translation is done (this is
used for $bh_ and $bheader_)
@@ -1385,6 +1388,9 @@ while (last > first)
case vtype_msgheaders:
return find_header(NULL, exists_only, newsize, FALSE, NULL);
+ case vtype_msgheaders_raw:
+ return find_header(NULL, exists_only, newsize, TRUE, NULL);
+
case vtype_msgbody: /* Pointer to msgbody string */
case vtype_msgbody_end: /* Ditto, the end of the msg */
ss = (uschar **)(var_table[middle].value);
diff --git a/test/confs/0006 b/test/confs/0006
index d362deec3..59ecb0e2c 100644
--- a/test/confs/0006
+++ b/test/confs/0006
@@ -41,7 +41,8 @@ local_delivery:
envelope_to_add
file = DIR/test-mail/$local_part
return_path_add
- headers_add = \nMessage Headers:\n$message_headers\n
+ headers_add = \nMessage Headers:\n$message_headers\n\
+ \nRaw Message Headers:\n$message_headers_raw\n
address_file:
driver = appendfile
diff --git a/test/mail/0006.CALLER b/test/mail/0006.CALLER
index 76aac583a..627bc16bc 100644
--- a/test/mail/0006.CALLER
+++ b/test/mail/0006.CALLER
@@ -7,6 +7,7 @@ Received: from CALLER by the.local.host.name with local-bsmtp (Exim x.yz)
id 10HmaZ-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
From:<someone@some.where>
To: Recipients not given:;
+X-Test: (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)
Message-Id: <E10HmaZ-0005vi-00@the.local.host.name>
Date: Tue, 2 Mar 1999 09:44:33 +0000
@@ -16,8 +17,20 @@ Received: from CALLER by the.local.host.name with local-bsmtp (Exim x.yz)
id 10HmaZ-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
From:<someone@some.where>
To: Recipients not given:;
+X-Test: (םולש ןב ילטפנ)
Message-Id: <E10HmaZ-0005vi-00@the.local.host.name>
Date: Tue, 2 Mar 1999 09:44:33 +0000
+Raw Message Headers:
+Received: from CALLER by the.local.host.name with local-bsmtp (Exim x.yz)
+ (envelope-from <someone@some.where>)
+ id 10HmaZ-0005vi-00; Tue, 2 Mar 1999 09:44:33 +0000
+From:<someone@some.where>
+To: Recipients not given:;
+X-Test: (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)
+Message-Id: <E10HmaZ-0005vi-00@the.local.host.name>
+Date: Tue, 2 Mar 1999 09:44:33 +0000
+
+
Yet more text.
diff --git a/test/scripts/0000-Basic/0006 b/test/scripts/0000-Basic/0006
index 6db44fbb6..4df0d1293 100644
--- a/test/scripts/0000-Basic/0006
+++ b/test/scripts/0000-Basic/0006
@@ -1,4 +1,4 @@
-# -bS to several local deliveries
+# -bS to several local deliveries and $message_headers[_raw]
exim -bS -odi
mail from:someone@some.where
rcpt to:blackhole@HOSTNAME
@@ -22,6 +22,7 @@ rcpt to:blackhole@HOSTNAME
DATA
From:<someone@some.where>
To: Recipients not given:;
+X-Test: (=?iso-8859-8?b?7eXs+SDv4SDp7Oj08A==?=)
Yet more text.
.