Skip to content

feat: Ratelimit IMAP connections (#4940)#5061

Merged
iequidoo merged 1 commit intomainfrom
iequidoo/imap-ratelimit
Nov 30, 2023
Merged

feat: Ratelimit IMAP connections (#4940)#5061
iequidoo merged 1 commit intomainfrom
iequidoo/imap-ratelimit

Conversation

@iequidoo
Copy link
Copy Markdown
Collaborator

@iequidoo iequidoo commented Nov 30, 2023

Limit the number of IMAP connections to 1 per minute regardless of the reason of reconnection, but allow one immediate retry. This is more reliable than ratelimiting only in error conditions because ratelimiting can't be skipped by mistake. Anyway connections shouldn't be frequent in normal operation mode.

Close #4940

Limit the number of IMAP connections to 1 per minute regardless of the reason of reconnection, but
allow one immediate retry. This is more reliable than ratelimiting only in error conditions because
ratelimiting can't be skipped by mistake. Anyway connections shouldn't be frequent in normal
operation mode.
@iequidoo iequidoo marked this pull request as ready for review November 30, 2023 05:15
@iequidoo iequidoo requested a review from link2xt November 30, 2023 05:15
Copy link
Copy Markdown
Collaborator

@link2xt link2xt left a comment

Choose a reason for hiding this comment

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

LGTM, I also checked that configure() creates new IMAP clients for each tried host/port, so it will not be ratelimited.

@iequidoo iequidoo merged commit 44c5cd5 into main Nov 30, 2023
@iequidoo iequidoo deleted the iequidoo/imap-ratelimit branch November 30, 2023 22:22
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.

Ratelimit IMAP reconnections

2 participants