Dear /dev/rob0,
Thanks for your answer. This was exactly what I was trying to do except the reference I was using used one file for each of the userdb and passdb. When I attempted your suggestion below, I noticed that I was missing a colon":" I had been looking at this for days and did not see the problem.
Again, thanks for the help, Jens
/dev/rob0 wrote:
On Wednesday 04 October 2006 15:54, Jens E. Madsen Jr. wrote:
default_mail_env = maildir:/var/spool/vmail/%d/%n/ which, when commented out, works for system users default_mail_env = mbox:~/mail/:INBOX=/var/spool/mail/%u which, when commented out, which works for virtual users
If both are uncommented, only system users work.
Wiki-ing and Googling, I learned that namespace could be applied to the problem.
It's not necessary. Rather than answer your question, I'll tell how I
do this.In Postfix, I deliver local(8) users to a home_mailbox maildir, and virtual(8) users to a comparable spot:
/etc/postfix/main.cf : # Unix system accounts home_mailbox = mail/ # virtual mailbox accounts virtual_mailbox_base = /home/vmail virtual_mailbox_domains = example.com virtual_mailbox_maps = hash:$config_directory/vmailbox
/etc/postfix/vmailbox : vuser1@example.com example.com/vuser1/mail/ vuser2@example.com example.com/vuser1/mail/
In Dovecot, collect from there:
/etc/dovecot.conf : default_mail_env = maildir:~/mail # and in the auth section auth default { mechanisms = plain passdb shadow { } userdb passwd { } passdb passwd-file { args = /etc/dovecot.virtual } userdb passwd-file { args = /etc/dovecot.virtual } ... and so on
And in the Dovecot virtual passdb, you list the virtual $HOME for each user:
/etc/dovecot.virtual : vuser1:{PLAIN}pass:710:710::/home/vmail/example.com/vuser1:/bin/false: vuser2:{PLAIN}word:710:710::/home/vmail/example.com/vuser2:/bin/false:
If you're using a RDBMS, adjust to taste. It has the same idea regardless of your passdb/userdb backends. Tell Postfix to deliver to the same place you tell Dovecot to check for mail.