nm4 2009/10/16 13:33:09 BST
Modified files:
exim-doc/doc-txt ChangeLog
exim-src/src header.c receive.c
Log:
prepend (not append) Resent-Message-ID and Resent-Date. fixes: #508
Revision Changes Path
1.571 +3 -0 exim/exim-doc/doc-txt/ChangeLog
1.7 +8 -1 exim/exim-src/src/header.c
1.50 +5 -3 exim/exim-src/src/receive.c
Index: ChangeLog
===================================================================
RCS file: /home/cvs/exim/exim-doc/doc-txt/ChangeLog,v
retrieving revision 1.570
retrieving revision 1.571
diff -u -r1.570 -r1.571
--- ChangeLog 16 Oct 2009 09:51:12 -0000 1.570
+++ ChangeLog 16 Oct 2009 12:33:09 -0000 1.571
@@ -1,4 +1,4 @@
-$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.570 2009/10/16 09:51:12 nm4 Exp $
+$Cambridge: exim/exim-doc/doc-txt/ChangeLog,v 1.571 2009/10/16 12:33:09 nm4 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
@@ -114,6 +114,9 @@
NM/21 Bugzilla 665: gnutls_compat_mode to allow compatibility with broken clients
Patch provided by Phil Pennock
+NM/22 Bugzilla 508: prepend (not append) Resent-Message-ID and Resent-Date
+ Patch provided by Brad "anomie" Jorsch
+
Exim version 4.69
-----------------
Index: header.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/header.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- header.c 8 Jan 2007 10:50:18 -0000 1.6
+++ header.c 16 Oct 2009 12:33:09 -0000 1.7
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/header.c,v 1.6 2007/01/08 10:50:18 ph10 Exp $ */
+/* $Cambridge: exim/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 @@
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;
}
}
Index: receive.c
===================================================================
RCS file: /home/cvs/exim/exim-src/src/receive.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -r1.49 -r1.50
--- receive.c 15 Oct 2009 13:49:43 -0000 1.49
+++ receive.c 16 Oct 2009 12:33:09 -0000 1.50
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/exim-src/src/receive.c,v 1.49 2009/10/15 13:49:43 tom Exp $ */
+/* $Cambridge: exim/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 @@
/* 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 @@
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 */