In my Exchange environment, most users log in with their primary email address such as firstname.lastname@example.org
It is also possible to log in with a user principal name (email@example.com) or the older way (DOMAIN\user)
In most situations the primary email address and the user principal name are the same, but I can think of many instances where they are not. In fact some accounts in my environment have a login name (user principal name) which is not their primary email address. For clarity, the primary email address is the default sending address.
Anyway, the following configuration in /var/www/html/MailScanner/conf.php will work in both instances.
If it doesn't work for you, post a reply here and I will try to assist you.
Code: Select all
/ LDAP settings for AD authentication & Address Validation on Exchange Server define('USE_LDAP', true); // Set to true to enable LDAP define('LDAP_SSL', false); // Set to true if using LDAP with SSL encryption. Requires certificates define('LDAP_HOST', 'XXX.XXX.XXX.XXX'); // IP address of your domain controller define('LDAP_PORT', '389'); // Standard LDAP port is 389 define('LDAP_DN', 'DC=domain,DC=local'); // Your AD domain DN define('LDAP_USER', 'firstname.lastname@example.org'); // If no email, set: email@example.com' or 'cn=ldap-account,dc=domain,dc=local' define('LDAP_PASS', 'your_ldap_account_password_goes_here'); define('LDAP_SITE', 'First-Site-Name'); // Look this value up in AD Sites and Services snap-in on your domain controller define('LDAP_FILTER', 'proxyAddresses=smtp:%s', 'mail=%s'); // %s will be replaced by email address or user define('LDAP_PROTOCOL_VERSION', 3); define('LDAP_EMAIL_FIELD', 'mail'); define('LDAP_USERNAME_FIELD', 'userprincipalname'); define('LDAP_MS_AD_COMPATIBILITY', true); // Must be set to true for MS AD scompatibility