cf/README for sendmail 8.12.3Eric Allman of the Sendmail Consortium |
|||||||||||||||||||||||||
Useful linksTable of ContentClaus Assmann Further Reading
|
LDAP ROUTINGFEATURE(`ldap_routing') can be used to implement the IETF Internet Draft LDAP Schema for Intranet Mail Routing (draft-lachman-laser-ldap-mail-routing-01). This feature enables LDAP-based rerouting of a particular address to either a different host or a different address. The LDAP lookup is first attempted on the full address (e.g., user@example.com) and then on the domain portion (e.g., @example.com). Be sure to setup your domain for LDAP routing using LDAPROUTE_DOMAIN() or LDAPROUTE_DOMAIN_FILE, e.g.: LDAPROUTE_DOMAIN(`example.com')
Additionally, you can specify equivalent domains for LDAP routing using
LDAPROUTE_EQUIVALENT() and
LDAPROUTE_EQUIVALENT_FILE(). is used, the lookups would also be done on 'user@example.com' and '@example.com' after attempting the host1.example.com lookups. By default, the feature will use the schemas as specified in the draft and will not reject addresses not found by the LDAP lookup. However, this behavior can be changed by giving additional arguments to the FEATURE() command: FEATURE(`ldap_routing', <mailHost>, <mailRoutingAddress>, <bounce>, <detail>)where
The default <mailHost> map definition is: ldap -1 -T<TMPF> -v mailHost -k (&(objectClass=inetLocalMailRecipient)(mailLocalAddress=%0)) The default <mailRoutingAddress> map definition is: ldap -1 -T<TMPF> -v mailRoutingAddress-k (&(objectClass=inetLocalMailRecipient) (mailLocalAddress=%0)) Note that neither includes the LDAP server hostname (-h server) or base DN (-b o=org,c=COUNTRY), both necessary for LDAP queries. It is presumed that your .mc file contains a setting for the confLDAP_DEFAULT_SPEC option with these settings. If this is not the case, the map definitions should be changed as described above. The "-T<TMPF>" is required in any user specified map definition to catch temporary errors. The following possibilities exist as a result of an LDAP lookup on an address:
The term "local" host above means the host specified is in class {w}. If the result would mean sending the mail to a different host, that host is looked up in the mailertable before delivery. Note that the last case depends on whether the third argument is given to the FEATURE() command. The default is to deliver the message to the original address. The LDAP entries should be set up with an objectClass of inetLocalMailRecipient and the address be listed in a mailLocalAddress attribute. If present, there must be only one mailHost attribute and it must contain a fully qualified host name as its value. Similarly, if present, there must be only one mailRoutingAddress attribute and it must contain an RFC 822 compliant address. Some example LDAP records (in LDIF format): dn: uid=tom, o=example.com, c=USobjectClass: inetLocalMailRecipient mailLocalAddress: tom@example.com mailRoutingAddress: thomas@mailhost.example.com This would deliver mail for tom@example.com to thomas@mailhost.example.com. dn: uid=dick, o=example.com, c=USobjectClass: inetLocalMailRecipient mailLocalAddress: dick@example.com mailHost: eng.example.com This would relay mail for dick@example.com to the same address but redirect the mail to MX records listed for the host eng.example.com (unless the mailertable overrides). dn: uid=harry, o=example.com, c=USobjectClass: inetLocalMailRecipient mailLocalAddress: harry@example.com mailHost: mktmail.example.com mailRoutingAddress: harry@mkt.example.com This would relay mail for harry@example.com to the MX records listed for the host mktmail.example.com using the new address harry@mkt.example.com when talking to that host. dn: uid=virtual.example.com, o=example.com, c=USobjectClass: inetLocalMailRecipient mailLocalAddress: @virtual.example.com mailHost: server.example.com mailRoutingAddress: virtual@example.com This would send all mail destined for any username @virtual.example.com to the machine server.example.com's MX servers and deliver to the address virtual@example.com on that relay machine. |
Back to Table Of Contents | $Revision: 8.612 $, Last updated $Date: 2002/04/03 17:12:52 $ | Back to Top |