From: Rocco Rutte <pdmef@gmx.net>
Date: Tue, 28 Apr 2009 11:05:40 +0000 (+0200)
Subject: Don't generate References: for reply to multiple messages
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f9ca2d43c64ff245b9dc595d1f0c311e6dc7cbe4;p=mutt

Don't generate References: for reply to multiple messages

All parent Message-Ids are present in In-Reply-To already.
Also, RfC2822, section 3.6.4 discourages its generation.
---

diff --git a/ChangeLog b/ChangeLog
index 64a4a1ce..3f8309c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2009-04-28 13:03 +0200  Rocco Rutte  <pdmef@gmx.net>  (86334b572057)
+
+	* sendlib.c: Don't trim In-Reply-To with $edit_headers set
+
+	In case of a tagged reply to several messages, we want In-Reply-To
+	to contain all parent Message-Ids.
+
+2009-04-28 11:17 +0200  Rocco Rutte  <pdmef@gmx.net>  (2012f37b7d64)
+
+	* ChangeLog, imap/imap.c: Only sync changed messages back to hcache on
+	mailbox sync
+
 2009-04-28 11:15 +0200  Rocco Rutte  <pdmef@gmx.net>  (c60ce9a3bae7)
 
 	* doc/manual.xml.head: For spam detection, mention $imap_headers.
diff --git a/send.c b/send.c
index 6bd61487..af91a6b2 100644
--- a/send.c
+++ b/send.c
@@ -675,6 +675,12 @@ mutt_make_reference_headers (ENVELOPE *curenv, ENVELOPE *env, CONTEXT *ctx)
   }
   else
     mutt_add_to_reference_headers (env, curenv, NULL, NULL);
+
+  /* if there's more than entry in In-Reply-To (i.e. message has
+     multiple parents), don't generate a References: header as it's
+     discouraged by RfC2822, sect. 3.6.4 */
+  if (ctx->tagged > 0 && env->in_reply_to && env->in_reply_to->next)
+    mutt_free_list (&env->references);
 }
 
 static int