Last Updated : 22 Oct, 2024
mailq i.e. "mail-queue", this command in Linux prints the mail queue i.e. the list of messages that are there in the mail queue. You should have a mail-server setup on your Linux machine, to use this command, there are ways i.e MTA's(Mail Transfer agent) you can use like sendmail which uses the service smtp. The output of mailq command is similar to the sendmail -bp command that also prints the mail queue.
Syntaxmailq [options]
The most commonly used options include -v for verbose mode, which provides more detailed information such as message priority.
Practical Examples of the mailq Command Example 1: maliq without any optionSimply prints the messages in the mail queue.
$ mailq
Output
Mail Queue (1 request)Example 2: Prints along with priority specified
---QID---- --Size-- -----Q-Time----- ------Sender/Recipient-----
SS04506 5 Tue Nov 12 09:01 root
(User unknown)
Simply prints the messages in the mail queue.
$ mailq -v
Output
Mail Queue (1 request)
---QID---- --Size-- -Priority- -----Q-Time----- ------Sender/Recipient-----
SS04506 5 2005 Tue Nov 12 09:01 root
(User unknown)
Here,
The mailq command is an essential tool for managing email queues in Linux-based systems. It allows system administrators to view the status of emails waiting in the queue, troubleshoot delivery issues, and optimize the flow of outgoing messages. In environments with high email traffic, mailq plays a critical role in maintaining the efficiency and reliability of mail servers.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4