Dovecot with MBOX, IMAP and subfolders, or “Target mailbox doesn’t allow inferior mailboxes”

By mstolte No comments

[this post was deleted years ago with my previous WordPress install but as I saw it was still visited resulting in a 404, I put it back by getting the content from the wayback machine]

When using IMAP with Dovecot, and Dovecot using MBOX to store the mails, working with subfolders can be awkward to say the least.
As there isn’t much to be found in one place about this, I thought I’d write a small blog about it.

The MBOX format limits your clients to creating subfolders that can either store folders, or emails, not both. When creating a folder, you differentiate between a folder for storing folders or for storing emails by adding or leaving out a forward slash at the end of the folder name: A folder name like ‘withsubfolders/’ will be able to store folders, a folder name like ‘onlyemails’ will only be able to store emails. If you try to create a subfolder in a folder that has been created without the forward slash you will get the nice error “Target mailbox doesn’t allow inferior mailboxes”.

A nice problem this limitation causes is when deleting folders in Microsoft Outlook you encounter the problem that the ‘removed items’ folder has been created to store only mails, so it will not be able to store deleted folders. You will get the ‘inferior mailboxes’ error from the previous paragraph. You can however work around this by pressing shift when trying to delete a folder, which will delete it immediately.

Leave a Reply