I've done some more tests on this with maildir and mbox. With maildir the problem seems to be that it fails here: https://searchfox.org/comm-central/rev/94dde9f62467a62fdcab1ec8c5acafa14df5151d/mailnews/db/msgdb/src/nsMsgDatabase.cpp#4209 This function that returns the "row" succeeds (returns NS_OK) but the pointer to the row, *hdrRow is always null when maildir is used. It is non-null when mbox is used so the header is retrieved and seen as having offline store in the calling function (at least when message has Inbox label, see below). However, even with mbox this only seems to work when the original label is on Inbox. There is no label returned by the imap fetch when the message is in All Mail so if the message has been moved from Inbox the access in the new label causes a re-fetch and it writes new offline storage. Sent label may also work but I didn't try it. The other system labels (Drafts, Junk, Trash) probably don't work since they don't have offline store by default, but, even if they did, probably no reason you would place other labels on them anyhow So, in general, I would say that this feature (non-redundant storage and fetching) is effectively broken and of little use for both "pluggable stores", mbox and maildir. The database code that handles this and was added to support this feature is pretty much beyond my understanding. There are 3 comments that sort of describe the theory of operation but I think most of the discussion between the mentor Bienvenu and the "summer of code" developer was handled via IRC: Bug 721316 comment 11 Bug 721316 comment 13 Bug 721316 comment 14
Bug 1554529 Comment 12 Edit History
Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.
I've done some more tests on this with maildir and mbox. With maildir the problem seems to be that it fails here: https://searchfox.org/comm-central/rev/94dde9f62467a62fdcab1ec8c5acafa14df5151d/mailnews/db/msgdb/src/nsMsgDatabase.cpp#4209 This function that returns the "row" succeeds (returns NS_OK) but the pointer to the row, *hdrRow is always null when maildir is used. It is non-null when mbox is used so the header is retrieved and seen as having offline store in the calling function (at least when message has Inbox label, see below). However, even with mbox this only seems to work when the original label is on Inbox. There is no label returned by the imap fetch when the message is in All Mail so if the message has been moved from Inbox the access in the new label causes a re-fetch and it writes new offline storage. Sent label may also work but I didn't try it. The other system labels (Drafts, Junk, Trash) probably don't work since they don't have offline store by default, but, even if they did, probably no reason you would place other labels on them anyhow So, in general, I would say that this feature (non-redundant storage and fetching) is effectively broken and of little use for both "plugable stores", mbox and maildir. The database code that handles this and was added to support this feature is pretty much beyond my understanding. There are 3 comments that sort of describe the theory of operation but I think most of the discussion between the mentor Bienvenu and the "summer of code" developer was handled via IRC: Bug 721316 comment 11 Bug 721316 comment 13 Bug 721316 comment 14