Jeronimo,
                         Change your LDAP schema to add an attribute
called "LastMailCheckTime" (or any other name you would like).
                         You can then add this code to the
auth_ldap_do3 function in  authldaplib.c after the authentication bind
is successful. Note that I do an async ldap_modify so that authdaemon
does not block waiting on the modify.
                        I wrote this up quick so you may want to
double check it. Any questions, let me know.
 ---Aaron
                                                             LDAPMod
*mod_ctime_send[2];
                                                        LDAPMod
mod_ctime_up;
                                                        char
*ctime_attribute_name="LastMailCheckTime";
                                                        char
ctime_value[512];
                                                        char
*mod_update_vals[2];
                                                                     
   time_t m_check_time;
                                                                     
   m_check_time=time(NULL);
                                                       
mod_ctime_send[0]=&mod_ctime_up;
                                                       
mod_ctime_send[1]=0;
                                                       
sprintf(ctime_value,"%u",(unsigned int) m_check_time);
                                                       
mod_ctime_up.mod_op=LDAP_MOD_REPLACE;
                                                       
mod_ctime_up.mod_type=ctime_attribute_name;
                                                       
mod_ctime_up.mod_values=mod_update_vals;
                                                       
mod_update_vals[0]=ctime_value;
                                                       
mod_update_vals[1]=NULL;
                                                        //ASYNCHRONUS
UPDATE
                                                       
ldap_modify(bindp, dn, mod_ctime_send);
 On Thu 07/03/08 16:57 , Jeronimo Zucco [EMAIL PROTECTED] sent:
  wrote: 
 > Carlos, 
 > 
 >                 Why not make a small LDAP schema change and
perform an 
 > ldap modify? You can place that code right in authdaemon. That is
what 
 > I did and it has worked fine for years with more than 75,000
mailboxes. 
     This is what I would like to do in my courier setup. How did you
do 
 it? Can you give some information about it ? 
 Thanks 
 --  
 Jeronimo Zucco 
 LPIC-1 Linux Professional Institute Certified 
 Núcleo de Processamento de Dados 
 Universidade de Caxias do Sul 
 http://jczucco.blogspot.com 
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
Courier-imap mailing list
Courier-imap@lists.sourceforge.net
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-imap

Reply via email to