Dovecot + ISPConfig: Allow dots for IMAP folder

If Dovecot does not allow dots for IMAP foldernames, the “separator” has to be changed to support dots for folder names for Google Mail and Microsoft Exchange compatibility.

Allow Dovecot to use dots in IMAP folder

In Dovecot, the default separator for IMAP subfolders is:

.

The separator has to be changed to

/

ISPConfig will overwrite your dovecot.conf after every update, so put your custom settings in /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master and do a “force upgrade” and let ISPConfig reconfigure Dovecot.

vi /usr/local/ispconfig/server/conf-custom/install/dovecot_custom.conf.master
protocol imap {
  mail_plugins = imap_sieve quota imap_quota listescape
  namespace {
    type = private
    separator = /
    inbox = yes
  }
}
protocol lda {
  postmaster_address = [email protected]
  mail_plugins = sieve quota listescape
  namespace {
    type = private
    separator = /
    inbox = yes
  }
}
protocol lmtp {
  postmaster_address = [email protected]
  mail_plugins = sieve quota listescape
  namespace {
    type = private
    separator = /
    inbox = yes
  }
}

Reconfigure services

ispconfig_update.sh --force

When asked for “Reconfigure Services” answer with “yes”.

Check configuration

dovecot -n | grep mail_plugins
mail_plugins = quota
  mail_plugins = imap_sieve quota imap_quota listescape
  mail_plugins = quota
  mail_plugins = sieve quota listescape
  mail_plugins = sieve quota listescape
 dovecot -n | grep separator
    separator = /
    separator = /
    separator = /
service dovecot status
 dovecot.service - Dovecot IMAP/POP3 email server
     Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
     Active: active (running) since Fri 2021-12-03 21:05:45 CET; 43min ago
       Docs: man:dovecot(1)
             http://wiki2.dovecot.org/
   Main PID: 1535153 (dovecot)
      Tasks: 10 (limit: 4566)
     Memory: 11.5M
     CGroup: /system.slice/dovecot.service
             ├─1535153 /usr/sbin/dovecot -F
             ├─1535160 dovecot/anvil
             ├─1535161 dovecot/log
             ├─1535162 dovecot/config
             ├─1535231 dovecot/imap-login
             ├─1535232 dovecot/stats
             ├─1535233 dovecot/auth
             ├─1535235 dovecot/imap
             ├─1542034 dovecot/quota-status -p postfix
             └─1544267 dovecot/auth -w

See also