[exim-cvs] DMARC: Avoid using Resent-From: header. Bug 3029

Página Inicial
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Para: exim-cvs
Assunto: [exim-cvs] DMARC: Avoid using Resent-From: header. Bug 3029
Gitweb: https://git.exim.org/exim.git/commitdiff/8a5d7421f117c332c90b94bfd6f50ca71494d705
Commit:     8a5d7421f117c332c90b94bfd6f50ca71494d705
Parent:     86e5b23559e50f107620aefeb52f4a856f988421
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Wed Apr 10 17:10:05 2024 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Wed Apr 10 17:10:05 2024 +0100


    DMARC: Avoid using Resent-From: header.  Bug 3029
---
 doc/doc-txt/ChangeLog |  2 ++
 src/src/receive.c     | 20 +++++++++++++-------
 2 files changed, 15 insertions(+), 7 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index e7f70713d..af4678913 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -148,6 +148,8 @@ JH/28 Bug 3086: Fix exinext for ipv6.  Change the format of keys in the retry
 JH/29 Bug 3087: Fix SRS encode.  A zero-length quoted element in the local-part
       would cause a crash.


+JH/30 Bug 3029: Avoid feeding Resent-From: to DMARC.
+

Exim version 4.97
-----------------
diff --git a/src/src/receive.c b/src/src/receive.c
index 9dbf45df9..9fae6ad60 100644
--- a/src/src/receive.c
+++ b/src/src/receive.c
@@ -1748,7 +1748,7 @@ uschar *user_msg, *log_msg;
/* Working header pointers */

rmark reset_point;
-header_line *next;
+header_line * next;

/* Flags for noting the existence of certain headers (only one left) */

@@ -1756,15 +1756,16 @@ BOOL date_header_exists = FALSE;

/* Pointers to receive the addresses of headers whose contents we need. */

-header_line *from_header = NULL;
-header_line *subject_header = NULL;
-header_line *msgid_header = NULL;
-header_line *received_header;
+header_line * from_header = NULL;
+#ifdef SUPPORT_DMARC
+header_line * dmarc_from_header = NULL;
+#endif
+header_line * subject_header = NULL, * msgid_header = NULL, * received_header;
BOOL msgid_header_newly_created = FALSE;

/* Variables for use when building the Received: header. */

-uschar *timestamp;
+uschar * timestamp;
int tslen;

/* Time of creation of message_id */
@@ -2446,6 +2447,9 @@ for (header_line * h = header_list->next; h; h = h->next)

     case htype_from:
       h->type = htype_from;
+#ifdef SUPPORT_DMARC
+      if (!is_resent) dmarc_from_header = h;
+#endif
       if (!resents_exist || is_resent)
     {
     from_header = h;
@@ -3619,7 +3623,7 @@ else
 #endif /* WITH_CONTENT_SCAN */


 #ifdef SUPPORT_DMARC
-    dmarc_store_data(from_header);
+    dmarc_store_data(dmarc_from_header);
 #endif


#ifndef DISABLE_PRDR
@@ -4622,3 +4626,5 @@ return yield; /* TRUE if more messages (SMTP only) */
}

/* End of receive.c */
+/* vi: se aw ai sw=2
+*/

--
## subscription configuration (requires account):
## https://lists.exim.org/mailman3/postorius/lists/exim-cvs.lists.exim.org/
## unsubscribe (doesn't require an account):
## exim-cvs-unsubscribe@???
## Exim details at http://www.exim.org/
## Please use the Wiki with this list - http://wiki.exim.org/