Sync fork with current imap-proto main - #1
Draft
gabeosx wants to merge 17 commits into
Draft
Conversation
Real-world IMAP servers (Dovecot, Cyrus) regularly emit 8-bit bytes in
BODYSTRUCTURE responses — typically MIME filenames in non-UTF-8
encodings like Latin-1 or ISO-8859-9 (e.g. Turkish "Görüntü1.png" from
Outlook). The strict 7-bit ASCII parser rejected these, breaking the
parse of a single bad mail and desyncing the entire bulk fetch
stream.
Two changes:
1. `is_char` now accepts any non-NUL byte instead of only US-ASCII.
Real-world server behavior, and RFC 6855 / IMAP4rev2 (RFC 9051)
formally allow UTF-8 in these positions.
2. The `*_utf8` parser functions (`string_utf8`, `nstring_utf8`,
`astring_utf8`, `quoted_utf8`, `text`) now use
`String::from_utf8_lossy` and return `Cow<'_, str>`, falling back
to lossy decoding when bytes are not valid UTF-8 instead of
failing the entire parse.
Callers that previously wrapped `&str` results in `Cow::Borrowed`
have been simplified to take the `Cow<'_, str>` directly. Tests
updated to match the new return types.
Adds a regression test (`test_body_structure_with_8bit_literal_filename`)
that reproduces the original failure: a BODYSTRUCTURE with
`("name" {8}\r\nGörüntü1)` (Turkish filename in Latin-1) now parses
successfully via lossy decoding.
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 6 to 7. - [Release notes](https://github.com/codecov/codecov-action/releases) - [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md) - [Commits](codecov/codecov-action@v6...v7) --- updated-dependencies: - dependency-name: codecov/codecov-action dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/checkout](https://github.com/actions/checkout) from 6 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](actions/checkout@v6...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Bring
rustmailer/tokio-imapup to the currentdjc/imap-protomainhistory.
The Rustmailer fork is 17 commits behind its parent and has no fork-only
commits, so this is a clean fast-forward from
b71fcba772ececaf2e5afdfc6e8fcdec171bf671to9271e64059d905a09e1fa9a38bc0d8bfb237c875.Why this is separate
This is the first dependency step for rustmailer/bichon#333. Keeping the fork
update separate prevents the UIDONLY parser PR from mixing 17 upstream
maintenance commits into its feature review.
Verification
cargo fmt --all -- --checkcargo test --all-features: 90 passedcargo clippy --all-targets -- -D warningsFollow-up
The UIDONLY parser support is #2, based on this branch.