Skip to content

fix(pop3): batch delete in one session#1292

Open
FromSi wants to merge 2 commits into
floatpane:masterfrom
FromSi:fix/pop3-batch-delete
Open

fix(pop3): batch delete in one session#1292
FromSi wants to merge 2 commits into
floatpane:masterfrom
FromSi:fix/pop3-batch-delete

Conversation

@FromSi
Copy link
Copy Markdown
Contributor

@FromSi FromSi commented May 14, 2026

What?

POP3 batch deletion now sends requests like this:

CONNECT
AUTH
UIDL
DELE 1
DELE 2
DELE 3
QUIT

QUIT is sent once at the end, so all DELE commands are committed in one POP3 session.

Why?

Closes #555

Previously, batch deletion sent requests like this:

CONNECT
AUTH
UIDL
DELE 1
QUIT

CONNECT
AUTH
UIDL
DELE 2
QUIT

CONNECT
AUTH
UIDL
DELE 3
QUIT

So deleting multiple emails repeated the full connection/authentication cycle for every message.

@FromSi FromSi requested a review from a team as a code owner May 14, 2026 22:23
@floatpanebot floatpanebot added bug Something isn't working size/M Diff: 51–200 lines labels May 14, 2026
@FromSi
Copy link
Copy Markdown
Contributor Author

FromSi commented May 14, 2026

@andrinoff

One related thing I noticed while testing locally: I could not get messages to load through the POP3 backend path itself. Messages only appeared for me when the account config also had IMAP settings with "service_provider": "custom".

That creates a mismatch for this case: the message IDs shown in the UI come from IMAP, but batch deletion is then executed through the POP3 provider. POP3 maps messages by hashed UIDL values, so the IMAP UIDs do not match the POP3 UID lookup and batch deletion can fail with pop3: message with UID ... not found.

This might be an issue with my local setup/configuration, but I think it would be good for someone else to verify this case with a real POP3 account.

@andrinoff
Copy link
Copy Markdown
Member

I'll check it out, thank you, @FromSi

Copy link
Copy Markdown
Member

@andrinoff andrinoff left a comment

Choose a reason for hiding this comment

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

i will check out the behaivor you commented on a bit later, this is the only issue i see with this PR

Comment thread backend/pop3/pop3.go Outdated
Comment thread backend/pop3/pop3.go Outdated
@andrinoff andrinoff dismissed their stale review May 16, 2026 15:40

fixed.

@andrinoff
Copy link
Copy Markdown
Member

@FromSi make your membership to the org public, please. Also, if you can -- join the Discord, so that it is easier to talk to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working size/M Diff: 51–200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: POP3 batch delete is inefficient

3 participants