Installing and Administering Internet Services
180 Chapter4
Installing and Administering sendmail
How sendmail Works
also modify the /etc/mail/sendmail.cf file so that the clients relay all
outbound mail to the server; this is described in “Modifying the Default
sendmail Configuration File” on page 185.
How sendmail Handles Errors
By default sendmail immediately reports to standard output any errors
that occur during the routing or delivery of a message. sendmail
distinguishes between “temporary failures” and “permanent failures.”
Permanent failures are mail transactions that are unlikely to succeed
without some intervention on the part of the sender or a system
administrator. For example, mailing to an unknown user is a permanent
failure. A delivery failure of the local mailer because the file system is
full is also a permanent failure.
Temporary failures are mail transactions that might succeed if retried
later. For example, “connection refused” when attempting to connect to a
remote SMTP server is a temporary failure, since it probably means that
the server is temporarily not running on the remote host.
How sendmail Handles “Permanent” Failures
Permanent failures include the following:
• Temporary failures that have remained in the mail queue for the
queue timeout period (set with the Timeout.queuereturn option in
the /etc/mail/sendmail.cf file), which is normally five days.
• Local recipient user unknown.
• The recipient address cannot be resolved by the configuration file.
• Permanent delivery agent (mailer) failures.
• Inability to find an internet address for a remote host.
• A remote SMTP server reports during the SMTP transaction that an
address is undeliverable.
In most cases, if message delivery fails permanently on a remote system,
mail that includes a transcript of the failed delivery attempt and the
undelivered message is returned to the sender. This transcript includes
any standard error output from the delivery agent that failed.
If sendmail tries all MX hosts in its preference list and fails to deliver a
message, the message is returned to the sender with an error message.