Repository navigation
fix(ui): delete selected threads one after another - #14267
Open
dillardblom wants to merge 1 commit into
Open
dillardblom wants to merge 1 commit into
dillardblom wants to merge 1 commit into
Conversation
Deleting a selection sent one request per thread at the same time, so every selected thread opened its own IMAP connection at once. Servers that throttle parallel logins answer part of them with a plain NO, which the auth rate limiter counts as a failed login. After three of those the account stays locked for the rest of the three-hour window, and syncing fails with "Too many auth attempts". Await the deletions in sequence and stop at the first error instead of sending more requests that fail the same way. A bulk endpoint (nextcloud#10280) would remove the per-thread login altogether and is left out here. Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
dillardblom
requested review from
ChristophWurst,
GretaD and
kesselb
as code owners
November 20, 2026 21:21
dillardblom
added a commit
to dillardblom/nextcloud-mail
that referenced
this pull request
Nov 20, 2026
…tcloud#14267 Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
dillardblom
added a commit
to dillardblom/nextcloud-mail
that referenced
this pull request
Nov 20, 2026
…tcloud#14267 Signed-off-by: Dillard Blom <dillard.blom@ensembia.com>
This branch has not been deployed
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
Deleting a selection of threads can lock the account for up to three hours. Afterwards every sync fails with "Too many auth attempts", and so does
occ mail:account:diagnose, without contacting the mail server.What happens
deleteAllSelected()sends one delete request per selected thread at the same time (Promise.all), and each request logs in to IMAP. Mail servers that throttle parallel logins refuse part of them with a plainNO, which Horde reports as "Mail server denied authentication.". The auth rate limiter inHordeImapClientcounts that as a failed login, and after three of them it refuses every login for the rest of the three-hour window.Seen on a production instance: deleting 12 selected threads sent 12
DELETE /api/thread/{id}requests within the same second. 10 of them failed with "Mail server denied authentication.", and the account stayed locked until the window ended.Fix
Delete the selected threads one after another and stop at the first error, instead of sending more requests that fail the same way. The threads still disappear from the list as they are deleted.
A bulk endpoint (#10280) would remove the login per thread altogether. That is a larger change and is left out here.
Test plan