Use a sendmail-compatible interface to list pending mail without changing it.
Which command is representative?
mailq lists queued messages, IDs, senders, recipients, and delay reasons.
Detailed explanation
mailqCorrect. mailq lists the pending mail queue.
Correct. mailq lists the pending mail queue.
newaliasesIncorrect. newaliases rebuilds aliases.
Incorrect. newaliases rebuilds aliases.
mail -s queueIncorrect. mail creates a message.
Incorrect. mail creates a message.
logger mailqIncorrect. logger only sends a string to logging.
Incorrect. logger only sends a string to logging.
Try it yourself
An example you can run in a temporary verification environment.
command -v mailq || printf '%s\n' 'mailq not installed'Expected result
mailqのpath、またはnot installedKey points
- Read queue
- No modification
- Compatibility command
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.