q control file

The q control file contains a series of lines, each beginning with a code letter.

Item Description
B Specifies the body type. The remainder of the line is a text string defining the body type. If this entire field is missing, the body type is 7-bit by default, and no special processing is attempted. Legal values are 7BIT and 8BITMIME.
C Contains the controlling user. For recipient addresses that are a file or a program, sendmail performs delivery as the owner of the file or program. The controlling user is set to the owner of the file or program. Recipient addresses that are read from a .forward or :include: file will also have the controlling user set to the owner of the file. When sendmail delivers mail to these recipients, it delivers as the controlling user, then converts back to root.
F Contains envelope flags. The flags are any combination of w, which sets the EF_WARNING flag; r, which sets the EF_RESPONSE flag; 8, which sets the EF_HAS8BIT flag; and b, which sets the EF_DELETE_BCC flag. Other letters are silently ignored.
H Contains a heading definition. There can be any number of these lines. The order in which the H lines appear determines their order in the final message. These lines use the same syntax as heading definitions in the /etc/mail/sendmail.cf configuration file.
I Specifies the inode and device information for the df file; this can be used to recover your mail queue after a disk crash.
K Specifies the time (as seconds) of the last delivery attempt.
M When a message is put into the queue because an error occurred during a delivery attempt, the nature of the error is stored in the M line.
N Specifies the total number of delivery attempts.
O Specifies the original message transfer system (MTS) value from the ESMTP. It is used for Delivery Status Notifications only.
P Contains the priority of the current message. The priority is used to order the queue. Higher numbers mean lower priorities. The priority increases as the message sits in the queue. The initial priority depends on the message class and the size of the message.
Q Contains the original recipient as specified by the ORCPT= field in an ESMTP transaction. Used exclusively for Delivery Status Notifications. It applies only to the immediately following R line.
R Contains a recipient address. There is one line for each recipient.
S Contains the sender address. There is only one of these lines.
T Contains the message creation time used to compute when to time out the message.
V Specifies the version number of the queue file format used to allow new sendmail binaries to read queue files created by older versions. Defaults to version zero. Must be the first line of the file, if present.
Z Specifies the original envelope ID (from the ESMTP transaction). Used for Delivery Status Notifications only.
$ Contains a macro definition. The values of certain macros ($r and $s) are passed through to the queue run phase.

The q file for a message sent to amy@zeus would look similar to:

P217031 
T566755281 
MDeferred: Connection timed out during user open with zeus 
Sgeo 
Ramy@zeus 
H?P?return-path: <geo> 
Hreceived: by george (0.13 (NL support)/0.01) 
        id AA00269; Thu, 17 Dec 87 10:01:21 CST 
H?D?date: Thu, 17 Dec 87 10:01:21 CST 
H?F?From: geo 
Hmessage-id: <8712171601.AA00269@george> 
HTo: amy@zeus 
Hsubject: test

Where:

Item Description
P217031 Priority of the message
T566755281 Submission time in seconds
MDeferred: Connection timed out during user open with zeus Status message
Sgeo ID of the sender
Ramy@zeus ID of the receiver
H lines Header information for the message