deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
682 stars 87 forks source link

Some e-mails are deleted #3094

Closed ghost closed 2 years ago

ghost commented 2 years ago
link2xt commented 2 years ago

I see the bug.

Messages from your bank have no Message-ID. That's not a problem, DC generates a Message-ID for such messages normally. But here .unwrap_or_default() is used, so the message is treated as having a Message-ID equal to empty string: https://github.com/deltachat/deltachat-core-rust/blob/7c4a6ddcdf9c2b65c0148c2132cf21bd47073ace/src/imap.rs#L703

The result is that message is treated as duplicate of another message having empty message-ID and deleted.

DC should either not delete such messages or generate a Message-ID for them early if it's feasible.