Naar inhoud springen

Newaliases or new aliases.db file creation.

Uit VanderSchaft

To create or update the /etc/aliases.db file for mail systems like Postfix or Sendmail, populate the /etc/aliases text file with mappings, then run newaliases or postalias /etc/aliases. This compiles the text file into a Berkeley DB binary format for faster lookup, eliminating the need to restart the mail service.

Steps to Create/Update aliases.db: Edit the Alias File: Open /etc/aliases (or /etc/mail/aliases) with a text editor.

sudo nano /etc/aliases

Add Aliases: Add your aliases in the format localname: destination1, destination2.

# Example
postmaster: root
admin: user1, user2

Generate the Database: Run the following command to create/update the .db file.

sudo newaliases

OR

sudo postalias /etc/aliases

Note: On some systems, /etc/aliases is a symlink to /etc/mail/aliases.