Skip to content

Revise message deletion from SMTP queue #4579

@link2xt

Description

@link2xt

Currently message sending is implicitly cancelled by removing the message from the database or trashing it:
https://github.com/deltachat/deltachat-core-rust/blob/f930576fd1a2feef981cbaa2e691f52bb66d2582/src/smtp.rs#L568-L570

This logic is difficult to test with Rust tests as you need to run actual SMTP sending code for that and does not allow to delete a message without cancelling sending as reported in #2363

This issue is a replacement for #2363 and #4387. #3685 is related.

To close this issue, we need to:

  • Remove the code from SMTP sending code that checks if the message is in the msgs table.
  • Explicitly delete the message from SMTP queue when the user calls delete_msgs and tests this with a Rust test (fix: Delete messages from SMTP queue only on user demand (#4579) #4615)
  • Test with a Rust test in ephemeral.rs that when outgoing message expires, it is deleted from the chat but can still be extracted from SMTP queue on Alice side, received on Bob side and result in a displayed message.

Metadata

Metadata

Assignees

Labels

bugSomething is not workinggood first issueGood for newcomers

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions