Stephen Bowman
2011-Dec-01 17:26 UTC
[Dovecot] LDAP Authentication - Home Directory Creation
How does everyone handle this case? Users are authenticated by LDAP, and do not have accounts on the IMAP/dovecot server. When a new user is added to LDAP, the home directory (/home/newuser) needs to be created on the IMAP/dovecot server so dovecot can create the mail directories inside it (/home/newuser/mail/). Obviously I can come up with a few custom solutions, utilizing cron, but I feel like there's a cleaner solution out there. Thanks!
Tom Hendrikx
2011-Dec-01 17:51 UTC
[Dovecot] LDAP Authentication - Home Directory Creation
On 01-12-11 18:26, Stephen Bowman wrote:> How does everyone handle this case? > > Users are authenticated by LDAP, and do not have accounts on the > IMAP/dovecot server. When a new user is added to LDAP, the home > directory (/home/newuser) needs to be created on the IMAP/dovecot > server so dovecot can create the mail directories inside it > (/home/newuser/mail/). > > Obviously I can come up with a few custom solutions, utilizing cron, > but I feel like there's a cleaner solution out there.How about http://wiki.dovecot.org/PostLoginScripting and something containing 'mkdir -p' ? -- Tom
Timo Sirainen
2011-Dec-01 20:48 UTC
[Dovecot] LDAP Authentication - Home Directory Creation
On 1.12.2011, at 19.26, Stephen Bowman wrote:> How does everyone handle this case? > > Users are authenticated by LDAP, and do not have accounts on the IMAP/dovecot server. When a new user is added to LDAP, the home directory (/home/newuser) needs to be created on the IMAP/dovecot server so dovecot can create the mail directories inside it (/home/newuser/mail/).Dovecot creates the home directory automatically if it has permissions to do it. So I guess in your case the mail user doesn't have permissions to do it and only root can create it?
Stephen Bowman <sbbowman at gmail.com> wrote:> How does everyone handle this case?> Users are authenticated by LDAP, and do not have accounts on the > IMAP/dovecot server. When a new user is added to LDAP, the home > directory (/home/newuser) needs to be created on the IMAP/dovecot > server so dovecot can create the mail directories inside it > (/home/newuser/mail/).chmod /home to 1777 and let dovecot create the directory. Or switch to a virtual setup, where the users don't get real users on the imap server (they can't log in, so they don't need any real user on that server) and every mail is owned by your virtual mail user. Gr??e, Sven. -- Sigmentation fault. Core dumped.
Angel L. Mateo
2011-Dec-02 08:07 UTC
[Dovecot] LDAP Authentication - Home Directory Creation
El 01/12/11 18:26, Stephen Bowman escribi?:> How does everyone handle this case? > > Users are authenticated by LDAP, and do not have accounts on the IMAP/dovecot server. When a new user is added to LDAP, the home directory (/home/newuser) needs to be created on the IMAP/dovecot server so dovecot can create the mail directories inside it (/home/newuser/mail/). > > Obviously I can come up with a few custom solutions, utilizing cron, but I feel like there's a cleaner solution out there. >Are you authenticating directly by LDAP or are you using pam? If you were using pam, you could use pam_mkhomedir module. -- Angel L. Mateo Mart?nez Secci?n de Telem?tica ?rea de Tecnolog?as de la Informaci?n _o) y las Comunicaciones Aplicadas (ATICA) / \\ http://www.um.es/atica _(___V Tfo: 868887590 Fax: 868888337