LDAP lookups for address reversal

If the   MTA option has been  set,  then each address (other than envelope To addresses)  passing through the MTA will be checked against the result of an LDAP query constructed as specified by the   option (querying the LDAP server at the port specified by the    and    options, which may be overridden by the MTA-specific   and   MTA options). If the LDAP query succeeds and returns a value, that value will be substituted in  place of the original address.

For the   MTA option,  standard LDAP URLs as per RFC 2255 must be  used, except with the host and port normally omitted, as the host and port are  normally instead specified via the base or MTA-specific option settings mentioned above. That is, the LDAP URL is typically specified along the lines of: ldap:///dn&#x5b;?attributes&#x5b;?scope?filter&#x5d;&#x5d; where the square bracket characters  and    shown above indicate optional portions of the  URL. The  is required and is a distinguished  name specifying the search base; it might correspond to the  organization&#x27;s top level in the Directory Information Tree, or it might  correspond to a subset of the organization, based upon the domain name  in the original address. The optional,   , and   portions  of the URL further refine what information to return. For address reversal, the desired   to specify  returning would typically be the   attribute (or some  similar attribute). The  may be any of    (the default), , or. And the desired  would typically be based  upon the mailbox (local portion) of the incoming addresses.

Certain substitution sequences may be used to construct the LDAP search URL;  see  Table of LDAP URL substitution sequences  in  LDAP URL substitution sequences for details.

See also:
 * Intended side effects of LDAP address reversal
 * Address reversal
 * reverse_url MTA Option
 * ldap_host MTA Option
 * ldap_port MTA Option
 * ugldaphost Option
 * ugldapport Option
 * LDAP lookup cache MTA options
 * LDAP URL substitution sequences