Bug 1827973 Comment 13 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

(In reply to Matt from comment #12)
> Can't we stop using compact as a word when using maildir.  The process being "exposed" is expunge and really is unrelated at all to compacting as it relates to MBOX.

Yes, "Compact" does trigger an imap expunge for both maildir and mbox.

For maildir, if you use "just mark as deleted" mode and you delete a message, its file remains present in the maildir "cur" directory on filesystem. Then if you do the "compact" command, the mailbox is imap is expunged and the file is removed from the "cur" directory. So, in a sense, the maildir directory on the filesystem is made smaller. So "compact" is effectively what occurs for imap in "mark as deleted" mode.

For maildir, if you use "delete to trash" mode and you delete a message, the message goes to trash mailbox and is removed from the "cur" directory on filesystem immediately. So, in that mode, the "compact" command does no filesystem changes and only does imap expunge.

So when the delete mode is "delete to trash" (and also probably "delete immediately") it would not be incorrect to change the command name from "compact" to "expunge". However, since historically "compact" has always been the choice, a lot of users wouldn't know what "expunge" is referring to. So I would vote to just keep it as "compact" for code simplicity and historical reasons.
Also, an imap expunge is also effectively a compacting process at the server since messages stored there that are marked deleted are deleted from the server resulting in less usage against any quota.

I do see that if you have Local Folders or a POP account (both with location URL starting with "mailbox://") using maildir, the option to "compact" doesn't appear in context menu or in top level "File" menu. This makes sense since mailbox:// accounts always delete messages into a Trash folder and there is no option just mark a message as deleted.
(In reply to Matt from comment #12)
> Can't we stop using compact as a word when using maildir.  The process being "exposed" is expunge and really is unrelated at all to compacting as it relates to MBOX.

Yes, "Compact" does trigger an imap expunge for both maildir and mbox.

For maildir, if you use "just mark as deleted" mode and you delete a message, its file remains present in the maildir "cur" directory on filesystem. Then if you do the "compact" command, the mailbox is imap is expunged and the file is removed from the "cur" directory. So, in a sense, the maildir directory on the filesystem is made smaller. So "compact" is effectively what occurs for imap in "mark as deleted" mode.

For maildir, if you use "delete to trash" mode and you delete a message, the message goes to trash mailbox and is removed from the "cur" directory on filesystem immediately. So, in that mode, the "compact" command does no filesystem changes and only does imap expunge.

So when the delete mode is "delete to trash" (and also probably "delete immediately") it would not be incorrect to change the command name from "compact" to "expunge". However, since historically "compact" has always been the choice, a lot of users wouldn't know what "expunge" is referring to. So I would vote to just keep it as "compact" for code simplicity and historical reasons.
Also, an imap expunge is also effectively a compacting process at the server since messages stored there that are marked deleted are deleted from the server resulting in less usage against any quota.

I do see that if you have Local Folders or a POP account (both with location URL starting with "mailbox://") using maildir, the option to "compact" doesn't appear in context menu or in top level "File" menu. This makes sense since mailbox:// accounts always delete messages into a Trash folder and there is no option to just mark a message as deleted.

Back to Bug 1827973 Comment 13