Skip to content

fix: fetch at most 100 existing messages even if EXISTS was not received#4383

Merged
link2xt merged 1 commit intomasterfrom
link2xt/prefetch-at-most-100-existing
May 9, 2023
Merged

fix: fetch at most 100 existing messages even if EXISTS was not received#4383
link2xt merged 1 commit intomasterfrom
link2xt/prefetch-at-most-100-existing

Conversation

@link2xt
Copy link
Copy Markdown
Collaborator

@link2xt link2xt commented May 8, 2023

According to RFC 3501, EXISTS must always be sent in response to SELECT. But if the server does not send it for some reason, async-imap uses the default value, so we will essentially fetch 1:* and downloading all messages may take a long time.

Fixes #4382

@link2xt link2xt requested review from Hocuri and adbenitez May 8, 2023 11:00
@link2xt link2xt force-pushed the link2xt/prefetch-at-most-100-existing branch from 6a6589c to a89f51c Compare May 8, 2023 11:01
According to RFC 3501, EXISTS must always be sent in response to SELECT.
But if the server does not send it for some reason,
async-imap uses the default value, so we will essentially fetch `1:*`
and downloading all messages may take a long time.
@link2xt link2xt force-pushed the link2xt/prefetch-at-most-100-existing branch from a89f51c to 2fe7c4f Compare May 8, 2023 12:01
Copy link
Copy Markdown
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.

Nice, thanks!

@link2xt link2xt merged commit d3236e7 into master May 9, 2023
@link2xt link2xt deleted the link2xt/prefetch-at-most-100-existing branch May 9, 2023 10:56
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.

prefetch_existing_msgs may download more than 100 messages

3 participants