If the PMDF options LDAP_HOST, LDAP_PORT, and at least one of ALIAS_URL0, ALIAS_URL1, ALIAS_URL2, or ALIAS_URL3 are specified in the PMDF option file (see Section 7.3.2 for further details), then for each address matching the local channel PMDF will automatically perform the LDAP query specified by the ALIAS_URLn option(s) to the LDAP server specified by the LDAP_HOST and LDAP_PORT options. Typically, an ALIAS_URLn option would be specified as an LDAP search URL using the mailbox (local portion) of the address.
For the ALIAS_URL0, ALIAS_URL1, ALIAS_URL2, or ALIAS_URL3 options, standard LDAP URLs must be used, except with the host and port omitted, as the host and port are instead specified via the LDAP_HOST and LDAP_PORT PMDF options. That is, the LDAP URL should be specified as
ldap:///dn[?attributes[?scope?filter]]where the square bracket characters
[
and
]
shown above indicate optional portions of the
URL. The dn
is required and is a distinguished
name specifying the search base; it might correspond to the
organization's top level in the Directory Information Tree. The
optional attributes
, scope
,
and filter
portions of the URL further refine
what information to return. For an alias, the desired
attributes
to specify returning would typically
be the mail
attribute (or some similar attribute). The
scope
may be any of base
(the
default), one
, or sub
. And the desired
filter
would typically be based upon the mailbox
(local portion) of the incoming addresses.
Substitution sequences, as shown in Table 3-1 , are available for use in constructing the LDAP URL.
Substitution | |
---|---|
sequence | Description |
$$
|
Literal $ character |
$~
account
|
Home directory of user
account
|
$A
|
Address |
$D
|
Domain name |
$H
|
Host name (first portion of fully qualified domain name) |
$L
|
Username minus any special leading characters such as
~ or
_
|
$S
|
Subaddress |
$U
|
Username |
For instance, at a site acme.com with an LDAP server running on the
system ldap.acme.com on port 389, where external e-mail addresses
correspond to
surname@department.acme.com
, the
LDAP_HOST, LDAP_PORT, and ALIAS_URL0 options might be specified as follows:
LDAP_HOST=ldap.acme.com LDAP_PORT=389 ALIAS_URL0=ldap:///o=$D?mail?sub?(sn=$L)