sendmail

sendmailSearch this book
Previous: 37.2 Debugging BehaviorChapter 37
Debugging with -d
Next: 37.4 Pitfalls
 

37.3 Interpreting the Output

Some debugging output references C language structures that are internal to sendmail. For those it will help if you have access to sendmail source. One subroutine, called printaddr(), is used to dump complete details about all the recipients for a given mail message. This subroutine is used by many categories of debugging output, but rather than describe it repeatedly, we describe it once here and reference this description as needed.

37.3.1 The Output Produced by printaddr()

The sendmail program's internal printaddr() subroutine prints details about addresses. The sendmail program views an address as more than just an expression like [email protected]. Internally, it represents every address with a C language structure. The printaddr() routine prints the values stored in most of the items of that structure. Its output looks like this:

ra=addr: mailer mnum (mname), host hname
        user `uname', ruser `rname'
        next=link, alias aname, uid uid, gid gid
        flags=fhex<names here>
        owner=owner, home="home", fullname="fname"
        orcpt="oparam", statmta=mta, status=status
        rstatus="rstatus"
        specificity=spec, statdate=statdate

First, sendmail prints the address in memory, ra, of the C language struct that contains the information necessary to deliver a mail message. It then prints the information in that structure:

addr

The mail address as text, e.g. [email protected]

mnum

Number of the delivery agent to be used (an index into the array of delivery agents)

mname

Symbolic name of that delivery agent (from rule set 0, $#)

hname

Name of the recipient's host machine (from rule set 0, $@)

uname

Recipient's mail name (from rule set 0, $:)

rname

Recipient's login name, if known; otherwise, it is <null>

link

Address in memory of the next C language structure of information about the next recipient in the list of recipients

aname

Address in memory of the next C language structure of information about the alias that led to this address (if there was one)

uid and gid

The uid and gid assigned to this delivery agent. These values are derived from the ownership permissions of either a :include: file or a .forward file (see Section 24.2.2, "Delivery to Files").

fhex

A hexadecimal representation of the possible envelope flags. This is immediately followed by a list of the flags inside the angle brackets. (See Table 37.1 for a description of each flag.)

owner

The owner- that corresponds to the aname above, if there is one

home

Home directory of the recipient (for local mail only)

Table 37.1: Address Flags
NameHexDescription
QDONTSEND0x00000001

Don't send to this address

QBADADDR0x00000002

This address is verified bad

QGOODUID0x00000004

The uid and gid fields are good

QPRIMARY0x00000008

Status was set from argv

QQUEUEUP0x00000010

Queue for later transmission

QSENT0x00000020

Message has been successfully delivered

QNOTREMOTE0x00000040

Not an address for remote forwarding

QSELFREF0x00000080

Address is part of a loop

QVERIFIED0x00000100

Address verified, but not expanded

QBOGUSSHELL0x00000400

User has no valid shell listed

QUNSAFEADDR0x00000800

Address acquired via unsafe path

QPINGONSUCCESS0x00001000

Give return on successful delivery

QPINGONFAILURE0x00002000

Give return on failure

QPINGONDELAY0x00004000

Give return on message delay

QHASNOTIFY0x00008000

Propagate notify parameter

QRELAYED0x00010000

Relayed to non-DSN aware system (DSN)

QEXPANDED0x00020000

Has undergone list expansion (DSN)

QDELIVERED0x00040000

Final delivery succeeded (DSN)

QDELAYED0x00080000

Message was delayed (DSN)

fname

Full name of the recipient if it is known

oparam

The ORCPT parameter to the SMTP RCPT command if there was one.

mta

The name of the MTA host (such as "other.dc.gov") that generated the Delivery Status Notification (DSN) message shown in rstatus

status

The DSN number as text

rstatus

The DSN message from the sending host's MTA.

spec

How specific this address is (unused as of V8.8.4)

statdate

The date and time the status of this address changed


Previous: 37.2 Debugging BehaviorsendmailNext: 37.4 Pitfalls
37.2 Debugging BehaviorBook Index37.4 Pitfalls