-d6.1

Show failed mail Debug command-line switch

Mail can fail for a wide variety of reasons. The way that sendmail handles errors is determined by the setting of the ErrorMode option (ErrorMode on page 1028) in the configuration file. The -d6.1 (a.k.a. -d6) debugging switch causes sendmail to print the error-handling mode that is in effect at the time it first begins to handle failed mail:

savemail, errorMode = char, id = qid, ExitStat = errornum
e_from= ← output of printaddr(  ) here (§15.3 on page 533)

Here, char is either p for print errors; m for mail-back errors; w for write-back errors; e for special Berknet processing; or q for “don’t print anything” (all of which are described under the ErrorMode option in ErrorMode on page 1028). The qid is the queue identifier (such as g7PEf0Bv027517). The errornum is the number of the error that caused the message to fail (as defined in <sysexits.h>). And e_from= uses printaddr( ) to print details about the sender’s address.

If the error-processing mode is m (for mail back) and the -d6.1 debugging switch is in effect, sendmail prints details about how the message is being returned to the sender:

***Return To Sender: msg=reason, depth=number, e=addr, returnq=
 ← output of printaddr(  ) here (§15.3 on page 533)

Here, reason is a quoted string of text that explains why the mail failed. This can be an SMTP reply string. The number is zero for normal delivery and one for error delivery. The addr is the location in memory of the information about the ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.