This is how I configured my Active Directory LDAP.
I use a different AD domain to my external domain.
The mail server I am using is hMail with AD authentication.
This example sends the users external login name as an internal login name and password,
ie:
user@sample.com, becames
user@sample.net.au MyLDAPService = The name for your LDAP connection
MyServer = the IP address or server name for LDAP connection
internal domain name = sample.net.au
$rcmail_config['ldap_public'][
'MyLDAPService'] = array(
'name' =>
'MyLDAPService',
'hosts' => array(
'MyServer'),
'port' => 389, // LDAP Port
'use_tls'=> false,
'user_specific' => true,
'base_dn'=>
'DC=sample,DC=net, DC=au',
'bind_dn' =>
'%u@sample.net.au',
'writable'=> false, // Indicates if we can write to the LDAP directory or not.
'search_fields' => array('mail', 'cn'),
'name_field' => 'cn', // this field represents the contact's name
'firstname_field' => 'givenName', // this field represents the contact's first name
'surname_field' => 'sn', // this field represents the contact's last name
'email_field' => 'mail', // this field represents the contact's e-mail
'scope' => 'sub', // search mode: sub|base|list
'filter' => '(&(mail=*)(!(msExchHideFromAddressLists=TRUE)))', // all mail, except the exchange hidden
'sort' => 'cn', // The field to sort the listing by.
'fuzzy_search' => TRUE); // server allows wildcard search