+++ This bug was initially created as a clone of Bug #855954 +++ Tag is not written in X-Mozilla-Keys: upon copy from IMAP/Maildirstore Offline-Use=On mbox to non-IMAP/Maildirstore mbox or upon overflow of X-Mozilla-Keys:, and, as Compact is killed in Maildir, there is no way to force writing tag in X-Mozilla-Keys:
Because tag is not physically written to X-Mozilla-Keys:, tag is lost by Repair Folder => dataloss.
(dataloss = critical)
I'll track this since I am committed to making maildir reliable in TB 38.
(In reply to Kent James (:rkent) from comment #3) > I'll track this since I am committed to making maildir reliable in TB 38. I believe MaildirStore can be released as "usable feature" without fixing this bug. Even if "move/copy of tagged mail fron imap to local MaildirStore folder" is not so rare, "Repair Folder at the local MaildirStore folder after the move/copy" is rare. Even if tag will be lost by Repair Folder, re-adding the tag is possible(remove, re-add the tag). Overflow of X-Mozilla-Keys: is pretty rare. Tag used for "X-Mozilla-Keys: overflow test" is one like next :-) mailnews.tags.Tag0000000000000000000000000000000000000000000000000000000000000000001.tag = Tag-1 mailnews.tags.Tag0000000000000000000000000000000000000000000000000000000000000000002.tag = Tag-2 And, symptom of this bug is applicble to "move/copy from imap to BerkleyStore local folder" except "Compact is impossible". If bug 1144359 will be fixed, "issues cited by this bug" will not produce actual problem.
Writing of X-Mozilla-* headers is quite strange even in mbox. E.g. if we create new messages in tests and those get written to mbox file, there are none of these headers. You must initiate compact to get them written out. See my test in https://bug840418.bugzilla.mozilla.org/attachment.cgi?id=8564733 . It seems to me we only specially write out the headers in case of POP3 download. It amazes me how we open-code writing out these headers at some places. There should be one common universal function that we could just call to dump the headers out anytime a message is serialized to disk (whether mbox or maildir). But I don't think you can realistically and nicely fix all the cases for TB38.