List messages remaining in the local MTA delivery queue without modifying them.
Which command is appropriate?
mailq lists queued messages with IDs, senders, recipients, and delay reasons.
Detailed explanation
mailIncorrect. mail accesses a user's mailbox.
Incorrect. mail accesses a user's mailbox.
mailqCorrect. mailq lists the delivery queue.
Correct. mailq lists the delivery queue.
newaliasesIncorrect. newaliases rebuilds alias data.
Incorrect. newaliases rebuilds alias data.
loggerIncorrect. logger sends a syslog message.
Incorrect. logger sends a syslog message.
Try it yourself
An example you can run in a temporary verification environment.
mailq --help 2>&1 | sed -n '1,8p'Expected result
mail queue表示の使用方法またはMTA情報Key points
- Reads the queue
- Does not change delivery
- MTA-compatible interface
Notes
- Environment: mailq help / queue照会なし
- 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.