[PATCH] lib-imap: imap-bodystructure: add test with empty header field
Timo Sirainen
timo at sirainen.com
Tue Mar 3 22:00:14 EET 2020
On 3. Mar 2020, at 20.38, Simon Ser <contact at emersion.fr> wrote:
>
> This causes the body structure to be incorrect. The RFC says it's fine o
> have empty header field values.
The problem isn't empty header field. It's that the mail is missing Mime-Version header. If that doesn't exist, then the Content-* headers can be ignored. But because there are so many broken mails, Dovecot also allows it to be missing as long as there is Content-Type header. Your test mail has neither of these headers. It's arguable that Dovecot should parse Content-* headers regardless of other headers, but I don't think the current code is violating any RFCs.
More information about the dovecot
mailing list