This section describes the requirements that sendmail imposes on name services.
A host table or map in a name service must be set up to support three types of gethostbyname() queries.
mailhost – Some name service configurations satisfy this requirement automatically.
Full host name (for example, smith.admin.acme.com) – Many name service configurations satisfy this requirement.
Short host name (for example, smith) – sendmail must connect to the mail host in order to forward external mail. To determine if a mail address is within the current mail domain, gethostbyname() is invoked with the full host name. If the entry is found, the address is considered internal.
NIS, NIS+, and DNS support gethostbyname() with a short host name as an argument, so this requirement is automatically satisfied.
Two additional rules about the host name service need to be followed to establish efficient sendmail services within a name service.
gethostbyname() with full host-name argument and short host-name argument should yield consistent results. For example, gethostbyname(smith.admin.acme.com) should return the same result as gethostbyname(smith), if both functions are called from the mail domain admin.acme.com.
For all name service domains under a common mail domain, gethostbyname() with a short host name should yield the same result. For example, if the mail domain smith.admin.acme.com is given, gethostbyname(smith) should return the same result when the call originates from either the ebb.admin.acme.com domain or the esg.admin.acme.com domain. The mail domain name is usually shorter than the name service domain, which gives this requirement special implications for various name services.
For more information about the gethostbyname() function, refer to the gethostbyname(3NSL) man page.