Installing and Administering Internet Services

68 Chapter2
Installing and Configuring Internet Services
Troubleshooting sendmail
time the mail queue is processed.
If mailq is run in verbose mode (with the -v option), then when it prints
the queue, it will also show the priority of each queued message.
The Files in the Mail Queue
The files that sendmail creates in the mail queue all have names of the
form
zz
T
AAnnnnn
, where
zz
is the type of the queue file and T
AA
is an
identifier used to distinguish separate queue entries that happen to have
the same process ID. sendmail starts with TAA and loops through TAB,
TAC, and so on, until it is able to form a unique ID. The five-digit number
(
nnnnn
) is the process ID of the process creating the queue entry.
A file whose name begins with df is a data file. The message body,
excluding the header, is kept in this file.
A file whose name begins with qf is a queue-control file, which contains
the information necessary to process the job.
A file whose name begins with xf is a transcript file. This file is normally
empty while a piece of mail is in the queue. If a failure occurs, a
transcript of the failed mail transaction is generated in this file.
The queue-control file (type qf) is structured as a series of lines, each
beginning with a letter that defines the content of the line. Lines in
queue-control files are described in Table 2-2.
Table 2-2 Lines in Queue-Control Files
Initial
Letter
Content of Line
B The message body type (either 7bit or 8bitmime).
C The controlling user for message delivery. This line always
precedes a recipient line (R) that specifies the name of a file or
program name. This line contains the user name that sendmail
should run as when it is delivering a message into a file or a
program’s stdin.
D The name of the data file. There can be only one D line in the
queue-control file.
E An error address. If any such lines exist, they represent the
addresses that should receive error messages.