Alias database building

The sendmail command does not use directly the alias definitions in the local system /etc/mail/aliases file. Instead, the sendmail command reads a processed database manager (dbm) version of the /etc/mail/aliases file.

You can compile the alias database using one of the following methods:

  • Run the /usr/sbin/sendmail command using the -bi flag.
  • Run the newaliases command. This command causes the sendmail command to read the local system /etc/mail/aliases file and create a new file containing the alias database information. This file is in the more efficient Berkeley format:

    /etc/mail/aliases.db

  • Run the sendmail command using the Rebuild Aliases flag. This rebuilds the alias database automatically when it is out-of-date. Auto-rebuild can be dangerous on heavily loaded machines with large alias files. If it might take more than the rebuild timeout (normally five minutes) to rebuild the database, there is a chance that several processes will start the rebuild process simultaneously.
Note:
  1. If these files do not exist, the sendmail command cannot process mail and will generate an error message.
  2. If you have multiple alias databases specified, the -bi flag rebuilds all the database types it understands (for example, it can rebuild Network Database Management (NDBM) databases but not NIS databases).

The /etc/netsvc.conf file contains the ordering of system services. To specify the service ordering of aliases, add the following line:

aliases=service, service

where service can be either files or nis. For example:

aliases=files, nis

tells the sendmail command to try the local alias file first; and if that fails, try nis. If nis is defined as a service, it should be running.

For further information on the /etc/netsvc.conf file, see Files Reference.