Bug 388155

Summary: Kmail shows duplicate emails - detect automatically on refresh?
Product: [Applications] kmail2 Reporter: Ivan S <northivanastan>
Component: foldersAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: minor CC: alexandre.bonneau
Priority: NOR    
Version: 5.7.0   
Target Milestone: ---   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In:

Description Ivan S 2017-12-22 16:16:50 UTC
When using a GMail account, new emails will appear in multiple folders: Inbox, [Gmail]/All Mail, and [Gmail]/Important. It should be trivial to automatically detect when receiving duplicate emails and delete all except in Inbox.
Comment 1 Alexandre Bonneau 2020-05-05 20:45:53 UTC
This sounds like an XY problem.
Instead of "automatically detecting and deleting" duplicates mails (I can easily imagine how this could go wrong and delete lots of non-duplicated mails), akonadi should strive to _not_ duplicate the mails in the first place!
Comment 2 Alexandre Bonneau 2020-05-05 20:50:57 UTC
I'm adding a comment here instead of creating a new issue, since under Debian Bullseye with akonadi and kmail version `4:19.08.3-1`, I'm getting mail duplicates only in a very specific situation ;
If I open kmail on two different computers at the same time (ie. on my laptop and my workstation).

If only one akonadi server is running on both computers, then everything is fine.
However if I run akonadi server on both computers, everything goes haywire and kmail starts spewing lots (LOTS!..in the hundreds) of duplicates mails.

I hope this helps figuring out any race condition that might happen.