Rebuild the database used by the MTA after editing /etc/aliases.
Which command is representative?
newaliases reads the aliases source and rebuilds the database used for efficient lookup.
Detailed explanation
mailqIncorrect. mailq lists the delivery queue.
mail -s aliasesIncorrect. mail creates a message.
postfix aliasesIncorrect. This is not the standard cross-MTA alias rebuild command.
newaliasesCorrect. newaliases rebuilds the aliases database.
Try it yourself
An example you can run in a temporary verification environment.
command -v newaliases || printf '%s\n' 'newaliases not installed'Expected result
newaliasesのpath、またはnot installedKey points
- Rebuild after editing
- Different from mailq
- Sendmail-compatible interface
Notes
- Environment: command pathの読取のみ
- Command output formatting can vary slightly by distribution or tool version.
- Run the example in a temporary directory or process when possible.
Foundation review
Read the scope first
Check whether the command acts on the current shell, a new process, an existing process, or a file.
Verify the observable result
Use the supplied command and compare the output with the expected result.