imapclient: fails to parse IMAP4rev1 BODYSTRUCTURE response for message/global
- Dominant language
- Go
- Stars
- 2.3k
- Forks
- 360
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 1
Description
The BODYSTRUCTURE response for a message/global attachment is different in IMAP4rev1 and IMAP4rev2.
In rev2, message/global is treated like message/rfc822. The BODYSTRUCTURE response includes the envelope, bodystructure, and number of lines of the embedded message. But rev1 treats message/global as an opaque attachment and does not include those items.
The imapclient package assumes that a message/global BODYSTRUCTURE response will include those items, and fails to parse the response from a rev1 server (or from Dovecot, which mostly follows rev2, but doesn't in this case).
Contributor guide
Research direction
No file or test is named in the issue. Locate the BODYSTRUCTURE parsing entry point and existing message/global or message/rfc822 tests, then compare the IMAP4rev1 and IMAP4rev2 response shapes; done means both forms parse without failure and regression coverage distinguishes their optional fields.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100