Bug 163372

Summary: Sent mail not in outbox or sent-mail folder after crash
Product: [Applications] kmail Reporter: monstermunch
Component: sendingAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED NOT A BUG    
Severity: normal    
Priority: NOR    
Version: SVN trunk (KDE 4)   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:

Description monstermunch 2008-06-06 17:08:05 UTC
Version:            (using Devel)
Installed from:    Compiled sources

This bug is probably hard to reproduce but I thought it was still worth submitting.

Here's what just happened:

* I wrote a very long email in kmail.
* I hit send.
* I launched ksysguard during the send operation.
* My X-server reset.
* After the reset, I checkout my outbox and my sent mail folder for my email and found nothing.
* I spoke to the email recipient and he said he did receive the email (yet I have no record of this).
* I think (I'm not sure) that the little reply arrow on the message I replied to was not set either.

Obviously, this is bad because I think I lost my email but didn't. I don't know what the word is, but it sounds like you need some journal system to fix this where you keep a list of operations that are about to happen and only take them off the list when you've verified that the operation is complete. On a crash, you just check the log and continue where you left of from (similar to high reliability databases).

One quick fix would be to use the presence of an email in the outbox as a marker for "we still have to send this message and put it in the sent box" and then only delete the outbox item when all is complete. On a crash in the middle of doing all this, you would just do all the operations again. It means in a rare situation the email would be sent multiple times but that wouldn't bother me compared to having to type my whole email out again to find that it was already sent.
Comment 1 monstermunch 2009-02-05 00:22:49 UTC
I couldn't reproduce this so will just close the bug as it hasn't been looked at for a long time.