Skip to content

Dovecot UserDB as multiple files for domains

Separate files for each domain:

/etc/dovecot/conf.d/auth-passwdfile.conf.ext

passdb {
  driver = passwd-file
  args = scheme=plain username_format=%u /etc/dovecot/userdb/%d
}

userdb {
  driver = passwd-file
  args = username_format=%u /etc/dovecot/userdb/%d

  default_fields = uid=dovenull gid=dovenull userdb_mail=/data/mail/%d/%n

  override_fields = home=/data/mail/%d/%n
}