System Administration Guide, Volume 3

How to Use DNS With sendmail

The DNS name service does not support aliases for individuals. It does support aliases for hosts or domains using mail exchange (MX) records and cname records. You can specify host names, domain names, or both in the DNS database. See the Solaris Naming Setup and Configuration Guide for more information about administering DNS.

  1. Become superuser.

  2. Enable DNS host lookups (NIS+ only).

    Edit the /etc/nsswitch.conf file and remove the # from the hosts definition that includes the dns flag. The host entry must include the dns flag, as shown below, for the DNS host aliases to be used.


    # grep hosts /etc/nsswitch.conf
    #hosts:      nisplus [NOTFOUND=return] files
    hosts:      nisplus dns [NOTFOUND=return] files
  3. Check for a mailhost and mailhost.domainname entry.

    Make sure an entry exists for mailhost and mailhost.domainname in the DNS database.