Bug 174430 - Filters don't apply on IMAP accounts and automatic mail check after update to KDE 4
Summary: Filters don't apply on IMAP accounts and automatic mail check after update to...
Status: RESOLVED FIXED
Alias: None
Product: kmail
Classification: Applications
Component: filtering (show other bugs)
Version: 1.10.1
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-06 14:15 UTC by Andreas Pietzowski
Modified: 2009-04-28 20:15 UTC (History)
6 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 Andreas Pietzowski 2008-11-06 14:15:54 UTC
Version:           1.10.1 (using 4.1.2 (KDE 4.1.2), Kubuntu packages)
Compiler:          cc
OS:                Linux (i686) release 2.6.27-7-generic

I updated from KDE3 to KDE4 with Ubuntu 8.10 and recognize that my filters are not applied to the incoming IMAP emails.

It sure works when I manually apply them but in KMail from KDE 3, the filters were applied automatically when the mails got checked in the set interval.

It would be nice to see filters work again on automatic IMAP checks.

Thanks
Andreas
Comment 1 George Kiagiadakis 2008-11-25 00:24:15 UTC
Go to settings->configure filters and make sure that for each filter, in the second tab, the "apply this filter to incoming messages" option is checked and you IMAP account is selected. Does this solve your problem?
Comment 2 Wouter Haffmans 2009-01-04 23:39:51 UTC
I have the same problem, running KMail from trunk (using Gentoo genkdesvn ebuilds), rebuilt in the past 24 hours or so. Manual filters work, but filters on new incoming messages on IMAP accounts are not applied (I have no Disconnected IMAP, POP3 or other accounts set up).

I have set up all accounts again, corrected the folders the filters point to as well, and made sure each filter is applied to the necessary accounts on incoming messages.

Removing all files and directories except 'mail' and 'imap' from ~/.kde/share/apps/kmail didn't work either. I have also removed all .index and .index.ids files from the ~/.kde/share/apps/kmail directory and subdirectories to no avail.

Bug #171061 seems to be related.
Comment 3 Wouter Haffmans 2009-01-14 14:54:41 UTC
I've got some new information that might help, though I haven't rebuilt KDE since my last comment.

I have Bogofilter rules set up using the KMail wizard. Enabling the filter logs showed that whenever an email is piped through bogofilter, the filters would stop processing (ignoring the "If this filter matches, stop processing here" setting). As a result the emails would not go through the actual filters.

I haven't tested if any arbitrary "pipe message" action breaks the filters.

So, steps to reproduce this:
1. Set up Bogofilter filters using the KMail wizard.
2. Set up another rule which has to process non-spam mail on an online IMAP account, move this to below the bogofilter processing rules.
3. Enable the Filter Log Viewer (Tools menu).
4. Wait for incoming mail that will go through both rules (but is not spam). You can try sending one yourself, of course. It may or may not work when filtering manually.

Result: mail is filtered with the rule set up in (2), but instead the "pipe through bogofilter" action is the last one that's run. The Filter Log Viewer shows this.

Expected result: The email should also be filtered using the rule in (2), sending the message through the Bogofilter pipe should not abort the filtering of the message.
Comment 4 Wouter Haffmans 2009-01-14 15:00:04 UTC
One more thing I forgot to add: I disabled the bogofilter rules now, and at least after a restart of KMail the filters are now applied correctly again (though that means I have no spamfiltering).
Comment 5 Thilo-Alexander Ginkel 2009-02-01 11:14:24 UTC
I am seeing this issue with KDE 4.2.0 (as well as with KDE 4.1.x) and noticed one trigger that causes the filters to stop: If there is at least one message in my IMAP inbox, which does not match any filter, any subsequent messages for which matching filter rules exist are not processed. This applies even when applying filters manually and the message in question is included in the selected set of messages to be filtered.
Comment 6 Nelson Ferreira 2009-03-15 05:48:51 UTC
I updated from KDE3 to KDE4 on slackware.
The filters also stopped being applied when messages are downloaded from the configured POP account into the local folders.

I made sure that all the rules are to be applied on incoming messages AND for all accounts.
Comment 7 Matthias Gehre 2009-03-18 03:44:26 UTC
Seems to be related to bug https://bugs.kde.org/show_bug.cgi?id=182208
Comment 8 Thomas McGuire 2009-04-08 15:54:10 UTC
SVN commit 951033 by tmcguire:

Fix online IMAP filters not working in various situations.

Patch by Matthias Gehre <M.Gehre@gmx.de>, thanks very much!

BUG: 171061
BUG: 174430
BUG: 182208
BUG: 186264


 M  +15 -11    actionscheduler.cpp  
 M  +17 -5     actionscheduler.h  
 M  +4 -1      kmcommands.cpp  
 M  +22 -6     kmfilteraction.cpp  
 M  +1 -1      managesievescriptsdialog.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=951033
Comment 9 Thomas McGuire 2009-04-28 20:15:17 UTC
SVN commit 960606 by tmcguire:

Backport r951033 by tmcguire from trunk to the 4.2 branch:

Fix online IMAP filters not working in various situations.

Patch by Matthias Gehre <M.Gehre@gmx.de>, thanks very much!

CCBUG: 171061
CCBUG: 174430
CCBUG: 182208
CCBUG: 186264



 M  +15 -11    actionscheduler.cpp  
 M  +17 -5     actionscheduler.h  
 M  +4 -1      kmcommands.cpp  
 M  +22 -6     kmfilteraction.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=960606