home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Previous Section Next Section

16.3 Interpret 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.

The sendmail program's internal printaddr( ) subroutine prints details about addresses. The sendmail program views an address as more than just an expression such as gw@wash.dc.gov. 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:

subroutine: ra= addr:
        mailer mnum(mname), host hname
        user `uname', ruser `rname'  
        state=state, next=link, alias aname, uid user-id, gid group-id
        flags=fhex<names here>
        owner=owner, home="home", fullname="fname"
        orcpt="oparam", statmta=mta, status=status
        finalrcpt="finalrcpt"
        rstatus="rstatus"
        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., you@uofa.edu.

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 parse 0, $#).

hname

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

uname

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

rname

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

state

The current state of the message in text form. See Table 16-2 for a list of the text names that can be printed, and their meanings.

Table 16-2. State names

State name

Description

QS_OK

The message is initially in an untried, OK state

QS_DONTSEND

The message must not be sent to this address

QS_BADADDR

The address is bad

QS_QUEUEUP

The message should be queued for this address

QS_RETRY

Proceed to the next MX server and try again

QS_SENT

The message was successfully delivered or relayed to this address

QS_VERIFIED

The address has been verified, but not alias-expanded

QS_EXPANDED

The address has been alias-expanded

QS_SENDER

This address is that of the sender

QS_CLONED

This address was cloned as part of envelope splitting

QS_DISCARDED

This recipient address must be discarded

QS_REPLACED

This address was replaced by the User Database or the localaddr rule set 5

QS_REMOVED

This address has been removed from the recipient list

QS_DUPLICATE

This is a duplicate address that has been suppressed

QS_INCLUDED

This address resulted in a :include: expansion

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).

user-id and group-id

The user-id and group-id assigned to this delivery agent. These values are derived from the ownership permissions of a :include: file or a ~/.forward file (Section 12.2.2), or the user-id and group-id of a local user or the DefaultUser's identity (DefaultUser).

fhex

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

owner

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

home

Home directory of the recipient (for local mail only).

Table 16-3. Address flags

Flag name

Description

QALIAS

This is an expanded alias

QBOGUSSHELL

User has no valid shell listed

QBYNDELAY

For DELIVERBY, set notify, delayed

QBYNRELAY

For DELIVERBY, set notify, relayed

QBYTRACE

For DELIVERBY, set trace

QDELAYED

For DSN, notify if message delayed

QDELIVERED

For DSN, notify if successful final delivery

QEXPANDED

For DSN, notify if address has undergone list expansion

QGOODUID

The user-id and group-id fields are good

QHASNOTIFY

Propagate the notify parameter

QNOTREMOTE

This address is not for remote forwarding

QPINGONDELAY

Provide return notice if message is delayed

QPINGONFAILURE

Provide return notice if failure

QPINGONSUCCESS

Provide return notice if successful delivery

QPRIMARY

Address was specified with SMTP RCPT or on command line

QRCPTOK

Internal recipient( ) routine processed the address

QRELAYED

For DSN, set that the message was relayed to non-DSN-aware system

QSELFREF

This address references itself

QTHISPASS

A scratch bit that indicates the address passed this time

QUNSAFEADDR

Address acquired via unsafe path

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.

finalrcpt

The DSN FinalRecipient: value—for example, "RFC822; gw@wash.dc.gov."

status

The DSN number as text.

rstatus

The DSN message from the remote receiving host's MTA.

statdate

The date and time the status of this address changed.

    Previous Section Next Section