Creating the postfix aliases database

Postfix uses a Sendmail-compatible aliases(5) table to redirect mail for local(8) recipients. Typically, this information is kept in two files: in a text file /etc/aliases and in an indexed file /etc/aliases.db. The command “postconf alias_maps” will tell you the exact location of the text file.

root@dell:~# postconf alias_maps
alias_maps = hash:/etc/aliases
root@dell:~#

First, be sure to update the text file with aliases for root, postmaster and “postfix” that forward mail to a real person. Postfix has a sample aliases file /etc/postfix/aliases that you can adapt to local conditions.

/etc/aliases:
root: you
postmaster: root

Note: there should be no whitespace before the “:”.

Finally, build the indexed aliases file with one of the following commands:

# newaliases
# sendmail -bi

Trackback URI | Comments RSS

Leave a Reply

You must be logged in to post a comment.