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.

Rebuild the alias database.

# newaliases

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

Perform one of the following steps to copy the file or files that
were generated.

(Optional) Copy the /etc/mail/aliases, the /etc/mail/aliases.dir, and the/etc/mail/aliases.pag files to each of the other
systems.

You can copy the three files by using the rcp or rsync commands. Refer
to the rcp(1) man page or the rsync(1) man page for more information.
Alternately, 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, remember that you must
update all the /etc/mail/aliases files each time you add or remove a mail
client.

(Optional) Copy the /etc/mail/aliases and the /etc/mail/aliases.db files to each of the other
systems.

You can copy these files by using the rcp or rsync commands.
Refer to the rcp(1) man page or the rsync(1) man page for more
information. Alternately, 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, remember that you must
update all the /etc/mail/aliases files each time you add or remove a mail
client.

Use the user name that was previously assigned with the domain that is newly assigned.

new_name@newdomain.com

Use the address that is newly assigned.

old_name@olddomain.com

Use the user name that was previously assigned with the domain that was previously assigned.

olddomain.com

Use the domain that was previously assigned.

newdomain.com

Use the domain that is newly assigned.

The first entry redirects mail to a new alias. The next entry creates
a message when an incorrect alias is used. The last entry redirects all
incoming mail from olddomain to newdomain.

Create the database file.

# /usr/sbin/makemap maptypenewmap < newmap

maptype

Select a database type, such as dbm, btree, or hash.

newmap

Use the name of the input file and the first part of the name of the database file. If the dbm database type is selected, then the database files are created by using a .pag and a .dir suffix. For the other two database types, the file name is followed by .db.

Managing the postmaster Alias

Every system must be able to send mail to a postmaster mailbox. You
can create an NIS alias for postmaster, or you can create the alias in
each local /etc/mail/aliases file. Refer to these procedures.

# 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

Edit each system's /etc/mail/aliases file.

Change root to the mail address of the person who is designated as
the postmaster.

Postmaster: mail-address

mail-address

Use the assigned address for the person who is designated as the postmaster.

(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.
For details, refer to How to Create a Separate Mailbox for postmaster.

How to Create a Separate Mailbox for postmaster

If you are creating a separate mailbox for postmaster, follow these instructions.