Jim Pazarena
2009-Mar-05 01:54 UTC
[Dovecot] setting up both system password users AND virtual users
I'm afraid that I am a rookie at dovecot, and cannot seem to figure the configuration for a dual system & virtual setup. For now I am using POP3 ---only--- I've got the "system" working, but cannot figure out how to add the virtual system. The docs aren't quite clear enough for me to understand. The wiki example for dynamic passwd-file locations shows: mail_location = maildir:/home/%d/%n/Maildir userdb passwd-file etc etc I am using mbox, not maildir, AND I've already used mail_location for my system accounts with the following line: mail_location = mbox:~/mail/:INBOX=/mail/%u In the case of my virtual users, the mail is stored in INBOX=/mail/VIRTUAL/%d/%u and the password file is stored in /exim/etc/VIRTUAL/%d/passwd would someone kindly help me with this? thanks!
Timo Sirainen
2009-Mar-13 19:46 UTC
[Dovecot] setting up both system password users AND virtual users
On Wed, 2009-03-04 at 17:54 -0800, Jim Pazarena wrote:> I've got the "system" working, but cannot figure out how to add the virtual system. > The docs aren't quite clear enough for me to understand. > > The wiki example for dynamic passwd-file locations > shows: mail_location = maildir:/home/%d/%n/Maildir > userdb passwd-file etc etcdovecot -n output would have been helpful.> In the case of my virtual users, the mail is stored in INBOX=/mail/VIRTUAL/%d/%u > and the password file is stored in /exim/etc/VIRTUAL/%d/passwdThe important part is if you're going to use userdb passwd-file or if userdb static is enough. If static is enough, you can do simply: # for system users userdb passwd { } # fallback for virtual users userdb static { args = uid=vmail gid=vmail mail=mbox:/home/%d/%n:INBOX=/mail/VIRTUAL/%d/%u }> NO home space, but I would consider /home/%d/%uThat's a separate problem. See the bottom of http://wiki.dovecot.org/MailLocation/Mbox -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20090313/681c142f/attachment-0002.bin>
Linux Advocate
2009-Mar-14 04:45 UTC
[Dovecot] setting up both system password users AND virtual users
> Subject: Re: [Dovecot] setting up both system password users AND virtual users > > On Wed, 2009-03-04 at 17:54 -0800, Jim Pazarena wrote: > > > I've got the "system" working, but cannot figure out how to add the virtual > system. > > The docs aren't quite clear enough for me to understand. > > > > The wiki example for dynamic passwd-file locations > > shows: mail_location = maildir:/home/%d/%n/Maildir > > userdb passwd-file etc etc >yeah, i had difficulty in understanding the docs as well especially the sql queries. i have postfix+dovecot+postfixadmin working with virtual users. U will need to make adjustments for exim. i used dovecot's LDA and its SASL fucntionality. I have appended here my dovecot.conf . ## Dovecot configuration file protocols = imap pop3 disable_plaintext_auth = no protocol lda { postmaster_address = abcdefgh at yahoo.com } auth default { mechanisms = plain userdb sql { args = /etc/dovecot-mysql.conf } passdb sql { args = /etc/dovecot-mysql.conf } socket listen { master { path = /var/run/dovecot/auth-master mode = 0660 user = vmail group = vmail } client { path = /var/spool/postfix/private/auth mode = 0660 user = postfix group = postfix } } } # Debugging options auth_verbose = yes auth_debug = yes mail_debug = yes There are other files which u need to setup such as /etc/dovecot-mysql.conf driver = mysql connect = host=localhost dbname=postfix user=postfix password=kpostfix default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT maildir, 101 AS uid, 101 AS gid FROM mailbox WHERE username = '%u' Good LUck