Prints the contents of the mail queue.
/usr/sbin/mailq [ -v ]
The mailq and MAILQ commands print a list of messages that are in the mail queue. The first line printed for each message shows:
The second line shows the error message that caused the message to be retained in the in the queue, it is not displayed if the message is being displayed for the first time. The status characters are either:
The following lines show message recipients, one per line.
The mailq command is the same as the sendmail -bp command.
Specify the -v flag to display message priority.
-v | Prints verbose information. This adds the priority of the message and a single character indicator (+ or blank) indicating wheather a warning message has been sent on the first line of the message. Additionally, extra lines may be intermixed with the recipents indicating the controlling user information; this shows who owns any program that are executed on behalf of this message and the name of the alias this command expanded from, if any. |
The command returns the following exit values:
0 | Exits successfully. |
>0 | An error occurred. |
The mailq command prints two types of lists:
Mail Queue (1 request) ---QID---- --Size-- -----Q-Time----- ------Sender/Recipient----- AA02508 3 Thu Dec 17 10:01 root (User unknown) bad_user
Mail Queue (1 request) ---QID---- --Size-- -Priority- ---Q-Time--- --Sender/Recipient-- AA02508 3 1005 Dec 17 10:01 root (User unknown) bad_user
The fields have the following
meanings:
/usr/sbin/mailq | Contains the mailq command. |
/var/spool/mqueue directory | Contains the log file and temporary files associated with the messages in the mail queue. |
The sendmail command.
Managing the Mail Queue Files and Directories in AIX 5L Version 5.1 System Management Guide: Communications and Networks.