Skip to content

individual email delete permanently fails with UID command error: BAD #5569

Description

@exsilium

Prerequisites

  • I searched open issues and discussions and did not find an existing report of this bug.
  • This is not a security vulnerability. (Vulnerabilities go to GitHub Security Advisories — see SECURITY.md.)
  • I am running the latest code from the dev branch (the default branch you get on clone, where fixes land first) and the bug still reproduces there. Please git pull the latest dev before filing.

Install Method

Docker (docker compose up)

Operating System

Windows

Steps to Reproduce

  1. Open an e-mail
  2. Click More actions -> Delete permanently
  3. E-mail looks like it's been removed but actually refresh brings it back

Odysseus container logs:

2026-07-16 20:16:46,424 - routes.email_routes - ERROR - Failed to permanently delete email 89773: UID command error: BAD [b'Parse Error']

Expected Behaviour

E-mail actually gets deleted, not just from the list.

Actual Behaviour

E-mail does not get deleted from the server side.

Logs / Screenshots

INFO:     172.20.0.6:48286 - "DELETE /api/email/delete-permanent/89773?folder=INBOX&account_id=258fd5bfd7c54c17b7db818788c75bd2 HTTP/1.1" 200 OK
2026-07-16 20:24:08,242 - routes.email_routes - ERROR - Failed to mark read 89772: UID command error: BAD [b'Parse Error']
2026-07-16 20:24:08,244 - app.slow_request - WARNING - slow_request method=GET path=/api/email/read/89772 status=200 elapsed=1.853s
2026-07-16 20:24:08,245 - app.slow_request - WARNING - slow_request method=POST path=/api/email/mark-read/89772 status=200 elapsed=1.852s
INFO:     172.20.0.6:48286 - "GET /api/email/read/89772?folder=INBOX&account_id=258fd5bfd7c54c17b7db818788c75bd2 HTTP/1.1" 200 OK
INFO:     172.20.0.6:48314 - "POST /api/email/mark-read/89772?folder=INBOX&account_id=258fd5bfd7c54c17b7db818788c75bd2 HTTP/1.1" 200 OK
2026-07-16 20:24:09,637 - routes.email_routes - ERROR - Failed to list attachments for 89772: 'int' object has no attribute 'decode'
2026-07-16 20:24:09,638 - app.slow_request - WARNING - slow_request method=GET path=/api/email/attachments/89772 status=200 elapsed=1.325s

Model / Backend (if relevant)

No response

Are you willing to submit a fix?

No — I am only filing the report

Additional Information

Using multiple e-mail select and deleting from the listing works as intended, so this is only affecting e-mails that are opened for reading and individually deleted from the More (...) menu.

If it matters, I'm using Apple iCloud e-mail as the service provider. Still hoping others will also hit this and are able to reproduce the error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingready for reviewDescription complete — ready for maintainer review

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions