Bug 340015 - Filter rules no longer matching after upgrade
Summary: Filter rules no longer matching after upgrade
Status: RESOLVED FIXED
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mail Filter Agent (show other bugs)
Version: unspecified
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-10-16 09:18 UTC by Paul Eggleton
Modified: 2015-04-19 12:56 UTC (History)
5 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 Paul Eggleton 2014-10-16 09:18:18 UTC
I just upgraded from KDE SC 4.14.1 to 4.14.2, and now my mail filters set up in KMail no longer work, either on incoming mail or when manually applying filtering on individual messages. Most of my filters are of the order of matching on a mailing list (as created by "Create filter from message -> From mailing list" and move into a specific IMAP folder. New rules created using this method with the new version don't seem to work either, so it doesn't appear that it's some kind of corruption of the old filter rules. Enabling filter logging, manually applying filtering on a message that should match one of the rules and using the filter log viewer shows that it is at least running through all of the filters, but none of them are matching including the one that should match the message.

Reproducible: Always


Actual Results:  
No filtering occurs.

Expected Results:  
Mail filter applies when filter conditions match.

I'm using IMAP folders (disconnected IMAP) if it makes a difference.
Comment 1 Christian Trippe 2014-10-16 12:34:23 UTC
I can confirm this also for a pop3 setup.
Comment 2 Colin J Thomson 2014-10-16 18:28:56 UTC
Confirmed here with POP3 also after the KDE updates. Fedora 21 - 4.14.2
Comment 3 Jean-Baptiste Mardelle 2014-10-16 20:02:07 UTC
Same for me on disconnected IMAP, using Kubuntu 14.10 - kmail 4.14.2 packages
Comment 4 Jean-Baptiste Mardelle 2014-10-16 20:25:13 UTC
After some additionnal testing, it works if I create a filter on the "To" field. 

If a "To" filter exists, filtering works correctly, even my "list-id" filters.
However if there are only "list-id" filters and no "To" filter, filtering does not work.

So it looks as if when only "List-id" filters exist, filtering is not triggered... hope it helps.
Comment 5 Laurent Montel 2014-10-17 07:19:58 UTC
(In reply to Jean-Baptiste Mardelle from comment #4)
> After some additionnal testing, it works if I create a filter on the "To"
> field. 
> 
> If a "To" filter exists, filtering works correctly, even my "list-id"
> filters.
> However if there are only "list-id" filters and no "To" filter, filtering
> does not work.
> 
> So it looks as if when only "List-id" filters exist, filtering is not
> triggered... hope it helps.

I don't understand you create a new filter or add To to "List-id" filter ?
Comment 6 Paul Eggleton 2014-10-17 09:03:57 UTC
Upon closer inspection I can confirm that my List-Id based filters are not working, the few other filters that look at the From field are still matching.
Comment 7 Laurent Montel 2014-10-17 11:33:38 UTC
I tested here on pop3 works fine.
I still need to understand why it doesn't work for you.
I will add unitest in mailfilteragent.
Comment 8 Jean-Baptiste Mardelle 2014-10-18 17:28:43 UTC
I found the commit that introduced the regression:

https://projects.kde.org/projects/kde/kdepim/repository/revisions/9614da012753032a89014c65fd89bd1daae4a467/diff/mailcommon/search/searchpattern.cpp

How to reproduce for me (Using an IMAP account):

Before this commit, I can do the following:
1- Delete all KMail filters
2- Create a new filter on a mailing list (move message to folder)
3- Apply filter on a mail that matches the mailing list
Result: it works

After this commit, if I do the same:
1- Delete all KMail filters
2- Create a new filter on a mailing list (move message to folder)
3- Apply filter on a mail that matches the mailing list
Result: it doesn't work, message is not moved. However, if I now do the following:

4- Create a new filter on a "to" field (move message to folder)
Now, step 3 works (applying the mailing list filter).

Deleting the filter created on step 4 breaks again the mailing list filter.

Now, let's hope you understand my explanations...
Comment 9 Stephan Olbrich 2014-10-18 19:19:04 UTC
Same here since the upgrade to 4.14.2:
Filtering on "subject" does work, filtering on "list-id" does not work.
When I create a new filter on a "to" field, the list-id filter starts to work again. (I normally only have filters on "from", "list-id" and "subject")
Comment 10 Colin J Thomson 2014-10-23 19:22:49 UTC
I have done some more tests and it is the "list-id" that does not work for me either, Filtering on Subject , From etc seem to work OK.
Comment 11 Jean-Baptiste Mardelle 2014-11-02 12:47:36 UTC
This issue should be fixed by my git commit (24th of october):
http://commits.kde.org/kdepim/01764b0eb3c7b7407f3119ef711d5b07d7b9a313
Comment 12 Colin J Thomson 2014-11-11 19:22:59 UTC
The "list-id" filtering is now working fine after updating to 4.14.3/Fedora 21. Thanks..
Comment 13 Paul Eggleton 2014-11-13 09:55:16 UTC
Just got the fix here too in F20, thanks!!