An IMAP server tells the number of lines in a message using the body-fld-lines ABNF rule:
body-fld-lines = number
number = 1*DIGIT
; Unsigned 32-bit integer
; (0 <= n < 4,294,967,296)
According to the standard, negative values are not allowed. Still, Dovecot was observed sending -1 breaking parsing.
Observed in: Exchange/Dovecot (unknown)
Reported: No
Status: Unknown
Comment: Also see https://github.com/emersion/go-imap/issues/534
Proposed solution(s):
Accept -1, emit warning, and rectify to 0 (implemented in [imap-codec](https://github.com/duesee/imap-codec))
An IMAP server tells the number of lines in a message using the
body-fld-lines
ABNF rule:According to the standard, negative values are not allowed. Still, Dovecot was observed sending -1 breaking parsing.