[Dovecot] Re: Dovecot doesn't call pam_open_session, thus dodging pam_mkhomedir

news.gmane.org chills at ne-worcs.ac.uk
Tue Feb 1 10:18:43 EET 2005


Nicolas Lopez wrote:
>   I hit a small snag using Dovecot-imapd smoothly in my environment with 
> maildir and most of my accounts in LDAP.  Since the accounts are created 
> through a web interface on another server home directories on the mail 
> server don't get created automatically.  There's the handy pam module 
> pam_mkhomedir.so to automagically create home directories, but 
> unfortunatly Dovecot wasn't calling pam_open_session to run the session 
> setup pam modules.  I made a small patch to passdb-pam.c to call 
> pam_open_session between pam_acct_mgmt and pam_get_item and now I my 
> home dirs are automagically created and everyone is happy.
> 
>  So, I figured I'd share the little patch in case someone else finds it 
> useful.  My patch doesn't properly close the session which will probably 
> iritate more advanced session modules that actually have something to 
> clean up, oh well.
> 
>  Aside from manually having to create home directories Dovecot-imapd has 
> been working really well for us for a number of months, I just finally 
> got around to dealing with the home dir creation issue.
> 
>  - Nick Lopez
>    nlopez at espri.arizona.edu

Nick

I am running dovecot-0.99.13 on FC2 with pam_mkhomedir, and it has been 
working fine. Not sure why you are having a problem. If I could just 
figure out how to get Exim to do the same, I'd be happy :-)

Thanks for the patch, I'm sure those having the same problem will be 
grateful!

Regards

--
Chris Hills
IT Services
North East Worcestershire College




More information about the dovecot mailing list