mox/message
Mechiel Lukkien 361bc2b516
when accepting an incoming message, turn any bare newlines (without carriage return) into crlf
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.
2023-11-21 13:19:54 +01:00
..
authresults.go implement dnssec-awareness throughout code, and dane for incoming/outgoing mail delivery 2023-10-10 12:09:35 +02:00
authresults_test.go add webmail 2023-08-07 21:57:03 +02:00
compose.go change the message composing code from webmail over to message.Composer too 2023-11-09 21:15:27 +01:00
doc.go mox! 2023-01-30 14:27:06 +01:00
from.go add strict mode when parsing messages, typically enabled for incoming special-use messages like tls/dmarc reports, subjectpass emails 2023-08-15 08:25:56 +02:00
hdrcmtdomain.go add webmail 2023-08-07 21:57:03 +02:00
headerwriter.go mox! 2023-01-30 14:27:06 +01:00
messageid.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
messageid_test.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
parseheaderfields.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
parseheaderfields_test.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
part.go when accepting an incoming message, turn any bare newlines (without carriage return) into crlf 2023-11-21 13:19:54 +01:00
part_test.go add strict mode when parsing messages, typically enabled for incoming special-use messages like tls/dmarc reports, subjectpass emails 2023-08-15 08:25:56 +02:00
qp.go add webmail 2023-08-07 21:57:03 +02:00
readheaders.go mox! 2023-01-30 14:27:06 +01:00
referencedids.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
referencedids_test.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
threadsubject.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
threadsubject_test.go implement message threading in backend and webmail 2023-09-13 15:44:57 +02:00
time.go tweak time format for added date headers 2023-06-04 21:04:10 +02:00
tlsrecv.go add webmail 2023-08-07 21:57:03 +02:00
todo.go mox! 2023-01-30 14:27:06 +01:00
writer.go when accepting an incoming message, turn any bare newlines (without carriage return) into crlf 2023-11-21 13:19:54 +01:00
writer_test.go when accepting an incoming message, turn any bare newlines (without carriage return) into crlf 2023-11-21 13:19:54 +01:00