Skip to content

fix(imap-codec): Mail.ru FETCH interop (quoted empty, NIL body-fld-param)#701

Closed
FreakyStudio wants to merge 3 commits intoduesee:mainfrom
FreakyStudio:fix/mailru-interop-700
Closed

fix(imap-codec): Mail.ru FETCH interop (quoted empty, NIL body-fld-param)#701
FreakyStudio wants to merge 3 commits intoduesee:mainfrom
FreakyStudio:fix/mailru-interop-700

Conversation

@FreakyStudio
Copy link
Copy Markdown

Closes #700.

Changes

  • quoted() — Parse empty quoted strings ("") per RFC 3501 *QUOTED-CHAR, fixing envelope addresses from Mail.ru.
  • quirk_body_fld_param_nil_value (default quirk feature) — Allow NIL as the value in body-fld-param pairs, e.g. ("boundary" NIL) in BODYSTRUCTURE.
  • Tests — Minimal FETCH repro; integration test + binary fixture for a real nested multipart/mixedmultipart/alternative line; fetch unit tests slicing envelope vs BODYSTRUCTURE; response parses full line.

Notes

  • Ran cargo +nightly fmt and cargo test under imap-codec/.

Maintainers: happy to drop or shrink the binary fixture if you prefer a purely concat!-based line.

…ram)

Accept empty quoted strings in addresses; quirk for NIL in body-fld-param pairs; regression tests and fixture. Fixes duesee#700.

Made-with: Cursor
- Add .gitattributes binary for wire fixture so Unix checkouts keep CRLF.

- Replace len-2 chop with testing::trim_line_end for substring tests.

- Assert CRLF on full-line decode tests; register quirk in justfile cargo hack.

Made-with: Cursor
Git can store the capture as LF-only; strict IMAP parsers need CRLF.

Made-with: Cursor
@coveralls
Copy link
Copy Markdown
Collaborator

Pull Request Test Coverage Report for Build 23582211110

Details

  • 75 of 79 (94.94%) changed or added relevant lines in 5 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.02%) to 91.342%

Changes Missing Coverage Covered Lines Changed/Added Lines %
imap-codec/src/response.rs 8 9 88.89%
imap-codec/src/testing.rs 13 14 92.86%
imap-codec/src/fetch.rs 27 29 93.1%
Totals Coverage Status
Change from base Build 22237476694: 0.02%
Covered Lines: 10624
Relevant Lines: 11631

💛 - Coveralls

@duesee
Copy link
Copy Markdown
Owner

duesee commented Mar 26, 2026

Nope, sorry. Too much code that feels LLM-generated. Not going to review. Also: My motivation to spend energy on mail.ru is quite low. If you can pinpoint exactly what is the problem with reproducers and a PR that is easy to review, I'll merge it. Otherwise not going to spend time on this.

@duesee duesee closed this Mar 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Interoperability: Mail.ru FETCH parsing failures (Himalaya / real IMAP)

3 participants