Go to main content

Managing sendmail Services in Oracle® Solaris 11.4

Exit Print View

Updated: November 2020
 
 

Managing the postmaster Alias

Every system must be able to send mail to a postmaster mailbox. This section provides procedures that describe how to create an NIS alias for postmaster, or create the alias in each local /etc/mail/aliases file.

How to Create a postmaster Alias in Each Local /etc/mail/aliases File

  1. Become an administrator.

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

  2. View the /etc/mail/aliases entry.
    # cat /etc/mail/aliases
    # Following alias is required by the mail protocol, RFC 2821
    # Set it to the address of a HUMAN who deals with this system's
    # mail problems.
    Postmaster: root
  3. In each system's /etc/mail/aliases file, change root to the mail address of the person who is designated as the postmaster.
    Postmaster: postmaster-mail-address
  4. (Optional) Create a separate mailbox for the postmaster.

    You can create a separate mailbox for the postmaster to keep postmaster mail separate from personal mail. If you create a separate mailbox, use the mailbox address instead of the postmaster's personal mail address when you edit the /etc/mail/aliases files.

How to Create a Separate Mailbox for postmaster

  1. Become an administrator.

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

  2. Create a user account for the person who is designated as postmaster. Put an asterisk (*) in the password field.

    For more information, see Setting Up and Managing User Accounts (Task Map) in Managing User Accounts and User Environments in Oracle Solaris 11.4.

  3. Enable the mail program to read and write to the mailbox name after mail has been delivered.
    # mail -f postmaster-mail-address

How to Add the postmaster Mailbox to the Aliases in the /etc/mail/aliases File

  1. Become an administrator.

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

  2. 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.example.com
    user@host.example.com

    Use the assigned address of the person who is designated as the postmaster

  3. On the postmaster's local system, create an entry in the /etc/mail/aliases file that defines the name of the alias. Include the path to the local mailbox.
    # cat /etc/mail/aliases
    ..
    new-alias-name: /usr/path
    new-alias-name

    Create a name for a new alias

    /usr/path

    Use the path to the local mailbox

  4. Rebuild the alias database.
    # newaliases