Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Change BccSelf default to 0 for chatmail (#6340) #6344

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

iequidoo
Copy link
Collaborator

Fix #6340

@iequidoo iequidoo marked this pull request as ready for review December 17, 2024 03:46
src/config.rs Outdated
Config::ConfiguredInboxFolder => Some("INBOX"),
Config::DeleteServerAfter => {
match Box::pin(self.get_config(Config::BccSelf)).await?.as_deref() {
Some("0") => Some("1"),
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

A check for IsChatmail is forgotten

Copy link
Collaborator Author

@iequidoo iequidoo Dec 17, 2024

Choose a reason for hiding this comment

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

Though it's an interesting question -- is leaving emails on the server useful w/o BccSelf? Probably not for most email providers because outgoing messages would be missing anyway. But to keep the current behaviour a check for IsChatmail should be added. Also other MUAs don't delete emails from the server by default even if the server doesn't save sent messages to some sentbox (like Gmail does)

EDIT: Fixed and added a test on the default DeleteServerAfter behaviour.

@iequidoo iequidoo marked this pull request as draft December 17, 2024 15:28
Change `BccSelf` default to 0 for chatmail configurations and enable it upon a backup export. As for
`DeleteServerAfter` who was set to 0 upon a backup export before, make its default dependent on
`BccSelf` for chatmail. We don't need `BccSelf` for chatmail by default because we assume
single-device use. Also `BccSelf` is needed for "classic" email accounts even if `DeleteServerAfter`
is set to "immediately" to detect that a message was sent if SMTP server is slow to respond and
connection is lost before receiving the status line which isn't a problem for chatmail servers.
@iequidoo iequidoo force-pushed the iequidoo/0-bcc_self-for-chatmail branch from dc4dcf4 to a900800 Compare December 17, 2024 15:55
@iequidoo iequidoo marked this pull request as ready for review December 17, 2024 15:58
@link2xt
Copy link
Collaborator

link2xt commented Dec 27, 2024

Let's say someone has created a chatmail account before this change. They have no bcc_self and no delete_server_after. Then they export a backup and call adjust_delete_server_after before exporting a backup, so now delete_server_after is set to 0 both in the account and in the backup. They import this backup on a second device.

Then they update Delta Chat. Now bcc_self which is still unset on both devices defaults to 0, so existing chatmail multi-device setup will be broken.

EDIT: ignore, did not notice the migration

@iequidoo iequidoo merged commit 2166412 into main Dec 28, 2024
37 checks passed
@iequidoo iequidoo deleted the iequidoo/0-bcc_self-for-chatmail branch December 28, 2024 01:54
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.

Set send-copy-to-self to off, when delete-immediately-after-download is on
2 participants