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

Chris L. Franklin cfranklin at nomadcf.com
Sun Jan 30 21:40:56 EET 2005


Forgot to ask, can this patch be added into dovecot for the next update ? (just to make life a little easier for us rpm'ers)

-- Chris L. Franklin --

----- Original Message ----- 
From: "Chris L. Franklin" <cfranklin at nomadcf.com>
To: <dovecot at dovecot.org>
Sent: Sunday, January 30, 2005 1:49 PM
Subject: RE: Dovecot doesn't call pam_open_session, thus dodging


> This is great I've been wanting to get rid of my NFS mounts for some time and have just the user MailDirs be local to the web server. And this will help alot !
> 
> -- Chris L. Franklin --
> 
>> Message: 1
>> Date: Thu, 27 Jan 2005 16:08:28 -0700
>> From: Nicolas Lopez <nlopez at espri.arizona.edu>
>> Subject: [Dovecot] Dovecot doesn't call pam_open_session, thus dodging
>> pam_mkhomedir
>> To: dovecot at dovecot.org
>> Message-ID: <41F9746C.8080707 at espri.arizona.edu>
>> Content-Type: text/plain; charset="iso-8859-1"
>> 
>>   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
>> -------------- next part --------------
>> A non-text attachment was scrubbed...
>> Name: passdb-pam.c.diff
>> Type: text/x-patch
>> Size: 505 bytes
>> Desc: not available
>> Url : http://dovecot.org/pipermail/dovecot/attachments/20050127/ac7796ea/passdb-pam.c-0001.bin
>


More information about the dovecot mailing list