LDAP (Lightweight Directory Access Protocol) 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, which is:
kname ldapx -k "uid=%s" -v"mail" -h"ldap_server_name" -b "o=organization, c=US"
|
This enables the LDAP protocol to perform lookups. These lookups
are defined entirely by the switches specified. In the syntax example
above, -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 email 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" (-v and -h in the example above) options must be double quoted
and must follow immediately after the option. There are no spaces
between the option and the quote. |
|
| |
|
Enabling Address Lookups Using LDAP |
|
When you enable LDAp suppoet, LDAP will look up login names,
then return the email address for that user. To enable this, you
must modify the following lines in the sendmail.cf file. Here is how to enable address lookup using LDAP:
Open the sendmail.cf file.
Uncomment the following ruleset:
#R$+ < @ $+ > $: $: $(ldap $1 $: $1<@$2>$) ldap support
|
Uncomment the following line in the configuration
file:
Kldap dapx -k"uid=%s" -v"mail" -htest.india.hp.com" -b"organization, c=US"
|