mirror of
https://github.com/mjl-/mox.git
synced 2024-12-26 08:23:48 +03:00
19550cc041
as the recent Go patch release showed, textproto.ReadMIMEHeaders is parsing http headers, strictly. too strict for email message headers. valid headers, e.g. with a slash in them, were rejected by textproto.ReadMIMEHeaders. the functions in Go's mail package handle RFC 2047 charset-encoded words in address headers. it can do that because we tell it those headers are addresses, where such encodings are valid. but that encoding isn't valid in all places in all headers. for other cases, we must decode explicitly, such as for the subject header. with this change, some messages that could not be parsed before can now be parsed (where headers were previously rejected for being invalid). and the subject of parsed messages could now be properly decoded. you could run "mox ensureparsed -all <account>" (while mox isn't running) to force reparsing all messages. mox needs a subcommand to reparse while running... it wasn't much of a problem before, because imap email clients typically do their own parsing (of headers, including subject decoding) again. but with the upcoming webmail client, any wrong parsing quickly reveals itself. |
||
---|---|---|
.. | ||
doc.go | ||
from.go | ||
headerwriter.go | ||
part.go | ||
part_test.go | ||
readheaders.go | ||
time.go | ||
todo.go | ||
writer.go | ||
writer_test.go |