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 356092 - Incorrect recent mail detection for IMAP folders.
Incorrect recent mail detection for IMAP folders.
Status: RESOLVED DUPLICATE of bug 324804
Product: evolution-data-server
Classification: Platform
Component: Mailer
1.6.x (obsolete)
Other All
: Normal normal
: ---
Assigned To: evolution-mail-maintainers
Evolution QA team
Depends on:
Blocks:
 
 
Reported: 2006-09-15 08:35 UTC by Viktor Kojouharov
Modified: 2008-02-07 16:08 UTC
See Also:
GNOME target: ---
GNOME version: 2.13/2.14


Attachments
Fixes the filter problem (976 bytes, patch)
2006-09-15 08:52 UTC, Viktor Kojouharov
none Details | Review
correct patch for cvs HEAD (1.05 KB, patch)
2006-09-27 11:23 UTC, Viktor Kojouharov
rejected Details | Review

Description Viktor Kojouharov 2006-09-15 08:35:22 UTC
Please describe the problem:
When examining IMAP folders, evolution cannot detect which mail is recent.
This happens, if an external program (spam filter on the server), operates on the IMAP folder, thus clearing the recent flag. This is why using this flag for recent mail detection is unreliable. Ex: filtering recent mail doesn't work on IMAP folders, since it relies on said flag.

Steps to reproduce:
1. Set up an imap server with a spam filter (ex: isbg/spamassassin)
2. Set up a filter.
3. Receive mail.
4. Manually apply filter on the new mail, just to see that the filter itself works.


Actual results:
The filter doesn't work on newly obtained mail.

Expected results:
The filter works on newly obtained mail.

Does this happen every time?
Yes.

Other information:
Comment 1 Viktor Kojouharov 2006-09-15 08:52:38 UTC
Created attachment 72844 [details] [review]
Fixes the filter problem

This patch fixes the filter problem. The sidebar still incorrectly indicates that there are unread messages when they have been read (with bold letters and and the number of unread mail in [] brackets).
Comment 2 Viktor Kojouharov 2006-09-15 09:14:34 UTC
Comment on attachment 72844 [details] [review]
Fixes the filter problem


diff -ur ./camel/camel-folder.c /tmp/src/evolution-data-server-1.6.3/camel/camel-folder.c
--- ./camel/camel-folder.c	Wed May  3 16:59:26 2006
+++ /tmp/src/evolution-data-server-1.6.3/camel/camel-folder.c	Fri Sep 15 11:50:47 2006
@@ -1802,15 +1802,15 @@
 	}
 
 	if ((folder->folder_flags & (CAMEL_FOLDER_FILTER_RECENT|CAMEL_FOLDER_FILTER_JUNK))
-	    && changed->uid_recent->len > 0)
+	    && changed->uid_added->len > 0)
 		driver = camel_session_get_filter_driver(session,
 							 (folder->folder_flags & CAMEL_FOLDER_FILTER_RECENT) 
 							 ? "incoming":"junktest", NULL);
 		
 	if (driver) {
 		recents = g_ptr_array_new();
-		for (i=0;i<changed->uid_recent->len;i++)
-			g_ptr_array_add(recents, g_strdup(changed->uid_recent->pdata[i]));
+		for (i=0;i<changed->uid_added->len;i++)
+			g_ptr_array_add(recents, g_strdup(changed->uid_added->pdata[i]));
 	}
 
 	if (driver || junk || notjunk) {
Comment 3 André Klapper 2006-09-26 22:28:43 UTC
viktor, can you attach your patch once again as an attachment here please (cvs diff -pu)? thanks in advance...
Comment 4 Viktor Kojouharov 2006-09-27 11:23:07 UTC
Created attachment 73486 [details] [review]
correct patch for cvs HEAD

Ok, this is the correct patch, made from the cvs HEAD branch.
Comment 5 Thomas M. 2007-01-09 20:34:23 UTC
Marking as a duplicate of #324804, which is about same issue (related to the unreliable recent flag), but has the more extensive and recent discussion.

I'm also adding a note in 324804 that this bug has a working patch to workaround the issue (at least for me).

*** This bug has been marked as a duplicate of 324804 ***
Comment 6 rdavis 2007-04-25 20:03:15 UTC
I tested this patch and it seemed to work.  I have now upgraded to Gnome 2.18 with eds 1.10 and it seems to be happening again.  Was this patch integrated into 1.10?
Comment 7 André Klapper 2007-04-27 12:23:20 UTC
bug 324804 is still open and not closed as fixed, so obviously this has not been fixed yet.
Comment 8 Milan Crha 2008-02-07 16:08:58 UTC
After a discussion with Jeff, this patch will not be used, thus rejection for him.