Bug 147509 - Already read emails are re-mark unread after selecting another folder or closing kmail
Summary: Already read emails are re-mark unread after selecting another folder or clos...
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail
Classification: Applications
Component: index (show other bugs)
Version: 1.9.7
Platform: unspecified Linux
: NOR normal (vote)
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords: triaged
Depends on:
Blocks:
 
Reported: 2007-07-03 20:34 UTC by Manuel Koch
Modified: 2009-04-05 13:50 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Situation when starting kmail, have several unread mails (430.86 KB, image/png)
2007-07-03 20:36 UTC, Manuel Koch
Details
After selecting each mail they get marked as read (419.75 KB, image/png)
2007-07-03 20:37 UTC, Manuel Koch
Details
Selected another folder and returned to inbox, all prev unread are unread again (417.33 KB, image/png)
2007-07-03 20:38 UTC, Manuel Koch
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Manuel Koch 2007-07-03 20:34:52 UTC
Version:           1.9.7 (using KDE 3.5.7, Debian Package 4:3.5.7.dfsg.1-1 (lenny/sid))
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.21.3-mactelmko

I'm using a POP3 account and a IMAP account for email.

After I have read my new mails they appear un-read again
- when I select a different folder and return to Inbox afterwards
- kmail closes and becomes visible again
- kmail quits and is started again

Please see attached screenshots.
Comment 1 Manuel Koch 2007-07-03 20:36:12 UTC
Created attachment 21027 [details]
Situation when starting kmail, have several unread mails
Comment 2 Manuel Koch 2007-07-03 20:37:41 UTC
Created attachment 21028 [details]
After selecting each mail they get marked as read
Comment 3 Manuel Koch 2007-07-03 20:38:38 UTC
Created attachment 21029 [details]
Selected another folder and returned to inbox, all prev unread are unread again
Comment 4 Thomas McGuire 2007-07-09 19:03:56 UTC
Does this problem happen for all mails or only the IMAP ones?
If so, this is probably the same as bug 140010.
Comment 5 Manuel Koch 2007-07-10 08:45:28 UTC
The problem I mentioned appears to happen only for my Inbox folder ( which contains only POP3 mails ).
I have several other folders to which I copy incoming fails automatically by specified rules. When a mail of
a folder ( not inbox-folder ) is read it stays in this read-state.

Additonally I have another IMAP account which uses other folders. As far as I know there's no problem with the
IMAP stuff when it comes to read-mark issue.

-----Urspr
Comment 6 Thomas McGuire 2007-07-15 15:25:22 UTC
Please remove the original message when replying to bugzilla.


Hmm, strange problem, I haven't seen anything like that.
Maybe you index file for your inbox is corrupt or read-only for some reason.
Comment 7 Manuel Koch 2007-07-15 18:56:11 UTC
How can I see if this may be the problem.
Where are the mentioned files located and what permissions do they need to 
have ?
Comment 8 Thomas McGuire 2007-07-17 16:15:15 UTC
>Where are the mentioned files located and what permissions do they need to have ? 
The index files are located under $HOME/.kde/share/apps/kmail/mail
Seems that the files you want to look at are .index.*
WARNING: Do not delete these files without a backup
Comment 9 Jaroslaw Gorny 2007-07-29 21:55:12 UTC
Fedora 7, KDE-3.5.7, KMail-1.9.7 - I confirm this bug, it hit me couple of days ago, but IMHO _not_ immediately after any KDE component upgrade.
Comment 10 Ville Skyttä 2007-07-29 22:36:33 UTC
I see it too, ditto on Fedora 7, and I think it started just a week or so ago.  In  the setup where I see this, I have no IMAP accounts, just one local and one POP (gmail).  The Fedora bug is https://bugzilla.redhat.com/250009
Comment 11 Jaroslaw Gorny 2007-07-30 22:05:09 UTC
I checked what is goin on in ~/.kde/share/apps/kmail/mail/* directories.
IIRC file that stores read e-mail should have ":2,S" suffix.

And I see here that this suffix is _NOT_ added, no matter if I:
- read the message,
- choose "mark all as read" in apropriate folder
Hovewer in kmails dir/status view, number of unread mail is being refreshed.

So, num_unread_mail != num_files_with_":2,S"_suffix
And obviously, if I visit that directory again - kmail refreshes dir/status view, and this messages re-appear as unread.

The only combination that 'works' is:
1. "mark all as read",
2. "compress folder"
Doing this makes ":2,S" appear where it should be.
But after kmail restart this wrong behaviour returns.
Comment 12 Manuel Koch 2007-08-01 18:51:15 UTC
After removing all *.index files from the mail directories everthing works as expected.
Comment 13 Ville Skyttä 2007-08-01 19:49:19 UTC
Removing *.index makes no difference here.

Also, some new info @ https://bugzilla.redhat.com/250009:
All my "important" and "todo" marks are gone from all mails, and newly created marks disappear as soon as I switch away from the folder.
Comment 14 Michael Leupold 2009-04-05 09:45:34 UTC
Reading the RedHat bugreport implies that this was either a problem with their packages or with your system times set wrong. Can you confirm that this problem is gone and - if that's the case - close this report please?