[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!
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
dovecot -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/passwd
The 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/%u
That's a separate problem. See the bottom of http://wiki.dovecot.org/MailLocation/Mbox
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@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
participants (3)
-
Jim Pazarena
-
Linux Advocate
-
Timo Sirainen