LFCS · Question #524
Which of the following commands should be used to print a listing of email in the system's mail queue?
The correct answer is B. mailq. The mailq command is used to display the contents of the system's mail queue, showing messages awaiting delivery.
Question
Options
- Alpq
- Bmailq
- Cmlq
- Dsendmail -l
How the community answered
(55 responses)- A2% (1)
- B89% (49)
- C2% (1)
- D7% (4)
Why each option
The `mailq` command is used to display the contents of the system's mail queue, showing messages awaiting delivery.
The `lpq` command displays the status of print queues, not email queues.
The `mailq` command, often a symbolic link to `sendmail -bp` or a similar command provided by other Mail Transfer Agents (MTAs) like Postfix, specifically prints a listing of all messages currently in the mail queue that are awaiting delivery.
`mlq` is not a standard Linux command for listing mail queues.
While `sendmail` is an MTA, the `-l` option is not the correct flag to list the mail queue; `sendmail -bp` or simply `mailq` is used.
Concept tested: Email queue management
Source: https://man7.org/linux/man-pages/man8/mailq.8.html
Topics
Community Discussion
No community discussion yet for this question.