The -d11.1 (a.k.a. -d11)
debugging switch is used to trace message delivery. It must be run
with the -v command-line switch, or no output will
be produced.
First, for each delivery agent the following is printed:
openmailer: argv
Here, argv is the A= array
for the delivery agent, with macros expanded and printed.
Second, the status of remote hosts is cached internally. Before
connecting to a remote host, sendmail checks its
cache to see whether that host is down. If it is, it skips connecting
to that host. If the -d11.1 debugging switch is
also specified, the status of the down host is printed as:
openmailer: output of mci_dump( ) here
The output of mci_dump( ) looks like this:
MCI@memaddr: flags=mci_flags<flag,flag,...>,
errno=mci_errno, herrno=mci_herrno, exitstat=mci_exitstat, state=mci_state, pid=mci_pid,
maxsize=mci_maxsize, phase=mci_phase, mailer=mci_mailer,
status=mci_status, rstatus=mci+rstatus,
host=mci_host, lastuse=mci_lastuse
The meaning of each mci_ item in this output is
described in Table 16-8.
Table 16-8. The meaning of the MCI structure items
memaddr
|
The address in memory of this C-language structure
|
mci_flags
|
The flag bits in hexadecimal (see Table 16-9)
|
mci_errno
|
The error number of the last connection
|
mci_herrno
|
The DNS h_errno of the last lookup
|
mci_exitstat
|
The <sysexits.h> exit status of the last
connection
|
mci_state
|
The current SMTP state
|
mci_maxsize
|
The maximum size message the host will accept
|
mci_pid
|
The PID of the child process
|
mci_phase
|
SMTP phase (string) such as "client
greeting" (or NULL)
|
mci_mailer
|
The (text) name of the delivery agent (or NULL)
|
mci_status
|
The DSN status to be added to the address (or NULL)
|
mci_rstatus
|
The SMTP status to be added to the address (or NULL)
|
mci_host
|
The host's name (or NULL)
|
mci_lastuse
|
Last usage time in ctime(3) format
|
Table 16-9 shows what the individual flag bits in
mci_flags mean, and the human-readable
flags text that corresponds to each bit. Those
text items are shown with the leading source MCIF_
prefix removed.
Table 16-9. The meaning of mci_flags hexadecimal values
VALID
|
0x00000001
|
This entry is valid
|
TEMP
|
0x00000002
|
Don't cache this connection (prior to V8.12)
|
CACHED
|
0x00000004
|
This connection is currently in open cache
|
ESMTP
|
0x00000008
|
This host speaks ESMTP
|
EXPN
|
0x00000010
|
EXPN command supported
|
SIZE
|
0x00000020
|
SIZE option supported
|
8BITMIME
|
0x00000040
|
BODY=8BITMIME supported
|
7BIT
|
0x00000080
|
Strip this message to 7 bits
|
MULTSTAT
|
0x00000100
|
MAIL11V3: handles MULT status (prior to V8.12)
|
INHEADER
|
0x00000200
|
Currently outputting header
|
CVT8TO7
|
0x00000400
|
Convert from 8 to 7 bits
|
DSN
|
0x00000800
|
DSN extension supported
|
8BITOK
|
0x00001000
|
OK to send 8-bit characters
|
CVT7TO8
|
0x00002000
|
Convert from 7 to 8 bits
|
INMIME
|
0x00004000
|
Currently reading MIME header
|
AUTH
|
0x00008000
|
ESMTP AUTH= is supported (V8.10 and above)
|
AUTHACT
|
0x00010000
|
SASL (AUTH) is active (V8.10 and above)
|
ENHSTAT
|
0x00020000
|
ENHANCEDSTATUSCODES SMTP extension supported (V8.10 and above)
|
PIPELINED
|
0x00040000
|
PIPELINING SMTP extension supported (V8.12 and above)
|
TLS
|
0x00100000
|
STARTTLS SMTP extension supported (V8.12 and above)
|
TLSACT
|
0x00200000
|
STARTTLS is active (V8.12 and above)
|
DLVR_BY
|
0x00400000
|
DELIVERBY SMTP extension supported (V8.12 and above)
|
HELO
|
0x00800000
|
Sending sendmail used HELO, so ignore extensions
(V8.12 and above)
|
ONLY_EHLO
|
0x10000000
|
Use only EHLO when establishing a connection (V8.12 and above)
|
After checking to see whether the host is down,
sendmail attempts to connect to it for network
SMTP mail. If that connect fails, the -d11.1
debugging switch causes the following to be printed:
openmailer: makeconnection => stat=exitstatus, errno=errno
Here, exitstatus is a numerical representation
of the reason for the failure, as documented in
<sysexits.h>, and
errno is the system-level reason for the error,
as documented in <errno.h>.
Other errors, such as failure to establish a
pipe(2), or failure to
fork(2), cause the following to be printed:
openmailer: NULL
This message (although it contains no information) signals that a
more descriptive error message was logged with
syslog(3) (Section 14.3).