Bug 104073 - dimap: kmail creates empty, broken messages
Summary: dimap: kmail creates empty, broken messages
Alias: None
Product: kmail
Classification: Applications
Component: IMAP (show other bugs)
Version: 1.8
Platform: Gentoo Packages Linux
: NOR normal with 105 votes (vote)
Target Milestone: ---
Assignee: kdepim bugs
Depends on:
Reported: 2005-04-17 18:37 UTC by Robert
Modified: 2015-04-12 09:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Robert 2005-04-17 18:37:42 UTC
Version:           1.8 (using KDE KDE 3.4.0)
Installed from:    Gentoo Packages
OS:                Linux

Kmail sometimes creates empty, broken messages in the inbox on my dimap account. I don't know if that's related to crashes or not. It crashes only rarely.

Kmail seems to remove these messages after selecting them, but only from its own message list. They still stay on the imap server, where kmail puts them as well.

These broken messages are completely empty; the only header they seem to have (as I can see on my imap provider's web interface) are:

X-UID: 0

The date, subject, sender, body... everything is empty.

I guess this bug report is pretty useless, I'm sorry, but maybe someone else will have more of an idea when the problem occurs.
Comment 1 Bernhard E. Reiter 2005-09-13 18:12:36 UTC
These emails usually mean broken index files.
There are several common reason for broken index files:
* Crashes.
* .kde on a network drive, e.g. NFS.

AFAIK kmail will detect some broken index files and rebuilds them.
I suggest to retry with a more recent version
and do an imapd trouble shoot -> rebuild indexes after a crash.
Comment 2 Alexander Schneider 2006-03-29 17:24:52 UTC
Version: 1.9.1 (on Suse 10)

The same situation happened to me yesterday after a KMail crash. I have lost the content of all messages in my inbox. The messages are there, although only in quantity, thus having empty headers and bodies:

X-Length: 12
Status: R
X-Status: NC

The messages' status though is still valid: I can see which I have not read yet, which I have replied to, etc.

I have tried to troubleshoot: rebuilding indexes and cache - with no effect. (Means, the rebuild worked, however as the messages on the server were altered, there is no way to recover them.)

The webmail-interface of my account provides the same information: all messages with no content. (As a proof of the change which happened.)

The sysad of my provider tells me that he cannot reconstruct what happened during the crash from the server-side... and that all content of the messages is lost and cannot be restored.
Comment 3 Manu 2006-04-11 22:37:13 UTC
Excat same thing happenned.
I had a crash that occured when I selected "open in the addressbook" from the right click menu. then all messages in my inbox but one where emptied. they where all there, with the right headers, but then when I click on them, the preview pane show them empty, and the headers turn all to unknown...
Comment 4 Ismail Onur Filiz 2006-04-22 09:07:14 UTC
might be similar to what happens in bug 89549 with IMAP.
Comment 5 m.wege 2006-07-22 20:51:45 UTC
I also have this problem with empty message appearing quite frequently. But did not find a rule, how this happens.
Comment 6 Laurent Pelecq 2007-02-10 14:22:18 UTC
Same thing with kmail 1.9.6

X-UID: 37655
Status: RO
X-Status: RC
X-KMail-EncryptionState: N
X-KMail-SignatureState: N
Comment 7 jarlgjessing 2007-11-08 08:35:18 UTC
I have a variation of this problem. KMail creates an empty copy of an email that is correct. Deleting the empty copy causes kmail to crash
Comment 8 greatbunzinni 2008-02-19 17:11:11 UTC
Yes, kmail 1.9.6 suffers from this bug.

After a power outage I noticed that kmail had an email entry in the inbox which isn't possible to delete. When I launch kmail through the command line, the following warning message is printed out:

kmail: WARNING: FolderStorage::getMsg, message has no sernum, index: 0

What do I need to do to get rid of that "ghost" email entry?
Comment 9 simon 2008-04-05 11:59:00 UTC
KDE Version  1.9.7 (KDE 3.5.8, Gentoo)
Application  E-Mail Client
Operating System  Linux (x86_64) release 2.6.24-gentoo-r3
Compiler  Target: x86_64-pc-linux-gnu

after crash same undeletable ghost mail as outlined in comment #8
Comment 10 simon 2008-04-07 14:47:11 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 simon 2008-04-07 15:10:52 UTC
debug message when trying to delete(move to trash):

 [virtual KMCommand::Result KMMoveCommand::execute()] No message found for serial number 0
Comment 12 neptho 2008-05-07 05:19:06 UTC
KDE Version 1.9.9  (KDE 3.5.8, Kubuntu Hardy)
Application KMail
Operating System  Linux (i686) release 2.6.24-17-generic
Compiler Target: i486-linux-gnu

This is almost a daily occurance for me with remote Courier IMAP hosts; A few idents:

* OK [CAPABILITY IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT IDLE QUOTA ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.


* OK [CAPABILITY IMAP4rev1 CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT IDLE QUOTA ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.

It seems that KMail caches the header, and when it 'defaults' to this message, it does not refresh the data.  It gets an index of 0, and crashes out, hard.

I've been using KMail for years, and have only had a few minor quibbles - however, the frequency and issues caused by this one within the last week with 3 remote IMAP accounts is unbearable.
Comment 13 Björn Ruberg 2010-04-05 23:21:38 UTC
*** Bug 233069 has been marked as a duplicate of this bug. ***
Comment 14 xor 2010-12-14 19:18:12 UTC
Bug 233069 is the result of a Kmail which does NOT use IMAP. So maybe this is not an IMAP issue, but in some other component?

I've tried the "Recreate index" feature on an affected non-IMAP folder and it didn't restore the emtpy mails.

So you might consider which components are shared by IMAP and normal folders and are NOT the indexes :|
Comment 15 Laurent Montel 2015-04-12 09:57:35 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.