|
|
HP-UX Mailing Services Administrator's Guide: HP-UX 11i v1 and HP-UX 11i v2 > Chapter 2 Configuring
and Administering SendmailSendmail and the LDAP Protocol |
|
The Lightweight Directory Access Protocol (LDAP) enables servers to share static information. Combining Sendmail and LDAP increases the speed and efficiency at which network information is collected and displayed. 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. 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:
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.
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:
or
where /etc/mail/ldap-domain-file contains the domains. The LDAPDefaultSpec option in the sendmail.cf file sets the default LDAP map specification. You must set this up before defining LDAP maps. The settings are used for all LDAP maps unless they are specified in the individual map specification (K command). By default, it appears in the sendmail.cf file as follows:
localhost can be replaced by your LDAP server name. Following are the switches commonly used by most applications:
The LDAP maps are defined in the configuration file as follows:
mailLocalAddress is the RFC 2822-compliant e-mail address of the recipient. mailHost is the fully qualified host name of the MTA that is the final SMTP destination of the message to the recipient. mailRoutingAddress is the RFC 822 address to be used when routing messages to the SMTP MTA of the recipient. |
|