15.4.3 Displaying Mailer Information

15.5 Mail Aliasing

Aliases map names to address lists. The aliases are defined in /etc/aliases file by the user administrator. The /etc/aliases file consists of a series of entries in the following format:

Alias: Name1, Name2, ... NameX

where Alias can be any alphanumeric string that you choose (not including special characters, such as @ or !). Name1 through NameX is a series of one or more recipient names. The /etc/aliases file must contain the following three aliases (a sample file is shown in Figure 142):

15.5.1 Creating or Modifying Local System Aliases

To add the programer alias for four users (John, Smith, Mary, Bob) working together in the same department, perform the following functions:

  1. Edit the /etc/aliases file.

  2. On a blank line, add an alias followed by a colon (:) followed by a list of comma-separated recipients. For example, the following entry defines an alias named programer to be the names of the people in that group.
    programer: john, smith, mary@sv1051c, bob@sv1051c

  3. Create an owner for any distribution list aliases. If the sendmail command has trouble sending mail to the distribution list, it sends an error message to the owner of that list. For example, the owner of the above list is root of system sv1051a and is defined by the following entry in /etc/aliases file:
    owner-sys: root@sv1051a

  4. Recompile the /etc/aliases file as described in following section.

15.5.2 Building the Alias Database

The sendmail command does not directly use the alias definitions in the local system /etc/aliases file. Instead, the sendmail command reads a processed database manager (dbm) version of the /etc/aliases file. You can compile the alias database using one of the following methods:

Run the /usr/sbin/sendmail command using the -bi flag or run newaliases. This command causes the sendmail command to read the local system /etc/aliases file and creates two additional files containing the alias database information:

After you have completed building the alias database, you can use the alias (programer) to send mail to the users (smith and john) on the local system and the users (mary and bob) on system sv1051c by using mail command as shown below:

mail programer

15.6 Mail Addressing