After editing /etc/aliases, rebuild the database consulted by the MTA.
Which command is appropriate?
newaliases rebuilds the lookup database from /etc/aliases for an MTA implementation that uses it.
Detailed explanation
mailqIncorrect. mailq lists the delivery queue.
Incorrect. mailq lists the delivery queue.
mailIncorrect. mail is a user mail command.
Incorrect. mail is a user mail command.
newaliasesCorrect. newaliases rebuilds the alias database.
Correct. newaliases rebuilds the alias database.
logrotateIncorrect. logrotate manages log generations.
Incorrect. logrotate manages log generations.
Try it yourself
An example you can run in a temporary verification environment.
newaliases --help 2>&1 | sed -n '1,8p'Expected result
newaliasesの使用方法またはMTA互換command情報Key points
- Rebuild after editing
- MTA implementation may vary
- Check errors
Notes
- Environment: newaliases help / database更新なし
- 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.