HP-UX Mailing Services Administrator's Guide (B2355-91064)
Sendmail supports the use of the LDAP protocol to look up addresses. The ldapx class,
which is a database, is used to look up items in the LDAP directory service. The
Sendmail configuration file contains the syntax required to enable the LDAP protocol
to perform address lookups.
Enabling Address Lookups Using LDAP
When you enable LDAP support, LDAP will look up login names, then return the
e-mail address for that user. To enable this, you must modify the sendmail.cf file.
The following steps describe how to enable address lookup using LDAP:
1. Open the sendmail.cf file.
2. Uncomment the following ruleset:
#R$+ < @ $+ > $: $: $(ldap $1 $: $1<@$2>$) ldap support
3. Uncomment the following line:
Kldap dapx -k”uid=%s” -v”mail” -htest.india.hp.com” -b”organization, c=US”
This enables the LDAP protocol to perform lookups. These lookups are defined entirely
by the switches specified. In the previous example, -k and -v are the switch options.
The -k switch defines how the map takes its input value and constructs the LDAP
search. The -v switch is the value that replaces the original string in the map. In most
cases, this will be an e-mail address. The -b switch is the directory in the LDAP tree
where searching begins. The -h switch is the space-separated string of servers that
support LDAP at your site.
NOTE: The LDAP-style options (-v and -h in the previous example) must be double
quoted and must follow immediately after the option. Do not leave spaces between
the option and the quote.
LDAP-Based Routing
You can use the LDAP protocol to implement LDAP-based rerouting. This provides a
method to reroute addresses with a domain portion in class {LDAPRoute} to either a
different mail host or a different address.
You can use the /usr/newconfig/etc/mail/cf/cf/gen_cf script to enable the
LDAP-based routing.
You can add the domains to the class {LDAPRoute}, as shown in the following
examples. Ensure that you set up a domain for LDAP routing. Assume that your domain
is yyy.com. Add the following line in the sendmail.cf file:
C{LDAPRoute}yyy.com
68 Configuring and Administering Sendmail