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, ebs.admin.example.com becomes admin.example.com.
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 sendmail.cf 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 sendmail.cf 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 ebs.admin.example.com domain should be the same as the host map in the esg.admin.example.com. Otherwise, one address might work in one NIS domain, but fail in the other NIS domain.