Dovecot: allow dot in IMAP folder

Usually the dot is the separator for subfolders – here is the guide how to change it. Tested with Dovecot 2.2.33 with Sieve on Ubuntu 18.04.

Enable Dovecot Listescape plugin

for IMAP, LDA and LMTP and setup hierarchy separator

vi /etc/dovecot/dovecot.conf
protocol imap {
  mail_plugins = quota imap_quota listescape
  namespace {
    type = private
    separator = /
    inbox = yes
  }
}
protocol lda {
postmaster_address = postmaster@domain.xx
  mail_plugins = sieve quota listescape
  namespace {
    type = private
    separator = /
    inbox = yes
  }
}
protocol lmtp {
postmaster_address = postmaster@domain.xx
  mail_plugins = quota sieve listescape
  namespace {
    type = private
    separator = /
    inbox = yes
  }
}

Restart Dovecot

service dovecot restart

Check configuration

dovecot -n | grep mail_plugins
  mail_plugins = quota imap_quota listescape
  mail_plugins = quota
  mail_plugins = sieve quota listescape
  mail_plugins = quota sieve listescape
 dovecot -n | grep separator
    separator = /
    separator = /
    separator = /

ISPConfig Mailfilter

If ISPConfig does not allow / as separator, edit

vi /usr/local/ispconfig/interface/web/mail/form/mail_user_filter.tform.php

and replace the regex to

'regex' => '/^[\p{Latin}0-9\/.-_\ \&]{0,100}$/u',

See also