Mail aliases provide a means to redirect mail to local recipients. Specifically, it allows mail destined for a number of different addresses to be delivered to a single mailbox. A common use for this is to direct mail for users like postmaster to a real person. This page is divided into two sections. The upper section labelled Aliases Options contains the location and format of the alias files that Postfix should use to construct its alias databases and specifies the type of database to use. The lower section provides a list of all configured aliases on the system, and what the alias maps to.
This option sets the filenames that Postfix will use for local delivery alias translation. The filename will have a suffix appended to it based on the file type. This option correlates to the alias_maps directive and the default is system dependent. Some common defaults include hash:/etc/aliases or hash:/etc/postfix/aliases. The first part of the entry, preceding the colon, is the type of database to use, which will be one of hash for systems with a modern Berkeley DB implementation, dbm for older style systems that only have dbm available, or nis for systems that run NIS. The after-colon portion of the entry is the path to the filename from which the database name is derived. Depending on the type of database used, the file suffix will be .db (for db systems), and .paq and .dir for dbm systems.
This option, closely related to the above, specifies the alias database file(s) that are built when the newaliases or sendmail -bi commands are run. These commands generate the alias database from the flat file in the above option, in order to speed alias lookups performed by Postfix. Because there may be thousands of aliases on a large mail server, importing them into a database is necessary to maintain efficiency. This option correlates to the alias_database directive. Defaults are system dependent, but will commonly be the same as the above option.
This section of the page provides a list of all configured aliases. To edit an alias, click on the name of the alias. To create an alias, click on the Create a new alias button and fill in the alias Name, and Alias to... fields. Whenever the aliases files have been modified, it is necessary to recreate the aliases database files as well in order for the changes to take effect. When using Webmin this step is performed automatically, and no additional steps are required.
![]() | If adding aliases from the command line, it is possible to regenerate the aliases database using the command postalias. The manpage for this command is a useful resource for understanding how aliases databases are handled in Postfix. |