Trusted Solaris Administrator's Procedures

Tracing sendmail's Activities

Multiple instances of sendmail are involved in local and remote mail delivery. To aid in debugging any problems with sendmail, Figure 6-1 shows how data flows through the sendmail processes.

Any mailer that is used to send mail (the default is dtmail) starts an instance of sendmail. This instance of sendmail attempts to deliver any mail that originates on the host, storing it in the local /var/spool/mqueue MLD until it is delivered [1 in Figure 6-1 shows this instance of sendmail]. Normally the message is delivered right away so its stay in the queue is only a matter of seconds. However, if the remote host is down, mail can stay in the queue indefinitely.

An instance of the sendmail program also starts when the system is booted. This instance of sendmail listens at port 25 and attempts to deliver any mail that it receives from a remote host, also storing each message in the mail queue MLD until it is delivered [3 and 5 in the example].

Yet another instance of sendmail periodically scans the mail queue and attempts to deliver any mail in the queue [2 and 4 in the example]. The following figure shows some of the sendmail processes on three hosts: cascade, trustworthy, and juggle. Host trustworthy is the mail relay host for juggle.

Figure 6-1 Sendmail Data Flow Example

Graphic

When mail is sent to username@hostname and hostname is a remote host, sendmail forwards the message to port 25 of hostname. In the example, when mail addressed to homan@cascade is sent from another account on host cascade, sendmail #1 puts the mail into an SLD within the /var/spool/.MLD.mqueue on cascade, where it is delivered by a local mailer. sendmail #2 on cascade periodically polls the queue and delivers mail that could not get delivered right away. sendmail #3 and #5 on hosts trustworthy and juggle listen on port 25 for incoming mail. The messages originating on cascade that are addressed to hosts trustworthy and juggle are both put into the local /var/spool/.MLD.mqueue and sent to port 25 of trusted, which is acting as a mail relay host in this example. The sendmail #3 on trusted also puts both messages into an SLD within the local /var/spool/mqueue, where the message to roseanne@trustworthy is delivered by the local mailer and the message to ahart@juggle is forwarded to sendmail #5, which is listening at port 25 of juggle.