Bug 438049

Summary: Kmail Undo Send black hole
Product: [Applications] kmailtransport Reporter: guiand <mail>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal CC: mail
Priority: NOR    
Version: 5.17.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: akonadiconsole log file

Description guiand 2021-06-03 17:51:15 UTC
Created attachment 138983 [details]
akonadiconsole log file

SUMMARY

I use Kmail together with the `Enable Undo Send` option.
For months, I have been suffering a seemingly random issue where some of my email replies randomly disappear into a black hole after the grace period.

STEPS TO REPRODUCE
1. Enable the Undo Send option
2. Reply to an existing email

EXPECTED RESULT
- After a defined duration, your email should send out
- The email sent out will be copied to the Sent folder
- The intended recipient receives that email

OBSERVED RESULT

- I get a KDE notification saying my reply has been sent
- The reply is removed from the Outbox
- The IMAP server doesn't receive anything related to that email reply. A connection simply appears to be opened and closed.
- The reply is never copied into the Sent folder
- The intended recipient never receives the email reply

The issue seemed to be random at first but I have now narrowed down the common characteristics of email replies that suffer from this issue.

- This issue only occurs with the `Enable Undo Send` option
- This issue only affects a limited number of addresses & threads
- All of them are on private domains (not gmail, yahoo, protonmail, etc.)
- This issue NEVER occurs when I send a NEW email; only with replies
- If I BCC another address that doesn't suffer from that issue, the said address alone will receive the email. In the mail server logs, it appears as if I was replying to this said address alone (TO address doesn't show in the logs). In the Sent folder, the headers look normal (2 recipients).

I ran `akonadiconsole` to try to identify the culprit. Please see the log file enclosed.
I noticed the two following outputs:

[2021-06-03T16:08:56.450Z] akonadi_sendlater_agent org.kde.pim.messagecore Error in address splitting: parseAddressList returned false!
[2021-06-03T16:08:56.490Z] akonadi_sendlater_agent org.kde.pim.messagecomposer QueueJob failed with error "Message has no recipients."

The issue is even more annoying that it:
- fails silently
- any trace of the reply you type disappears so you have to re-write that email; at the very least it should remain in the Outbox

SOFTWARE/OS VERSIONS
Kmail: 5.17.1 (21.04.1)
Linux: Arch Linux, Kernel 5.12.8
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.82.0
Qt Version: 5.12.2