Managing sendmail Services in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014

Interactions of NIS and sendmail

The following list describes the interactions of sendmail and NIS and provides some guidance.

  • Mail domain name – If you are setting up NIS as the primary name service, sendmail automatically strips the first component of the NIS domain name and uses the result as the mail domain name. For example, becomes

  • Mail host name – You must have a mailhost entry in the NIS host map.

  • Full host names – The normal NIS setup does not “understand” the full host name. Rather than trying to make NIS understand the full host name, turn off this requirement from the sendmail side by editing the file and replacing all occurrences of %l with %y. This change turns off sendmail's interdomain mail detection. If the target host can be resolved to an IP address, a direct SMTP delivery is attempted. Ensure that your NIS host map does not contain any host entry that is external to the current mail domain. Otherwise, you need to further customize the file.

  • Matching full host names and short host names – Follow the previous instructions about how to turn off gethostbyname() for a full host name.

  • Multiple NIS domains in one mail domain – All NIS host maps under a common mail domain should have the same set of host entries. For example, the host map in the domain should be the same as the host map in the Otherwise, one address might work in one NIS domain, but fail in the other NIS domain.

For task information, refer to Administering Mail Alias Files (Task Map) in Chapter 2, Administering Mail Services.