Bug 322126 - emails get filtered twice and thus duplicated in kmail2
Summary: emails get filtered twice and thus duplicated in kmail2
Status: RESOLVED DUPLICATE of bug 283682
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Filter Agent (show other bugs)
Version: 5.3.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-07-08 16:50 UTC by Hussam Al-Tayeb
Modified: 2017-03-22 00:02 UTC (History)
12 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hussam Al-Tayeb 2013-07-08 16:50:43 UTC
workaround is:
akonadictl stop 
rm -rf ~/.local/share/akonadi 
akonadictl start 
this removes the duplicates.

same email being filtered twice --------------------- [18:50:24] Begin filtering on message "[Bug 627699] Port GTK2 to GTK3" from "bugzilla-daemon@mozilla.org" at "Monday 08 July 2013 15:47" : [18:50:24] Evaluating filter rules: (match any of the following) "From" <contains> [18:50:24] Evaluating filter rules: (match all of the following) "From" <contains> "bugs@archlinux.org" [18:50:24] 0 = "From" <contains> "bugs@archlinux.org" (bugzilla-daemon@mozilla.org) [18:50:24] Evaluating filter rules: (match all of the following) "From" <contains> "clementine-player@googlecode.com" [18:50:24] 0 = "From" <contains> "clementine-player@googlecode.com" (bugzilla-daemon@mozilla.org) [18:50:24] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla-daemon@freedesktop.org" [18:50:24] 0 = "From" <contains> "bugzilla-daemon@freedesktop.org" (bugzilla-daemon@mozilla.org) [18:50:24] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla@gnome.org" [18:50:24] 0 = "From" <contains> "bugzilla@gnome.org" (bugzilla-daemon@mozilla.org) [18:50:24] Evaluating filter rules: (match any of the following) "Sender" <contains> "bugzilla_noreply@kde.org" "Reply-To" <contains> "bug-control@bugs.kde.org" [18:50:24] 0 = "Sender" <contains> "bugzilla_noreply@kde.org" () [18:50:24] 0 = "Reply-To" <contains> "bug-control@bugs.kde.org" () [18:50:24] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla-daemon@llvm.org" [18:50:24] 0 = "From" <contains> "bugzilla-daemon@llvm.org" (bugzilla-daemon@mozilla.org) [18:50:24] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla-daemon@mozilla.org" [18:50:24] 1 = "From" <contains> "bugzilla-daemon@mozilla.org" (bugzilla-daemon@mozilla.org) [18:50:24] Filter rules have matched. [18:50:24] Applying filter action: Move Into Folder "Local Folders/inbox/Bugs/Mozilla" ------------------------------ [18:50:25] Begin filtering on message "[Bug 627699] Port GTK2 to GTK3" from "bugzilla-daemon@mozilla.org" at "Monday 08 July 2013 15:47" : [18:50:25] Evaluating filter rules: (match all of the following) "From" <contains> "bugs@archlinux.org" [18:50:25] 0 = "From" <contains> "bugs@archlinux.org" (bugzilla-daemon@mozilla.org) [18:50:25] Evaluating filter rules: (match all of the following) "From" <contains> "clementine-player@googlecode.com" [18:50:25] 0 = "From" <contains> "clementine-player@googlecode.com" (bugzilla-daemon@mozilla.org) [18:50:25] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla-daemon@freedesktop.org" [18:50:25] 0 = "From" <contains> "bugzilla-daemon@freedesktop.org" (bugzilla-daemon@mozilla.org) [18:50:25] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla@gnome.org" [18:50:25] 0 = "From" <contains> "bugzilla@gnome.org" (bugzilla-daemon@mozilla.org) [18:50:25] Evaluating filter rules: (match any of the following) "Sender" <contains> "bugzilla_noreply@kde.org" "Reply-To" <contains> "bug-control@bugs.kde.org" [18:50:25] 0 = "Sender" <contains> "bugzilla_noreply@kde.org" () [18:50:25] 0 = "Reply-To" <contains> "bug-control@bugs.kde.org" () [18:50:25] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla-daemon@llvm.org" [18:50:25] 0 = "From" <contains> "bugzilla-daemon@llvm.org" (bugzilla-daemon@mozilla.org) [18:50:25] Evaluating filter rules: (match all of the following) "From" <contains> "bugzilla-daemon@mozilla.org" [18:50:25] 1 = "From" <contains> "bugzilla-daemon@mozilla.org" (bugzilla-daemon@mozilla.org) [18:50:25] Filter rules have matched. [18:50:25] Applying filter action: Move Into Folder "Local Folders/inbox/Bugs/Mozilla"

