After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 610988 - Filter can't set labels on IMAP messages
Filter can't set labels on IMAP messages
Status: RESOLVED FIXED
Product: evolution
Classification: Applications
Component: Mailer
3.4.x (obsolete)
Other Linux
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
evolution[imap]
Depends on:
Blocks:
 
 
Reported: 2010-02-24 19:01 UTC by Patrick OCallaghan
Modified: 2013-09-13 01:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
eds patch (747 bytes, patch)
2012-02-21 14:26 UTC, Milan Crha
committed Details | Review

Description Patrick OCallaghan 2010-02-24 19:01:26 UTC
I use a filter to set labels on incoming messages. It works fine on a Cyrus IMAP account, but not on Gmail. I've logged the filter activity and it appears to show the label being set, but a subsequent check of the message shows no label. Here's a short extract from the filter log (this is the first filter to be called for every message):

Applied filter "Interesting" to message from Jatin K <ssh.fedora@gmail.com> - "lvm2-monitor service is dead !!!!" at Wed, 24 Feb 2010 11:48:50
Action: Set label to $Labeltodo
Applied filter "Interesting" to message from Kevin J. Cummings <cummings@kjchome.homeip.net> - "Re: Printing from Windows XP" at Wed, 24 Feb 2010 11:48:50
Action: Set label to $Labeltodo
Applied filter "Interesting" to message from Jim <mickeyboa@sbcglobal.net> - "Re: How to Get rid of Dragon Player" at Wed, 24 Feb 2010 11:48:51
Action: Set label to $Labeltodo

Note that manually-applied labels do work for Gmail messages.
Comment 1 Patrick OCallaghan 2010-02-26 00:22:57 UTC
Further info: labels *are* present on messages in Gmail's Inbox, but not when a Gmail filter has moved them to a different folder. Note that Evo's log still shows the label as being set.
Comment 2 André Klapper 2012-02-12 16:02:29 UTC
Hi Patrick, 
if you have time, could you please check again whether this issue still happens in Evolution 3.2.2 or 3.0.3 and update this report by adding a comment and changing the "Version" field and provide information about your distribution? Thanks a lot.
Comment 3 Patrick OCallaghan 2012-02-12 18:42:15 UTC
Hi André

The IMAP server I was using is no longer available as my university has converted to Google Apps. Consequently, I now do all my filtering via the Gmail (or GA) web interface, so the reported issue no longer arises for me. I'll try and test if when I get time, but I can't guarantee a quick response.
Comment 4 Milan Crha 2012-02-21 13:26:51 UTC
I was able to reproduce a similar issue with an IMAP account (not IMAP+), which behaved pretty similar, and after some investigating I realized it was evolution's fault.

I have a very simple reproducer:
a) setup filter which only sets label on a message (no moving to other folder)
b) make sure the folder to be filtered is not selected
c) send yourself a message which triggers the filter
d) wait few seconds (to have it received by the server)
e) select the destination folder

I had a bit luck, because I saw the newly received message, which was also recent, drawn in color for the label set by the filter, but a second alter it had the label removed again and was drown by usual color (black, in my case).
Comment 5 Milan Crha 2012-02-21 14:26:02 UTC
Created attachment 208120 [details] [review]
eds patch

for evolution-data-server;

This fixes the issue for me. The idea behind the change is that only messages which were not changed locally can resync also user flags on it, otherwise keep locally set flags. It syncs flags with a meaning that server flags are master, but for newly received messages, which were just changed by a filter and marked to be synced back to the server had been these user flag changes discarded, because server didn't have them set.
Comment 6 Milan Crha 2012-02-21 14:27:47 UTC
Created commit 696b658 in eds master (3.3.91+)