<<< Date Index >>>     <<< Thread Index >>>

[PATCH] Disable line wrapping for Message-ID header



Hello,

Presently mutt wraps the Message-ID header to 76 characters in
outgoing mail messages.  This is incorrect behaviour as it will
result in whitespace appearing in the middle of message IDs longer
than 62 characters.  Such a header is not RFC 2822 compliant, and
will not match the unwrapped ID.  This is mainly an issue for long
externally generated message IDs, for example those within patch
emails generated by "git format-patch --thread".  The attached patch
turns off line wrapping for the Message-ID header.

Thanks,
-- 
Peter
# HG changeset patch
# User Peter Collingbourne <peter@xxxxxxxxx>
# Date 1227662107 0
# Branch HEAD
# Node ID 9359de5a3c801ae2c8f29e620f83ea2b8ce665f5
# Parent  fd555f9fcb031a1ca18b6a56c4a45fd382220951
Disable line wrapping for Message-ID header

diff -r fd555f9fcb03 -r 9359de5a3c80 sendlib.c
--- a/sendlib.c Mon Nov 24 11:44:40 2008 -0800
+++ b/sendlib.c Wed Nov 26 01:15:07 2008 +0000
@@ -1802,7 +1802,7 @@
 
   /* save message id if the user has set it */
   if (env->message_id && !privacy)
-    mutt_write_one_header (fp, "Message-ID", env->message_id, NULL, 0);
+    fprintf (fp, "Message-ID: %s\n", env->message_id);
 
   if (env->reply_to)
   {

Attachment: signature.asc
Description: Digital signature