Bug 278737 - mails marked as read show unread upon next folder refresh
Summary: mails marked as read show unread upon next folder refresh
Status: RESOLVED WORKSFORME
Alias: None
Product: Akonadi
Classification: Frameworks and Libraries
Component: Mixed Maildir resource (show other bugs)
Version: 1.0.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-28 21:57 UTC by JHF2442
Modified: 2016-09-27 06:08 UTC (History)
9 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description JHF2442 2011-07-28 21:57:20 UTC
Version:           2.1.1 (using KDE 4.6.5) 
OS:                Linux

messages from old maildirs are marked as unread - why ? good question.

marking the messages as read, they appear anew unread upon "Update folder" command.

However, not all emails in the folder are marked as unread, and it's not affecting all folders (but many)

Reproducible: Sometimes

Steps to Reproduce:
- "update folder" command
- mark all emails as read (no matter how)
- no unread emails
- "update folder" command


Actual Results:  
emails are already unread

Expected Results:  
emails remain read

maildir folders come from kmail1.x

good news : removing the .folder_name.index file (replace folder_name with name of the folder) seems to solve the issue - is this OK or does it involve collateral damage ?

possibly a dupe of #276856, but I don't see the issue in my inbox, rather in my "historic" folders, so maybe a different root cause
Comment 1 Philipp Woelfel 2011-07-30 18:02:51 UTC
Same here with kmail2, KDE 4.7 (openSUSE RPMs). Except that removing .folder_name.index doesn't seem to fix the issue
Comment 2 JHF2442 2011-07-31 21:50:21 UTC
Tested with 4.7, seems to be a little better :
- in folder People/Alice -> emails marked as read remain read
- in folder People/Alice/Urgent -> emails always go back to unread upon refresh/rescan

With 4.6.5 , emails in People/Alice and People/Alice/Urgent always were marked as unread. Unfortunately, I have no emails in People/, so I can't tell the effect there
Comment 3 Philipp Woelfel 2011-07-31 22:12:24 UTC
After removing all .folder.index and all .folder.index.ids files in the entire maildir directory tree, and starting with a clean akonadi and kmail2 configuration, I got JHF2442's workaround to work...
Comment 4 Thomas Fischer 2011-12-04 14:51:10 UTC
I got a similar problem: In my process of sorting mails, I manually mark messages as read (I disabled automatic marking as read) and move them to another folder on the same IMAP server. Pressing "Check Mail" for manual refresh makes the mail re-appear in the INBOX -- unread. At the same time, the same mail resides in the folder where I moved it to -- unread as well.
Seems to a bug where local operations (mark emails as read, move between folders) on a (remote) mail folder is not propagated to the server if a manual check is done. My guess is that uploading local changes is delayed/deferred for performance reasons. However, once the user triggers a manual check, those change should be flushed to the server before fetching the remote mail folder's current state.
Comment 5 Silver Salonen 2012-02-10 09:17:23 UTC
In my case it happens with all folders on both of my IMAP-accounts. I guess it really is duplicate of 276856.

KMail is 4.8.0.
Comment 6 András Manţia 2012-02-11 23:36:02 UTC
As the original report is for mixed maildir format (where .index files are used), I move this to that product. If you see similar behavior with IMAP or standard maildir, please open a new report.
Comment 7 András Manţia 2012-02-11 23:36:02 UTC
*** This bug has been confirmed by popular vote. ***
Comment 8 Silver Salonen 2012-02-14 14:51:50 UTC
Similar bug report for IMAP accounts: bug 294074.
Comment 9 Martin L ü c h e m 2012-05-20 12:08:35 UTC
same here!

See also bug 263284

Regards, Martin
Comment 10 Denis Kurz 2016-09-24 20:42:19 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 11 JHF2442 2016-09-26 21:05:20 UTC
No longer seen in kmail 5.3.0
Comment 12 Denis Kurz 2016-09-27 06:08:55 UTC
Thanks for the reply, closing