Re: [PATCH] Remove double newline between headers and multipart body.

"Kevin J. McCarthy" <[email protected]>
Newsgroups gmane.mail.mutt.devel
Message-ID <adRG2uEJ_ErWW19l@qinghai>
On Mon, Apr 06, 2026 at 05:59:23PM -0400, Derek Martin wrote:
>On Mon, Apr 06, 2026 at 02:38:34PM +0800, Kevin J. McCarthy wrote:
>> I've added comments around the change, to hopefully make it clear why 
>> the change was made to long standing behavior in mutt.

Thanks for replying Derek!  I was hoping some old-timers would chime in 
for this kind of change.

>I don't quite find the intent clear from the comments... is the issue 
>ONLY that there's an extra line between the message headers and the 
>first multipart boundary?

Yes, that is correct.

>If so, I think the change is fine, but totally unnecessary.

Okay.  The ticket submitter was forthright that he did not believe there 
was a bug in mutt, and that RFC 2046's BNF showed the initial "extra" 
newline was attached to the delimiter.

The issue was that an MTA along the way was "helpfully" removing the 
unneeded extra line from his email, and in doing so, invalidating his 
DKIM signature.

Given that we're well past the time where non-MIME mail readers are in 
use, and that none of the "big" mail generators are adding the extra 
line anymore, he asked if Mutt would consider removing it too.

>In a multi-part message, the bits that immediately follow the message 
>headers are the "preamble" section of the message.  This part exists so 
>that if your (very ancient) mail reader doesn't know how to handle 
>multi-part messages, the sender can put a message there to inform you 
>that you are an antiquated fart (or at least your mail reader is).  Any 
>mail reader which understands multipart messages should ignore all text 
>(even just an extra blank line) between the messge headers and the 
>first multi-part boundary.  See e.g. RFC 2049, Appendix A, and also RFC 
>2096 section 5.1.1.  That would not be a bug per se (i.e. that behavior 
>is allowed and has no effect on modern MUAs), except perhaps that the 
>message contains an extra superfluous CRLF pair.  Note that the message 
>parts should NOT end with an extra EoL which was not part of the 
>message part.

This is great, especially the example in 2049 Appendix A.

-- 
Kevin J. McCarthy
GPG Fingerprint: 8975 A9B3 3AA3 7910 385C  5308 ADEF 7684 8031 6BDA
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEiXWpszqjeRA4XFMIre92hIAxa9oFAmnURtoACgkQre92hIAx
a9rXuhAAjxper4DV7UyUPdF9SdK1N0dnIeIYQ/GebQqkJr5v3edpyFAxepK6QdsD
MuV80shU3edBFE2x3pyjR5oYklJfoeHNk+1j7E1bSwnqR7lH/oUXbppmrSz1+0XO
iMwW7Yz9wJGI3LpU6FYqR5jhUkuwMg/MeaBpyhgkhM/vw5tY0PbUL5A3Urbefnaz
jdw1j3wdQkEvHKN/K5buwyznk/6bZ2DwS40bPOnbz6XYSX63ytKCXuHGwnWfJ/1W
okrorPNIO00pXCMRCAYR60GT1O43ApWy0m5b45HgMY0sjTl2zz9JxYQA/b22Evjk
kQJYFZcsLbMIYVmnzbyO0rSkfYJjgH6NG3Q8aC6qqOvueDGRp8GOgfKcKxzAZBUJ
hx4OkktFln5KoOY5WZUj0Yl3xB3GQhFWPyqiDrdNuesPaqPV3w3QCzm1+h/6U0xq
viXjCqcJU81rR2FS0zcUDay/TcQA4z5kY97/z9/XkrQOvOcInJ8toe49SAdS7Ys9
U7otuXmyHS4ePQNDpaGGcRkVPW9Vdcq1s23rbAzArZbn5EsZQr9yNzrpY7N2YYxS
ZsXU1WWWXgkJO7/GR/3GnnVR3o7r8/z9OGSHQN1QRgQe86Clnvr3OE8t3FZFGoOz
xhZlW/XZPetZ/UPirzeDQLnCRw6XTdwnUZfmyO5yqD3vvVgEV8c=
=WtRl
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.