Partial SUMMARY: Problems with mail aliases in LDAP

From: Tom Crummey <tom_at_ee.ucl.ac.uk>
Date: Fri Oct 07 2005 - 19:56:51 EDT
Hello,

Scenario:
Migrating from NIS to LDAP on Solaris 9 with SUN Directory server 5.2
Using ldapaddent I've inserted mail aliases in the the aliases ou in the 
LDAP directory. On systems where the directory service is now LDAP instead 
of NIS, large mail aliases cannot be expanded using sendmail. The message 
returned is 
User unknown.

Using debugging on sendmail shows that a call: getldapaliasbyname is 
failing due to insufficient buffer space (errno=79). On looking at the SUN 
sendmail patch, it seems that LDAP alias expansion is done using the call 
__getldapaliasbyname provided by libsldap.so.1 This call requires its 
output buffer to be preallocated and passed in as a parameter.

However, the buffer passed to this call is only MAXNAME+1 bytes which 
equates to 257 bytes which explains the size limit on aliases stored in LDAP.

The NIS version has the buffer allocated by the yp_match library call 
itself which will accomodate whatever size aliases you need (up to the dbm record 
limit of 1024 characters).

>From looking at the source to the changes made to sendmail by SUN, it 
seems like a very hurried hack, the consequences of which have not been 
documented or thought about.

It must be the case that most people using sendmail and LDAP on SUN expand 
aliases in a different way. Could someone enlighten me?

Tom.

----------------------------------------------------------------------------
  Tom Crummey, Systems and Network Manager,      EMAIL: tom@ee.ucl.ac.uk
  Department of Electronic and Electrical Engineering,
  University College London,                       TEL: +44 (0)20 7679 3898
  Torrington Place,                                FAX: +44 (0)20 7388 9325
  London, UK, WC1E 7JE.
----------------------------------------------------------------------------
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Oct 7 19:57:59 2005

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:43:52 EST