Reproducible: Sometimes
Comment 1 Martin Koller 2013-07-19 10:07:27 UTC
I switched now to 4.11 RC1 and see the following problem with filtering:
When I select all mails in my inbox and press CTRL-J, after the mail filter agent has done its work. I have all mails duplicated. I now have all mails in inbox already 5 times!
Comment 2 Andre Woebbeking 2013-07-19 10:41:55 UTC
I had the same problem.

I moved away my old maildir, removed the resource, added a new one and imported the old maildir. Not all mails were imported. Maybe my old maildir was broken somehow (migration from kmail1 coudl be the reason). I also changed my filters to only work on pop3 resources.

But still filtering is not working properly :-(

BTW, the duplicates seems to be only in akonadi not in your maildir.
Comment 3 Christian Trippe 2013-07-19 17:33:55 UTC
(In reply to comment #1)
> I switched now to 4.11 RC1 and see the following problem with filtering:
> When I select all mails in my inbox and press CTRL-J, after the mail filter
> agent has done its work. I have all mails duplicated. I now have all mails
> in inbox already 5 times!

I see this behaviour too and for me it started with KDE 4.11 RC1, I did not notice this with the previous beta.
Comment 4 Erik Ridderby 2013-08-12 19:29:35 UTC
I can reproduce this with kmail 4.10.5 if I have 2 steps in the filter actions (i.e. I tried to move a mail and mark it read). 

BR
Erik
Comment 5 Erik Ridderby 2013-08-12 19:31:29 UTC
To clarify; the result of a filter that moves the mail into a folder and shall mark it read is two mail in the target folder, one read and one unread. 

I have not tried the workaround mentioned.
Comment 6 Richard Van Den Boom 2013-08-29 20:10:46 UTC
This has been bugging me for quite a while now, before 4.11 for sure and maybe even 4.10.X.
I have it almost systematically with SPAM filter that sends any mail marked as SPAM in the subject by the mail servers directly to the trash. Every mail thus filtered appear twice when I look in the trash folder.
It also occurs with some of my other filters but curiously not all and not all the time. I noticed for what is worth that one copy displays the Spamassassin level when available, and the other copy not. This is quite obvious on mails I get from a mailing list which are filtered in a specific directory.
I use KDE PIM 4.11 on a slackware64 system. I store my mails in maildirs.
Comment 7 Tobias Leupold 2013-11-12 17:33:49 UTC
I experience similar problems with 4.11.3. Probably same problem like describes in Bug #322676?
Comment 8 Tobias Leupold 2013-12-01 15:02:22 UTC
Some similar problems are also described in the older Bug #316419.
Comment 9 Denis Kurz 2016-09-24 18:18:51 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 10 Hussam Al-Tayeb 2016-09-24 18:37:36 UTC
(In reply to Denis Kurz from comment #9)
> 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.

It does happen in Kmail2 versions 5+ (likely the same cause or duplicate of bug 283682).
Comment 11 Denis Kurz 2016-09-25 11:27:16 UTC
Hussam, thank you for your feedback.
Comment 12 Oliver Sinnen 2017-02-03 07:51:50 UTC
I can confirm this bug too and it has existed in kmail for many years. The severity has varied across versions though. Sometimes it was so bad that most emails were duplicated. Currently, it happens rarely, but it still happens. 

My current system is OpenSuse Leap 42.2, Kmail 5.3, Kde Frameworks 5.26.0, Qt 5.6.1
Comment 13 ianseeks 2017-03-21 16:16:57 UTC
This works for me.  
Uncheck the "Apply filter to incoming messages" on each filter.  
Now just click on the inbox and click 'Folders/Apply all filters on Folder' so filters are applied manually.  
It has so far not produced a duplicate email so its looking like filters on incoming is the culprit.
Comment 14 Daniel Vrátil 2017-03-22 00:02:57 UTC

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