cPanel & WHM Version 114 has been released, and brings a slew of great updates. Take a look at what is included, and then upgrade today!

Create folders on the INBOX level in Dovecot

Feature Importer shared this idea 11 years ago
Open Discussion

As a Server Administrator, I want to be able to create folders on the INBOX level in Dovecot, so that I can customize the mail folders in my inbox.

We've been asked why it isn't possible to create IMAP folders on the same level as the INBOX. I assume this is due to Courier compatibility which might not be as important as it used to be (at least for us - we won't change back).

This is a feature that has been migrated over from the cPanel Forums. All previous comments and discussions concerning this feature can be located at:

Replies (7)


How many iterations of root folder have you tried in the email client?


We've just had a customer requesting this too.

It's quite difficult to explain that this limitation is because we use the best control pannel.



This feature should be implemented since most email clients can't auto configure Sent/Trash and other folders automatically if they aren't at the root level.

It's always hard for clients to setup manually those folders.

There's no logical reason on having everything inside INBOX. Also dovecot default doest not force an INBOX prefix or everything to be created under that folder.

Thank you.


Is there any reason why someone would use courier now that all the isues with dovecot have been resolved ?


Hey everyone

I believe we have found a working solution to this.

First a brief intro to the issue: A number of clients wanted to have the ability to add subfolders do their inboxes. This was previously not possible due to backwards compatibility with Courier being required. cPanel has as of 11.52 removed Courier as an option and therefore now is a good time to remove backwards compatibility.

First of all as mentioned in:

You have to:

1) Copy the /var/cpanel/templates/dovecot2.2/main.default file to the /var/cpanel/templates/dovecot2.2/main.local file.

2) Open the /var/cpanel/templates/dovecot2.2/main.local file in you preferred text editor.

Add / edit the template file with the below:

  1. # Changed mail location layout to support LAYOUT=fs thus enabling the use of "/" as a separator.
  2. # We do this in order to provide support for hierarchical structures of the "Inbox" folder.
  3. # The main reason for utilizing LAYOUT=fs is that according to the namespace convention
  4. # the separator "." makes it impossible to distinguish between "" meaning INBOX's
  5. # "foo" child # or the root "foo" mailbox in "INBOX."
  6. mail_location = maildir:~/Maildir:LAYOUT=fs
  7. #In order to provide a proper prefix using namespaces we make sure to define a distinct namespace for "inbox"
  8. namespace inbox {
  9. # As mentioned under "mail_location" we use the LAYOUT=fs option and in order to
  10. # allow INBOX to have children we use "/" as separator. Furthermore, this separator
  11. # is known to cause the least amount of issues.
  12. separator = /
  13. # The previous setting was prefix = INBOX.
  14. # Due to having already set the prefix at the namespace level setting it herewould be redundant.
  15. # We therefore leave it empty.
  16. prefix =
  17. # There can be only one INBOX, and this setting defines which namespace
  18. # has it.
  19. inbox = yes
  20. # Subscriptions need to be set to yes, when using an empty prefix. Therefore, we have to enable this.
  21. subscriptions = yes

Then run: /usr/local/cpanel/scripts/builddovecotconf


According to the Dovecot wiki regarding namespaces: you can use:

  1. namespace compat {
  2. separator = .
  3. prefix = INBOX.
  4. inbox = no
  5. hidden = yes
  6. list = no
  7. alias_for =
  8. }

DO NOT USE THIS! It will break on Mac based clients as well as Thunderbird based clients. There is no need for this, and it will not work.

Summary / Results:

We have tested this across a number of platforms, currently:

  • Outlook 2010
  • Outlook 2013
  • Outlook 2016
  • Outlook 2016 for Mac
  • Native Mac mail client
  • Thunderbird

It is possible to do this even on a live server without any great repercussions. However, as always test it on a safe

environment first.


We still have this problem.

Some of our customers only use POP3 because of this. With POP3 all folders are at the same level.

One huge problem caused by this, is that Outlook is unable to translate the folders names to the users language when they are in the INBOX. In can translate "Sent" but not "INBOX.Sent".

I don't currently know of any non cPanel e-mail suppliers that have the Sent and Trash folders inside the INBOX.


I'm surprised this hasn't got more votes. I think it could be because it doesn't affect english speaking users so much.

cPanel IMAP is not currently compatible with Outlook :

  • Outlook does not name the sent / trash / drafts folders in non english language installs
  • Outlook users are not used to having these folders inside the inbox folder

Both issues require folders not being inside the inbox folder but at the same level as the inbox folder. All e-mail suppliers that we have tested do it this way, except cPanel.


I've the same problem with cPanel's IMAP email and Outlook.

No way to see "translated" folder in Outlook - OK with Thundebird and Mail (Mac).

Is there a solution for this annoying problem?

You say the problem is that the folder is "inside" INBOX?

Leave a Comment
Attach a file