Skip to content

feat: Remove "Delete Messages from Server" (delete_server_after) config option, second try#8240

Draft
Hocuri wants to merge 2 commits into
mainfrom
hoc/remove-delete_server_after-2
Draft

feat: Remove "Delete Messages from Server" (delete_server_after) config option, second try#8240
Hocuri wants to merge 2 commits into
mainfrom
hoc/remove-delete_server_after-2

Conversation

@Hocuri
Copy link
Copy Markdown
Collaborator

@Hocuri Hocuri commented May 13, 2026

test_delete_expired_imap_messages() is AI-generated and needs to be reworked. Everything else is written by myself and ready for review as soon as the tests pass.

Supersedes #8217, fix #8195. If you want to see the difference, call git diff hoc/remove-delete_server_after hoc/remove-delete_server_after-2 (only works until someone rebases again, of course).

The most interesting change is in delete_expired_imap_messages() because there, messages are marked for deletion on single-device chatmail profiles.

WRT tests:

  • test_immediate_autodelete() tests the auto-deletion; test_imap_autodelete_fully_downloaded_msg() tests that even for a message that is split into pre- and post-message, both messages are deleted.
  • A lot of tests test that if bcc_self is on, messages are not auto-deleted. E.g. test_one_account_send_bcc_setting() and test_markseen_message_and_mdn() relies on the fact that messages stay on the server when bcc_self is on.
  • Unfortunately, it is not possible to test that messages are only deleted for chatmail servers, because we don't have any tests that use a non-chatmail server AFAIK?

Open question: Do we want to treat Nauta.cu like a chatmail server, in order to keep the old behavior on Nauta of auto-deleting? If not, I'll tell @adbenitez how he can do it in AC. In order to do this, need to find out in fn fetch_many_msgs() whether the server is Nauta, probably by querying the transports SQL table

TODO:

@Hocuri Hocuri marked this pull request as draft May 13, 2026 20:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove delete_server_after config

2 participants