mirror of
https://github.com/mjl-/mox.git
synced 2025-06-28 01:48:15 +03:00

because that is what most of the code expects. we could work around having bare lf, but it would complicate too much code. currently, a message with bare lf is accepted (in smtpserver delivery, imapserver append, etc), but when an imap session would try to fetch parsed parts, that would fail because and even cause a imapserver panic (closing the connection). in message imports we would already convert bare lf to crlf (because it is expected those messages are all lf-only-ending). we store messages with crlf-ending instead of lf-ending so the imapserver has all correct information at hand (line counts, byte counts). found by using emclient with mox. it adds a message to the inbox that can have mixed crlf and bare lf line endings in a few header fields (in some localization, emclient authors explained how that happened, thanks!). we can now convert those lines and read those messages over imap. emclient already switched to all-crlf line endings in newer (development) versions.