Go to main content

Managing sendmail Services in Oracle® Solaris 11.3

Exit Print View

Updated: April 2020
 
 

How to Set Up a Local Mail Alias File

  1. Compile a list of each of your users and the locations of their mailboxes.
  2. Become an administrator on the mail server.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  3. Add the following entries to the /etc/mail/aliases file:
    • An entry for each user

      user1: user2@host.domain
      user1

      Use the new alias name

      user2@host.domain

      Use the actual address for the new alias

    • A Postmaster: root entry

      # cat /etc/mail/aliases
      ..
      Postmaster: root
    • An alias for root using 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. Rebuild the alias database.
    # newaliases

    The configuration of the –AliasFile option in /etc/mail/sendmail.cf determines whether the command generates either a single file, /etc/mail/aliases.db, or a pair of files, /etc/mail/aliases.dir and /etc/mail/aliases.pag.

  5. Perform one of the following steps to the file or files that are generated.
    • Copy the /etc/mail/aliases, the /etc/mail/aliases.dir, and the/etc/mail/aliases.pag files to the /etc/mail directory of each of the other systems.
    • Copy the /etc/mail/aliases and the /etc/mail/aliases.db files to the /etc/mail directory of each of the other systems.

      You can copy the file or files generated by using the scp or rsync commands. For more information, see thescp(1) man page or the rsync(1) man page. Alternatively, you can create a script for this purpose.

      When you copy these files, you do not need to run the newaliases command on each of the other systems. However, you must update all the /etc/mail/aliases files each time you add or remove a mail client.