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.
mailIncorrect. mail is a user mail command.
newaliasesCorrect. newaliases rebuilds the alias database.
logrotateIncorrect. 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
MTA
A mail transfer agent that accepts, routes, and queues messages.
Alias and forwarding
Rules that map a local address to one or more delivery destinations.
Mail queue
Temporary storage for messages waiting to be delivered or retried.