summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNigel Metheringham <nigel@exim.org>2009-10-16 12:33:09 +0000
committerNigel Metheringham <nigel@exim.org>2009-10-16 12:33:09 +0000
commit5eb690a173fdc71d5326c05a2a6a9d87d159187a (patch)
treee9e53ef4e9f7d4d8cdca9593d7038f265cc337c3 /src
parentcf1ef1a94d235f4bf3a1585fa0e0920b8f409af6 (diff)
prepend (not append) Resent-Message-ID and Resent-Date. fixes: #508
Diffstat (limited to 'src')
-rw-r--r--src/src/header.c11
-rw-r--r--src/src/receive.c10
2 files changed, 15 insertions, 6 deletions
diff --git a/src/src/header.c b/src/src/header.c
index 1186dd938..dea5fbe65 100644
--- a/src/src/header.c
+++ b/src/src/header.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/header.c,v 1.6 2007/01/08 10:50:18 ph10 Exp $ */
+/* $Cambridge: exim/src/src/header.c,v 1.7 2009/10/16 12:33:09 nm4 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -118,7 +118,14 @@ if (name == NULL)
else
{
hptr = &header_list;
- h = header_list;
+
+ /* header_list->text can be NULL if we get here between when the new
+ received header is allocated and when it is acutally filled in. We want
+ that header to be first, so skip it for now. */
+
+ if (header_list->text == NULL)
+ hptr = &header_list->next;
+ h = *hptr;
}
}
diff --git a/src/src/receive.c b/src/src/receive.c
index 0cc8832c3..3c307b07b 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/receive.c,v 1.49 2009/10/15 13:49:43 tom Exp $ */
+/* $Cambridge: exim/src/src/receive.c,v 1.50 2009/10/16 12:33:09 nm4 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
@@ -2337,8 +2337,9 @@ if (msgid_header == NULL &&
/* Add the header line */
- header_add(htype_id, "%sMessage-Id: <%s%s%s@%s>\n", resent_prefix,
- message_id_external, (*id_text == 0)? "" : ".", id_text, id_domain);
+ header_add_at_position(FALSE, NULL, FALSE, htype_id,
+ "%sMessage-Id: <%s%s%s@%s>\n", resent_prefix, message_id_external,
+ (*id_text == 0)? "" : ".", id_text, id_domain);
}
/* If we are to log recipients, keep a copy of the raw ones before any possible
@@ -2608,7 +2609,8 @@ to be more confusing if Exim adds one to all remotely-originated messages. */
if (!date_header_exists &&
((sender_host_address == NULL && !suppress_local_fixups)
|| submission_mode))
- header_add(htype_other, "%sDate: %s\n", resent_prefix, tod_stamp(tod_full));
+ header_add_at_position(FALSE, NULL, FALSE, htype_other, "%sDate: %s\n",
+ resent_prefix, tod_stamp(tod_full));
search_tidyup(); /* Free any cached resources */