Bug 322676

Summary: massive regression - lots and lots of duplicate emails
Product: [Applications] kmail2 Reporter: Martin Koller <kollix>
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED DUPLICATE    
Severity: grave CC: ahartmetz, bugs, dvratil, kdenis, lozol, psychonaut, tl
Priority: NOR    
Version: 5.3.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Martin Koller 2013-07-22 10:50:19 UTC
I'm using 4.11 RC1 (before 4.10.5) and I see a MASSIVE REGRESSION compared to the previous version with regards email duplication.
My inbox and lots of other folders show lots and lots of duplicated emails to the point where kmail2 is now nearly unusable!
I already deleted the whole .local/share/akonadi folder and after that the duplicated mails where no longer shown  - until I receive new emails.

I suspect it has something to to with the filters (and I think I read that for 4.11 there was some heavy change in that area - to the worse!)
But even very old mails (e.g. from 2007 in my inbox) show up multiple times and not only new mails.

My setup: I have 2 POP accounts and 2 local mbox files, and 46 filter rules (most of which check for a mailing List-Id)

Reproducible: Always
Comment 1 Daniel Vrátil 2013-07-22 16:43:52 UTC
Can you please verify whether the emails are duplicated in the mbox files as well?
Comment 2 Martin Koller 2013-07-25 10:38:14 UTC
Due to this problems, I've already downgraded to 4.10.5 again so I can not test this now.
I have very few mails in the mbox accounts so I can not say if that was a problem, too, but at least I do not remember it being a problem.
Comment 3 Andreas Hartmetz 2013-08-05 15:18:57 UTC
I just hit the same or a similar bug.
Incoming mails were duplicated and sometimes ended up duplicated several hundred times in inboxes different from the receiving account(!). Some of the many hundred e-mails had no subject, no sender and no contents.
It is not that easy to get rid of the duplicates somehow. I deleted them using the web interface on one of my accounts, but when I restarted KMail and Akonadi it didn't seem to notice that the e-mails were deleted on the server (or just uploaded some more duplicates), in any case it kept uploading junk.
I set the imap agents to offline, ran akonadi fsck and akonadi vacuum a couple of times, deleted the junk in the web interface and then things seemed to work normally again.
Comment 4 Tobias Leupold 2013-11-12 17:29:46 UTC
I see mail duplicates in 4.11.3 when a filter is applied to some incoming mail. Mails in the default inbox show up just one time, but when they are moved to another folder by a filter, I see them twice. Also, two files are stored in the maildir.
Comment 5 lozol 2013-11-14 18:12:58 UTC
I'm using kmail 4.11.2 on Kubuntu. I've deleted all filters I had, but the bug still appears.
Comment 6 Denis Kurz 2016-09-24 18:04:44 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 7 Tristan Miller 2016-10-03 14:54:33 UTC
How is anyone supposed to know whether they're suffering from this "KMail produces duplicate messages" bug or any of the others that have been reported here (e.g., Bug 293918, Bug 322126, Bug 323980, Bug 362398, Bug 360344, Bug 346695, Bug 323767, Bug 319591, Bug 316425, Bug 280154)?  All these reports have similar symptoms, and while they sometimes occur in different scenarios (e.g., POP vs. IMAP vs. local mbox/maildir accounts), I doubt the reporters exhaustively checked all the scenarios.

So I'd say yes, keep this bug open for now.  I am getting duplicated mails in KMail 5.3.0.  The symptoms reported in this report (like many other reports) match mine.
Comment 8 Denis Kurz 2016-10-12 09:04:05 UTC
Tristan, thanks for reporting back, and for digging up all these likely duplicates. Cleaning up the "KMail duplicates on filter" bugs is already on my todo list, so you shouldn't worry to much about this. If all these bugs turn out to be actual duplicates, someone will eventually close all but one of them, and confirm the remaining one for at least version 5.3.0 thanks to your feedback.
Comment 9 Daniel Vrátil 2017-03-22 00:04:12 UTC

*** This bug has been marked as a duplicate of bug 283682 ***