I'm running a setup that should be good enough for what you are trying to 
achieve. All user information is stored in flat files per domain and you may 
override per user settings individually:

passdb {
  args = username_format=%u /var/vmail/auth.d/%d/passwd
  driver = passwd-file
}

userdb {
  args = username_format=%u /var/vmail/auth.d/%d/passwd
  driver = passwd-file
}

$ cat passwd 
u...@domain.tld:{scheme}<password>:5000:5000::/var/vmail/domain.tld/user::userdb_quota_rule=*:storage=5G
 userdb_acl_groups=PublicMailboxAdmins

I would vote against storing aliases in these files though. Reason being the 
Postfix alias files are more flexible, because you would need to setup NULL 
password/No Login users or similar in the Dovecot backend. Another reason to 
keep them in Postfix is to completely separate alias management from the user 
management and use the same for login checks.

See how aliases are used for routing and to authenticate valid mail from 
senders with one file:

$ cat virtual
al...@domain.tld                lo...@domain.tld
postmas...@domain.tld           lo...@domain.tld

[main.cf]
virtual_mailbox_domains = domain.tld, domain1.tld
virtual_mailbox_base = /var/vmail
virtual_minimum_uid = 100
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_transport = lmtp:unix:private/dovecot-lmtp
[…]
smtpd_sender_login_maps=hash:/etc/postfix/virtual

If this seems suitable I can send more details to you.

Regards
Thomas



Reply via email to