Bug 291582

Summary: "Apply filters" only works if a "pipe through prog" filter exists
Product: [Frameworks and Libraries] Akonadi Reporter: S. Burmeister <sven.burmeister>
Component: Mail Filter AgentAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED UNMAINTAINED    
Severity: normal CC: amantia
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description S. Burmeister 2012-01-15 13:57:57 UTC
Version:           unspecified (using KDE 4.7.4) 
OS:                Linux

I have several filters that check incoming messages (imap) for e.g. mailinglist headers or the subject.

If I select multiple emails in the threaded message list (click on the first, hold shift, click on the last) and issue "apply filters > apply all filters" only the first and the last (selected) are filtered. Watching the filter logs I see that the messages from the same thread and hence mailinglist fail the same test if they were not the first or the last item selected.

I think this happens because their content or whatever the filter checks is not downloaded. The filter only works for the first and the last message whose content was downloaded to be shown in the preview pane when I selected them.

If I add a filter that uses "pipe through some app", e.g. bogofilter via the spam wizard, suddenly the above works. My guess, because "pipe through" forces the download of each email for filtering (or adds some header?).

Reproducible: Always

Steps to Reproduce:
- create some filters that move email based on headers
- select multiple messages in a threaded imap message list by clicking on the first, holding shift and clicking on the last
- right-click and pick "apply filters" -> all filters

Actual Results:  
- only the messages that were shown in the preview pane when selecting

Expected Results:  
- successfully filter all selected emails

- adding a filter that pipes all emails through e.g. bogofilter makes the filters work on all messages
Comment 1 András Manţia 2012-10-13 19:04:02 UTC
Is this still valid in 4.9.2?
Comment 2 Denis Kurz 2016-09-24 20:36:13 UTC
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.
Comment 3 Denis Kurz 2017-01-07 21:25:31 UTC
Just as announced in my last comment, I close this bug. If you encounter it again in a recent version (at least 5.0 aka 15.08), please open a new one unless it already exists. Thank you for all your input.