//50LocalLDAP
/**
 * A local address book in an LDAP directory. This implements a public
 * (shared) address book.
 *
 * To store distribution lists in the LDAP directory, you'll need to include
 * horde/scripts/ldap/horde.schema in your LDAP configuration.
 *
 * To store freebusy information in the LDAP directory, you'll need to include
 * turba/scripts/ldap/rfc2739.schema in your LDAP configuration.
 */
$cfgSources['localldap'] = array(
     'title' => _("Local LDAP"),
     'type' => 'ldap',
     'params' => array(
         'server' => 'localhost',
         'port' => 389,
         'tls' => false,
{
    my $domainName = $DomainName;
    $domainName =~ s/\./,dc=/g;
    $OUT = qq(        'root' => 'dc=$domainName',);
}
//         'bind_dn' => 'cn=admin,ou=users,dc=example,dc=com',
//         'bind_password' => '********',
         'sizelimit' => 200,
         'dn' => array('cn'),
         'objectclass' => array('top',
                                'person',
                                'organizationalPerson',
                                'inetOrgPerson',
                                'turbaContact'),
								  // Add 'turbaContact' to this array if using
                                // 'turbaType' attribute below
         'scope' => 'one',
         'charset' => 'UTF-8',
//         // Consult the LDAP schema to verify that all required attributes for
//         // an entry are set and add them if needed.
         'checkrequired' => false,
//         // Value used to fill in missing required attributes.
         'checkrequired_string' => ' ',
//         // Check LDAP schema for valid syntax. If this is false an address
//         // field is assumed to have postalAddress syntax; otherwise the schema
//         // is consulted for the syntax to use.
//         'checksyntax' => false,
         'version' => 3
     ),
     'map' => array(
         '__key' => 'dn',
         '__uid' => 'uid',

//         // From horde.schema.  Make sure you have 'turbaContact' objectClass
//         // included above:
           '__type' => 'turbaType',
           '__members' => 'turbaMembers',
//
         'name' => 'cn',
         'email' => 'mail',
         'homePhone' => 'homephone',
         'workPhone' => 'telephonenumber',
         'cellPhone' => 'mobiletelephonenumber',
         'homeAddress' => 'homepostaladdress',
//
//         // From rfc2739.schema:
{
        my $hordefreebusy = $horde{'freebusy'} || 'disabled'; return "        #freebusy is currently not enabled.  To enable - config setprop horde freebusy enabled" unless ($hordefreebusy eq "enabled");
        $OUT .= '        \'freebusyUrl\' => \'calFBURL\'';
}
//         // 'freebusyUrl' => 'calFBURL',
     ),
     'search' => array(
         'name',
         'email',
         'homePhone',
         'workPhone',
         'cellPhone',
         'homeAddress'
     ),
     'strict' => array(
         'dn',
     ),
     'approximate' => array(
         'cn',
     ),
     'export' => true,
     'browse' => true,
);

