Dovecot Alias not working for folders with special characters

Hey guys!

I'm running into a problem with dovecot... Since my country native language is not english, everyone that uses Outlook (for example) to access its own mailbox, gets duplicated folders. As soon as I create an user and set up in Outlook, this is what I can see in the user maildir (via SSH):

.Itens Enviados
.Itens Exclu&AO0-dos
.Lixo Eletr&APQ-nico

Itens Enviados should be Sent folder

Itens Exclu&AO0-dos should be Trash folder (the actual word is Itens Excluídos, and that's how Outlook in my language show in its interface)

Lixo Eletr&APQ-nico should be Trash folder (the actual word is Lixo Eletrônico, and that's how Outlook in my language show in its interface)

Fun fact: Drafts folder is in english but Outlook is capable to save messages there. The correct word in my language is Rascunho, but Outlook is not creating this folder. Probably it detected easily since there's no special character in this word (no spaces or accents like í ô), but it's missing the translation.

This is my Dovecot mailboxes.conf file:

# NOTE: Assumes "namespace inbox" has been defined in 10-mail.conf.
namespace inbox {
  # These mailboxes are widely used and could perhaps be created automatically:
  mailbox Rascunhos {
    special_use = \Drafts
  mailbox Spam {
    special_use = \Junk
  mailbox Lixeira {
    special_use = \Trash

  # For \Sent mailboxes there are two widely used names. We'll mark both of
  # them as \Sent. User typically deletes one of them if duplicates are created.
  mailbox Enviados {
    special_use = \Sent
  mailbox "Itens Enviados" {
    special_use = \Sent
  mailbox "Itens Exclu&AO0-dos" {
    special_use = \Trash
  mailbox "Itens Excluídos" {
    special_use = \Trash
  mailbox "Lixo Eletr&APQ-nico" {
    special_use = \Junk
  mailbox "Lixo Eletrônico" {
    special_use = \Junk

For more compatibility with other mail clients I was expecting to keep all folders in English (so no translated folder is created) and set up all special cases that I know, to allow all folders to be synced to any mail client without new folders being created.

I've also tried to change the mailbox name and start it with a dot (for example: ".Lixo Eletrônico"), but that didn't work either.

All modifications in this file was done and I've deleted the user I was testing (both in Virtualmin and in Outlook) and I've stopped and started the Dovecot server in Webmin interface, in order to apply all modifications.

Roundcube is working flawlessly without duplicating folder (If I get in there first, before setting up Outlook). As soon as I set up Outlook for the testing user, I get all duplicated folder that were created in Outlook to be shown in Roundcube aswell.



Ilia's picture
Submitted by Ilia on Fri, 06/19/2020 - 10:02


Thanks for contacting us.

If I understood your problem correctly, it seems that you don't want certain folders to be automatically created. If so, you can control it by auto directive in mailbox section.

# auto:
#   Indicates whether the mailbox with this name is automatically created
#   implicitly when it is first accessed. The user can also be automatically
#   subscribed to the mailbox after creation. The following values are
#   defined for this setting:
#     no        - Never created automatically.
#     create    - Automatically created, but no automatic subscription.
#     subscribe - Automatically created and subscribed.

 mailbox Drafts {
    auto = no
    special_use = \Drafts

Besides, it might be configurable in Outlook somehow else or be just a bug. I see no issues you described in Thunderbird and Roundcube Webmail.

Hey Ilia Well... it's not exactly what I meant.

Since I want to have all mail clients to work in sync, without multiple folders to be created, Outlook still creates it's own translated folder. It seems Outlook is not detecting the special_use instruction to use determined folder as the one he is creating instead.

For example, the logic should be: Mail Client App (Outlook): Log into IMAP, check folders to sync. If it detects a "Virtual" folder called "Itens Enviados" with special_use Sent, he should not create "Itens Enviados" and use "Sent" folder as opposed to create "Itens Enviados". Do you notice the difference here?

I'm telling Outlook: Hey buddy, you MUST use Sent folder for you "Sent mails" purpose folder, instead of you creating "Itens Enviados", which would be your normally created folder if there was no rules for it.

Because if I just let Outlook create its own folders, when the user by anychance need to use Roundcube oo its own mobile mail client, each mail client will do one thing creating a mess of folders. Perhaps "Itens Enviados" for Outlook, "Sent" for Roundcube, "Enviados" if using another random mail client app, and so on. And when the user need to check he's emails in another app and send a message from there, each mail client will have different folders for the purpose of storing "Sent" messages, instead of every app use a common folder for this purpose.

Let me know if you could understand what I'm saying and if's possible to fix this behaviour. Thanks! :)

Any news? Thank you!