LDAP connection types (was Re: LDAP not connecting over IPv6)

Michael Hall mhall at riverside.org
Wed Jun 1 01:05:02 CEST 2011


On Wed, Jun 01, 2011 at 12:33:52AM +0200, Mark Martinec wrote:

> Quanah,
> 
> > My one comment about this patch would be that the it doesn't support using
> > "ldapi", which is connecting to a local LDAP server over a unix socket.
> 
> It doesn't? The patch added the 'scheme' attribute to the $default_ldap
> hash just for this purpose - although I haven't tested it.
> 
> Something along these lines would probably work according to
> the Net::LDAP documentation:
> 
> $default_ldap = {
>   hostname      => '/socket/path/to/ldap',
>   scheme        => 'ldapi',
>   ...
> };

I've been using this forever, Net::LDAP takes a list for hostname, and
tries each in turn:

$default_ldap = {
    hostname => [ 'ldapi://%2Fvar%2Frun%2Fopenldap%2Fldapi/',
                  'ldap://vulcan.pvt.rockisland.com' ], 
    ...

and it connects and uses the local socket, I'm not using IP6 though.    

--
Life is a whim of several billion cells to be you for a while.

Mike Hall
San Juan Island, WA

System Admin - Rock Island Technology Solutions     <mikeh at rockisland.com>
System Admin - riverside.org, ssdd.org              <mhall at riverside.org>


More information about the amavis-users mailing list