Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: IMAP COMPRESS support #5990

Merged
merged 1 commit into from
Oct 14, 2024
Merged

feat: IMAP COMPRESS support #5990

merged 1 commit into from
Oct 14, 2024

Conversation

link2xt
Copy link
Collaborator

@link2xt link2xt commented Sep 23, 2024

@link2xt
Copy link
Collaborator Author

link2xt commented Sep 23, 2024

Something definitely works, but decoder keeps getting stuck.

I am tracing asncy_imap and get messages like this:

2024-09-23T03:38:43.788064Z TRACE async_imap::imap_stream: decode: input: Ok("* 11271 FETCH (UID 250014 INTERNALDATE \"23-Sep-2024 04:24:12 +0200\" RFC822.SIZE 22865 BODY[HEADER.FIELDS (MESSAGE-ID DATE X-MICROSOFT-ORIGINAL-MESSAGE-ID FROM IN-REPLY-TO REFERENCES CHAT-VERSION AUTO-SUBMITTED AUTOCRYPT-SETUP-MESSAGE)] {324}\r\nFrom: <[email protected]>\r\nDate: Mon, 23 Sep 2024 02:24:11 +0000\r\nMessage-ID: <3SkbaovObwp1qWhhfy0Op4So@localhost>\r\nIn-Reply-To: <Mr.e4JP0X8GV7p.v-yvcn-VsLC@localhost>\r\nReferences: <Mr.Uime8r9-t1g.Q7Ip2HJu8h5@loca")
2024-09-23T03:38:43.788093Z TRACE async_imap::imap_stream: decode: incomplete data, need minimum 109 bytes

Then nothing happens for a while.
Eventually fetching fails like this:

121.4s [w]core/event: 1 src/scheduler.rs:418: Failed fetch_idle: fetch_move_delete: fetch_new_messages: prefetch: io: timed out: timed out

I doubt it is Dovecot that is a problem, seems there is some problem with buffering or Poll wake up logic in async-imap.

EDIT: I filed an upstream issue rust-lang/flate2-rs#434

@link2xt
Copy link
Collaborator Author

link2xt commented Oct 9, 2024

This works now with miniz_oxide, no C dependencies added.

@link2xt link2xt force-pushed the link2xt/imap-compress branch 5 times, most recently from dc95e21 to 1071b1c Compare October 9, 2024 23:11
@link2xt link2xt changed the base branch from main to link2xt/update-async-zip October 10, 2024 13:49
Base automatically changed from link2xt/update-async-zip to main October 11, 2024 00:17
@link2xt link2xt force-pushed the link2xt/imap-compress branch 2 times, most recently from 1f99b68 to 890361d Compare October 13, 2024 16:13
@link2xt link2xt requested a review from Hocuri October 14, 2024 12:23
Copy link
Collaborator

@Hocuri Hocuri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be nice to wait for async-email/async-imap#112 and a new release before merging so that we don't need to use a git dependency

@link2xt link2xt enabled auto-merge (rebase) October 14, 2024 13:42
@link2xt link2xt merged commit f1ca689 into main Oct 14, 2024
37 checks passed
@link2xt link2xt deleted the link2xt/imap-compress branch October 14, 2024 14:01
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.

2 participants