System Administration Guide: Resource Management and Network Services

How to Set Up an NIS mail.aliases Map

Use the following procedure to facilitate aliasing with an NIS mail.aliases map.

  1. Compile a list of each of your mail clients, the locations of their mailboxes, and the names of the mail server systems.

  2. Become root on the NIS master server or assume an equivalent role.

    For information about roles, refer to “Using Privileged Applications” in System Administration Guide: Security Services.

  3. Edit the /etc/mail/aliases file, and make the following entries.

    1. Add an entry for each mail client.


      # cat /etc/mail/aliases
      ..
      alias:expanded_alias
      

      alias

      Use the short alias name. 

      expanded_alias

      Use the expanded alias name (user@host.domain.com).

    2. Ensure that you have a Postmaster: root entry.


      # cat /etc/mail/aliases
      ..
      Postmaster: root
      
    3. Add an alias for root. Use the mail address of the person who is designated as the postmaster.


      # cat /etc/mail/aliases
      ..
      root: user@host.domain.com
      

      user@host.domain.com

      Use the assigned address of the designated postmaster. 

  4. Ensure that the NIS master server is running a name service to resolve the host names on each mail server.

  5. Change to the /var/yp directory.


    # cd /var/yp
    
  6. Apply the make command.


    # make
    

    The changes in the /etc/hosts and /etc/mail/aliases files are propagated to NIS slave systems. The changes are active in only a few minutes, at most.