LDAP Autentication Settings
-------------------------------

To configure MailZu to authenticate users against LDAP.
Edit the config/config.php and tailor the variables mentioned here for your
environment.

  // Set an authentication method: 'ldap','ad', or 'sql'
  $conf['auth']['serverType'] = 'ldap';

Set the LDAP host(s) and search base

  // List of LDAP servers
  $conf['auth']['ldap_hosts'] = array( 'ldaphost' );
  $conf['auth']['ldap_port'] = 389;

  // LDAP base dn, e.g. 'dc=example,dc=com'
  $conf['auth']['ldap_basedn'] = 'dc=example,dc=com';

  // Group where users are kept, e.g. 'people'
  $conf['auth']['ldap_people'] = 'people';

Now we must set the login format. For LDAP it is usually the 'uid'
attribute, or if you want a fully qualified email address as the login, it
could be 'mail'. 

  // LDAP attribute used as login, e.g. 'uid', 'mail' or 'uidNumber'
  $conf['auth']['ldap_login'] = 'uid';

At the login page of MailZu, with this setting the user would use the login
'user', or if the configuration variable was set to the 'mail' attribute, the
login would be 'user@example.com'.

These two attributes are enough to be authenticated to the MailZu interface,
but the third attribute is what determines which messages the authenticated
user is permitted to view. This configuration variable is a list of
attributes that contain recipient addresses. In most cases this will be a
list with one item such as the attribute 'mail'. But if you want to include
more address you can add more attribute names to the list.

For example, if the login used was 'user', than there must be an attribute or
field that determines the email address associated with this user. Even if the
login was 'user@example.com' the third attribute may or may not be the same.
The address might have been aliased to an internal address 
'user@internal.example.com'.

  // LDAP mail attributes used as the final recipient address
  // Could be the actual mail attribute or another attribute
  // (in the latter case look for the "%m" token in the ldap query filter in
  // amavisd.conf)
  $conf['auth']['ldap_mailAttr'] = array('mailRoutingAddress');

If the attribute listed for the login format is not the same as the binding 
username, we must be able to search the directory. The settings below binds 
using this account to search the directory. Set them to empty string ('') for
anonymous bind.

  $conf['auth']['ldap_searchUsername'] = 'manager';
  $conf['auth']['ldap_searchPassword'] = 'secret';
