Bug 133210 - KMail don't set changes of mailstatus back to mailheader (Status:/X-Status:)
Summary: KMail don't set changes of mailstatus back to mailheader (Status:/X-Status:)
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kmail
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-29 21:41 UTC by Danny Kukawka
Modified: 2015-04-12 10:20 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Danny Kukawka 2006-08-29 21:41:10 UTC
Version:           Kontact: 1.2.3/KMail: 1.9.4 (using KDE KDE 3.5.4)
Installed from:    SuSE RPMs

While add support to read X-Status from mails while import and set the correct state for the imported mails in KMail I found this problems:

* KMail never set the correct X-Status / Status flag to the header of the Mail (tested with dIMAP and local maildir) if you don't move the mail
* KMail update the X-Status / Status flag if you move a mail to another maildir
* If I change the state of a mail e.g. from read to unread, leave the folder, exit kontact and restart KMail (another folder is selected!) the state of the mail is only displayed a very short time (e.g. one unread mail for the folder) the the state is changed back to previous state (no unread mail left in the folder)

Looks as if there are problems with set the correct Flags in the mail-header.
Comment 1 Ingo Klöcker 2006-08-30 09:26:10 UTC
We decided against updating the *Status headers because it's very expensive (it requires rewriting of all messages with changed status headers; think Mark All Messages as Read) compared to just updating the flags in the index file. So this explains observation no. 1. A possible solution would be to make KMail update the *Status headers during folder compactification.

Observation no. 2 is interesting because moving a maildir message locally should be a simply 'mv oldlocation newlocation' and thus don't change the moved messages at all. At most, the maildir flags (i.e. those appended to the file name) could be updated.

Observation no. 3 seems to be a bug. It seems that the index file isn't written properly. Do I understand correctly that you exit Kontact and then start KMail? Please file a separate bug report for this last problem because it seems to be a real bug while the other two problems are unrelated.
Comment 2 Danny Kukawka 2006-09-03 21:08:05 UTC
> A possible solution would be to make KMail update the *Status headers during  
> folder compactification.

This sounds for me like a acceptable compromise between correct flags and performance. At least X-Status should be updated (Not shure what the Status flag is for atm).

> Observation no. 2 is interesting because ...
This was what I could observe while experience with read the status while import.

> Observation no. 3 seems to be a bug. ...
Yes looks like a bug, but no, my fault, I closed Kontact and reopend Kontact. Btw. I open a new bug for this problem. 
Comment 3 Ingo Klöcker 2006-09-07 23:54:15 UTC
The Status flag is the standard well-defined header for keeping the message status, but it only supports a very limited set of flags. Therefore X-Status was introduced which supports more flags than Status. But X-Status is still limited which is why Mozilla adds new X-Mozilla-Status* headers. And we will probably have to do something similar because our flags also do not all map to Status + X-Status. Or maybe we should first check whether we can use the X-Mozilla-Status* headers. OTOH, the latter is probably not a good idea unless Mozilla officially specifies the headers.
Comment 4 Laurent Montel 2015-04-12 10:20:58 UTC
Thank you for taking the time to file a bug report.

KMail2 was released in 2011, and the entire code base went through significant changes. We are currently in the process of porting to Qt5 and KF5. It is unlikely that these bugs are still valid in KMail2.

We welcome you to try out KMail 2 with the KDE 4.14 release and give your feedback.