4 messages in net.sourceforge.lists.courier-maildrop[maildropl] Patch to maildrop ldap to...
FromSent OnAttachments
Barry FlanaganNov 4, 2004 10:52 am 
Tom CarlileNov 5, 2004 9:05 am 
Barry FlanaganNov 5, 2004 9:12 am 
Joey O'DohertyNov 6, 2004 11:09 pm.patch
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:[maildropl] Patch to maildrop ldap to have default homedirectoryActions...
From:Barry Flanagan (barr@flanagan.ie)
Date:Nov 4, 2004 10:52:52 am
List:net.sourceforge.lists.courier-maildrop

This is the only way I could get maildrop working with my virtual setup where user home directory stored in ldap is not the absulute filesystem path.

It allows the setting of a default_homedirectory instead of getting this from LDAP. This was maildrop has a directory to work form and can read in its maildroprc to get the rest of its setup.

*** maildrop-1.7.0.20040907/maildrop/mdldap.c Sat Jun 26 16:20:14 2004 --- maildrop/maildrop/mdldap.c Thu Nov 4 17:40:49 2004 *************** *** 131,136 **** --- 131,138 ---- if ( ldap_count_values(values) > 0 ) { rec->homedirectory = strdup(values[0]); ldap_value_free(values); + } else if ( cfg->default_homedirectory ) { + rec->homedirectory = cfg->default_homedirectory; } else { rec->homedirectory = NULL; }

*** maildrop-1.7.0.20040907/maildrop/mdldapconfig.h Sat Jun 26 16:20:14 2004 --- maildrop/maildrop/mdldapconfig.h Thu Nov 4 17:34:49 2004 *************** *** 37,42 **** --- 37,43 ---- int default_uidnumber; int default_gidnumber; char *default_quota; + char *default_homedirectory;

int timeout; } mdldapconfig;

*** maildrop-1.7.0.20040907/maildrop/mdldapconfig.c Sat Jun 26 16:20:14 2004 --- maildrop/maildrop/mdldapconfig.c Thu Nov 4 17:32:47 2004 *************** *** 99,104 **** --- 99,107 ----

if ( !strcasecmp(var,"default_quota") ) cfg->default_quota = (char*)strdup(val); + + if ( !strcasecmp(var,"default_homedirectory") ) + cfg->default_homedirectory = (char*)strdup(val); }

fclose(fp);