[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: OpenLDAP client binaries and sendmail



On Tue, 2 Nov 1999, Kristina wrote:

> I have sendmail.8.9.3 and the latest stable version of OpenLDAP installed
> on Solaris7 I want to use OpenLDAP with sendmail. I am making no progress.  
> I understand that I first need to link the openldap client libaries to
> compile sendmail with LDAP support. How do I do this? I would very much
> appreciate precise detail on how to configure sendmail.

I can't give you any step-by-step instructions as I must admit to not having
done it myself (still on the to-do list);  but a quick look at the sources
indicates to me that the same way NEWDB (ie., Berkeley DB 2.x) support is
added is how LDAP support must also be added.

For example, to get NEWDB support in Sendmail you could include a local site
configuration file at compile time with:

  APPENDDEF(`confMAPDEF', `-DNEWDB')
  APPENDDEF(`confINCDIRS', `-I/opt/SCSdb/include')
  APPENDDEF(`confLIBDIRS', `-L/opt/SCSdb/lib')

Technically, you don't have to include the first line as Sendmail's build
process will look for the Berkeley DB library and add this automatically.
Likewise, if your Berkeley DB libraries and header files are in a "normal"
system location, you can drop the next two lines.

So.. to add LDAP support, one assumes you need to add:

  APPENDDEF(`confMAPDEF', `-DLDAPMAP')
  APPENDDEF(`confINCDIRS', `-I/opt/OpenLDAP/include')
  APPENDDEF(`confLIBDIRS', `-L/opt/OpenLDAP/lib')

In this case, you can't drop the first line as Sendmail doesn't automatically
search for the LDAP libraries.  You can drop the next two lines if your LDAP
libraries and header files are in a "normal" system location.

Checking Booker Bense's documentation, you probably need to explicitly
nominate your LDAP libraries, too.  At a guess, this should do the trick:

  APPENDDEF(`confLIBS', `-lldap -llber')

[ Note - I was checking this against the Sendmail 8.10.0.Beta6 documentation;
  inclusion with Sendmail 8.9.3 is probably quite similar.  I'm not advocating
  that you upgrade to 8.10.0.Beta6 unless you are comfortable running beta
  software - just stating that I haven't checked the 8.9.3 docs. ]

For further information regarding various compile-time Sendmail options, check
all the READMEs scattered throughout the source distribution;  in particular,
you want to check "./src/README" ("./sendmail/README" in 8.10) and
"./BuildTools/README" ("./devtools/README" in 8.10).

If you don't already use a site config for building Sendmail, you should.  ;-)

> I am referring to the document titled "Using LDAP with Sendmail 8.x" at
> http://www.stanford.edu/~bbense/Inst.html. It tells me basically three
> things:

Remember that both this documentation (and a lot of the Sendmail notes) have
residual information from previous versions - that is, it can look harder than
it really needs to be because of all the machinations required to get the
feature working on older versions (no longer needed).

> 1) I need the openldap client libaries.
> I DO NOT KNOW WHERE IN LDAP THEY EXIST! 
> MAYBE, .../ldap/include???????

Depends where you installed OpenLDAP - look for "libldap.a" for starters;  as
long as you only have one copy, it's a good bet that you've found the
directory.  In my case it's "/opt/OpenLDAP/lib" - by default, I think it's
"/usr/local/lib".

> 2)That I need to define the LDAPMAP macro in the makefile.

See above - you shouldn't have to hack any makefiles anymore.

> 3)That I need to add -lldap -llber
> IS THIS DONE AT THE FILE .../sendmail8.9.3/src/BuildTools/OS/SunOS.5.7??????
>  and
> HOW!!!!!

Probably - see above.

Hope this helps - let us know if it works (so then I can try it myself
later..).  ;-)

Cheers..


dave