On 2025-01-25 at 15:53:28 UTC-0500 (25 Jan 2025 15:53:28 -0500)
John Levine via mailop <[email protected]>
is rumored to have said:

It appears that Bill Cole via mailop <[email protected]> said:
On 2025-01-25 at 13:36:52 UTC-0500 (Sat, 25 Jan 2025 19:36:52 +0100)
Carsten Schiefner via mailop <[email protected]>
is rumored to have said:

Dear all -

my understanding of section 2.3. "Body" of RFC 5322 "Internet Message Format" (https://datatracker.ietf.org/doc/html/rfc5322#section-2.3)
is that a sole 0x0a as the body is sufficient and fully RFC compliant: is this correct?

Yes.

Sorry, no, the CR (0x0d) in front of the LF (0x0a) is mandatory. But you don't need anything after that.

Pedantry: Dovecot stores linebreaks as LF-only, as does Apple Mail and every other MUA I've seen on any modern Apple OS.

My assumption was that Carsten was referring to stored mail which one might examine easily before sending or after receiving, not IMAP wire traffic which requires at least a sniffer and (outside of a lab) access to server TLS keys. Actual bare LFs in SMTP, LMTP, and IMAP wire traffic break MUAs and MTAs in ways that I'd expect that to be noisier than the failure described.

So one should read my answer assuming that I read his references to 0x0a as meaning logical linebreaks, to avoid writing a lecture on the subtleties of linebreaks in moving email vs stored text.

Reason why I am asking is that have come across a strange behaviour of the iOS 16.7.10 Mail App: an email with an empty body - i.e. with
just a sole 0x0a - will briefly pop up in the overview and then quickly disappears again. If it shows up at all...

If it really just has an LF rather than CR LF that suggests your IMAP server is misconfigured.

Right, but that's not the problem.

One can send a headers-only message, which should end in a blank line (CRLFCRLF on the wire, LFLF on disk) but I don't think any MTA or Dovecot will object if it is missing the terminal linebreak. I would not be shocked if a MUA that has to present a message chokes on one without that second linebreak, because that is pathological. It is a bit more troubling if iOS mail is choking on a message consisting of a properly terminated header block and a null body.




--
 Bill Cole
 [email protected] or [email protected]
(AKA @[email protected] and many *@billmail.scconsult.com addresses)
 Not Currently Available For Hire
_______________________________________________
mailop mailing list
[email protected]
https://list.mailop.org/listinfo/mailop

Reply via email to