Dear all, How can I use dovecot for both "real" users and virtual users? I could configure dovecot for real users, by using these lines in /etc/dovecot.conf: default_mail_env = maildir:%h/Maildir auth default { passdb pam { } userdb passwd { } } To accept virtual users, I used these lines: default_mail_env = maildir:/usr/local/virtual/%u/ auth default { passdb sql { args = /etc/dovecot-mysql.conf } userdb sql { args = /etc/dovecot-mysql.conf } } But, again, how to accept both kind of users? I use Postfix as mail server, and use LDAP/PAM for real users that have home-directory on the system. My OS is Mandriva 2007, and I use dovecot that is bundled as an RPM package (dovecot 1.9 rc7) in the OS. The content of file /etc/pam.d/dovecot: #%PAM-1.0 auth required pam_stack.so service=system-auth account required pam_stack.so service=system-auth Thanks. Regards, Muhamad
----- Muhamad A. Martoprawiro <muhamad at chem.itb.ac.id> wrote:> My OS is Mandriva 2007, and I use dovecot that is > bundled as an RPM package (dovecot 1.9 rc7) in the OS.Sorry, I mean dovecot 1.0 rc7 Muhamad
* On 25/10/06 01:38 +0700, Muhamad A. Martoprawiro wrote: | Dear all, | How can I use dovecot for both "real" users and virtual users? | | I could configure dovecot for real users, by using these lines | in /etc/dovecot.conf: | default_mail_env = maildir:%h/Maildir | auth default { | passdb pam { | } | userdb passwd { | } | } | | To accept virtual users, I used these lines: | default_mail_env = maildir:/usr/local/virtual/%u/ | auth default { | passdb sql { | args = /etc/dovecot-mysql.conf | } | userdb sql { | args = /etc/dovecot-mysql.conf | } | } | | But, again, how to accept both kind of users? Use something like this (I use FreeBSD, hence master.passwd): passdb pam { args = * } userdb passwd { args = /etc/master.passwd } passdb sql { args = /etc/dovecot-mysql.conf } userdb sql { args = /etc/dovecot-mysql.conf } If the 1st option fails, Dovecot tries the alternative, IIRC. [snip irrelevant stuff] -Wash http://www.netmeister.org/news/learn2quote.html DISCLAIMER: See http://www.wananchi.com/bms/terms.php -- +======================================================================+ |\ _,,,---,,_ | Odhiambo Washington <wash at wananchi.com> Zzz /,`.-'`' -. ;-;;,_ | Wananchi Online Ltd. www.wananchi.com |,4- ) )-,_. ,\ ( `'-'| Tel: +254 20 313985-9 +254 20 313922 '---''(_/--' `-'\_) | GSM: +254 722 743223 +254 733 744121 +======================================================================+ If I traveled to the end of the rainbow As Dame Fortune did intend, Murphy would be there to tell me The pot's at the other end. -- Bert Whitney
On Wed, Oct 25, 2006 at 01:38:51AM +0700, Muhamad A. Martoprawiro may have written:> > But, again, how to accept both kind of users? > I use Postfix as mail server, and use LDAP/PAM > for real users that have home-directory on the system.Why not make your virtual users LDAP users also? The objectClass posixAccount is what makes a user a system user by default, so just leave that out of your virtual users. I force the uid and gid to a certain user called "vmail" which has no shell and no login privileges. This user then keeps all the homedirs and Maildirs for my virtual users. This seems far simpler than trying to manage users in both mysql and ldap. Enjoy, -- http://www.delink.net/ "It's almost like there's a record full of incomprehensible bullshit playing in your mind 24/7, and you put the needle down randomly and whatever it picks up, you just type it up in an email and shoot it off to me, usually mid-sentence." - Red Drag Diva in the monastery -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/x-pkcs7-signature Size: 3781 bytes Desc: not available URL: <http://dovecot.org/pipermail/dovecot/attachments/20061025/2954e564/attachment-0002.bin>