I get a lot of emails from my homepage, each time some spam bot posts a spam guestbook or weblog comment. Sometimes, I get 10 or 20 per hour.
I filter those mails (using kmail) and put them in a separate directory. Most of the time, two copies end up there, sometimes also present as two separate files in the maildir. Sometimes I get two copies, but one of them with empty text. Sometimes, I even get new unread mails in my normal inbox which don't show up, and after reading both copies of the filtered mail, the unread mark disappears. Well, sometimes, the filtering even simply works and I only get one mail in the destination folder ;-)
Anyways, this is very annoying, causing hundreds of duplicate mails here – but the behaviour is inconsistent. Most of the time, I simply get two copies of the moved mails.
What I tried is this: I simply added a "Run command: sleep 0.5" after the "Move into folder …" action. With this added, no more duplicate mails show up when this filter is used.
So I think this is some timing problem that occurs when many mails are handled by the same filter. I hope this helps debugging this … I would really love to see this fixed.
Even an additional "sleep 0.1" stops mailfilter from producing duplicates.
This bug also affects outgoing mail:
*I create a filter 'To John' that sets the identity of the message to, say, 'id_private' if John's address matches the 'to' header. The filter is used on all outgoing mail.
* Result: messages to John are put in 'sent-mail' as expected, but a copy also stays behind in the 'outbox'. What is worse: John receives messages that did not have their identity set to 'id_private' .
Deleting duplicated messages can laso be complicated:
* I sent some messages to myself and (upon reveiving them) they all ended up 'in duplo' in the target mailbox (i.e. the mailbox the filter is supposed to move the message to).
* When I next 'trash' the duplicate messages the trash mailbox only shows one, single copy.
I next empty the 'trash' mailbox and open my inbox: a single copy of the message re-appears in the target mailbox!
* I trash that message and it disappears, but the trash mailbox remains empty. When I open my inbox it is back again, in the target mailbox.
This is not a recent bug, by the way. I have recently tried Debian testing, openSuse 13.1 and openSure 13.1 + KDE 'current': the bug is in all those installations.
Looks like this problem has been around for years:
*** This bug has been confirmed by popular vote. ***
This bug has only been reported for versions older than KDEPIM 4.14 (at most akonadi-1.3). Can anyone tell if this bug still present?
If noone confirms this bug for a recent version of akonadi (part of KDE Applications 15.08 or later), it gets closed in about three months.
I'm still seeing something like this in 5.1.3.
Sometimes I'll see a message in my inbox that should have been filtered to another folder. The unread count for the target folder is 0. If I open the target folder, the unread count is set to 1, and the same message as in my inbox is present. I then go back to my inbox and manually filter the message (Ctrl+J). Now there are two copies of the message in the target folder.
I'm using POP3, I should have said.
Ok, I think I saw multiple bugs around duplication of mails in the last few days. Probably I should try to organize them... From what I read so far, the problem is probably unrelated to POP3, but thanks for reporting back.
*** This bug has been marked as a duplicate of bug 283682 ***
I confirm concurrency issue: the bug becomes systematic with an SSD drive (ransom of speed!).
sleep 0.1 solves the problem.