On Wed, Apr 21, 2010 at 3:30 PM, Thomas Leuxner <t...@leuxner.net> wrote:
> 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 > } > What does it take to get Postfix to read this? $ cat passwd > u...@domain.tld:{scheme}<password>:5000:5000::/var/vmail/domain.tld/user::userdb_quota_rule=*:storage=5G > userdb_acl_groups=PublicMailboxAdmins > In which directory was this? > 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 > I suspect I will want to be maping virtuals between different domains, so I might have ab...@example.com mailad...@example.net ab...@example.net mailad...@example.net postmas...@example.com mailad...@example.net postmas...@example.net mailad...@example.net [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 > One thing I need to watch out for, and am concerned with because the last time I used Postfix there were a bunch of "virtual" configurations that really didn't work for me for a reason I cannot recall right now ... is that the same user name in different domains is NOT always the same user. E.g. b...@example.com is NOT the same person as b...@example.net while b...@example.org doesn't even exist. So there needs to be distinct entries for b...@example.com and b...@example.net (and not any for b...@example.org and have Postfix reject that during incoming SMTP sessions). There can also be cases where m...@example.com and m...@example.net are the same person, and Mike wants to have mail to these two addresses kept in separate mail boxes (and presumably must do separate logins, so he'd have to set up 2 accounts in his MUA) ... as well as st...@example.com and st...@example.net also being the same person, but Steve wants everything in one mailbox (so he'd have to pick between st...@example.com and st...@example.net and I'd have to set up a virtual map for the other to be delivered to the mailbox of his choice ... in a separate lookup table in Postfix). If this seems suitable I can send more details to you. > It might well be as long the domains are fully distinct. I'll have to go read up on each of the virtual_* configuration parameters to be sure of the effects. I was thinking to use: mailbox_command = /usr/lib/dovecot/deliver in Postfix main.cf. Is that workable instead of "virtual_transport = lmtp:unix:private/dovecot-lmtp" Or would running LMTP be a better way?