System Administration Guide: Network Services

ProcedureHow 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.

    Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) 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

      Use the short alias name.


      Use the expanded alias name (

    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

      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.