Unnecessary maintenance of both passdb and userdb files?

Currently HestiaCP maintains the info about mail users in 3 different files:

  1. /usr/local/hesta/data/users/$USER/mail/$DOMAIN.conf
  2. /etc/exim4/domains/$DOMAIN/passwd
  3. /etc/exim4/domains/$DOMAIN/accounts

It seems to me that the accounts file may be unnecessary, since its data is also contained in the passwd file.

It also seems that HestiaCP’s Dovecot uses only the passwd file (and I could find no references to the accounts file outside of HestiaCP own code):

# more /etc/dovecot/conf.d/auth-passwdfile.conf.ext
passdb {
  driver = passwd-file
  args = scheme=MD5-CRYPT username_format=%n /etc/exim4/domains/%d/passwd

userdb {
  driver = passwd-file
  args = username_format=%n /etc/exim4/domains/%d/passwd

PS: Some background about Dovecot’s passdb vs userdb

I also opened an issue about it:

We could probably comment-out the lines creating/editing file accounts in


HestiaCP is already using the combined format (and not a separate userdb), because its passwd includes fields prefixed with userdb_ , which otherwise would be be treated as passdb extra fields

More at User database extra fields — Dovecot documentation

user:{plain}pass:1000:1000::/home/user::userdb_mail=mbox:~/mail userdb_quota_rule=*:storage=100M userdb_namespace/default/separator=/
user2:{plain}pass2:1001:1001::/home/user2::userdb_mail=maildir:~/Maildir userdb_quota_rule=*:storage=200M

This subject is also relevant to @eris idea of storing Exim4 per user send limits in the domain’s /etc/exim4/domains/$DOMAIN/passwd file.

Please keep the location in one location ^^

It makes more sense …

Will close the discussion here. Please move to Github…