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


Previous Section Next Section

EX_OSERR

A system resource error sendmail exit value

The EX_OSERR exit code (value 71) results from various operating system errors, several of which are described in this section. In general, this exit value is accompanied by an error message describing the problem.

When sendmail is unable to get a pipe(2) connection to send the mail message to a delivery agent, it logs one of the following errors and the fork(2)'d child exits with EX_OSERR:

recipient... openmailer(delivery agent): pipe (to mailer)
recipient... openmailer(delivery agent): pipe (from mailer)

If sendmail is unable to dup(2) a file descriptor so that it can write to its pipe, it logs one of the first three errors shown here. If sendmail fails to write to its transcript file (as set by the -X switch; Section 14.2), it logs the last error shown here. In all four cases the current open file descriptors are logged, as described in SIGUSR1:

recipient... openmailer(delivery agent): cannot dup pipe file descriptor for stdout 
recipient... openmailer(delivery agent): cannot dup stdout for stderr 
recipient... openmailer(delivery agent): cannot dup pipe file descriptor for stdin 
recipient... openmailer(delivery agent): cannot dup xscript file descriptor for stdout 

If a delivery agent cannot be executed, sendmail logs the following error message, and the fork(2)'d child exits with EX_OSERR:

Cannot exec delivery agent: reason 

To save (cache) information about hosts to which connections have been made, sendmail saves a copy of the file descriptors for that connection to its internal mci structures (-d11.1). If it cannot duplicate a file descriptor, it logs one of the following messages and the fork(2)'d child exits with EX_OSERR:

deliver: cannot create mailer output channel, fd=file descriptor
deliver: cannot create mailer input channel, fd=file descriptor

When looking up the MX record for a host, the resolv library can return an absurd value. When that happens, the following message is logged and that MX record is ignored:

getmxrr: res_search (host) failed with impossible h_errno (bad value) 

To queue a message, sendmail must save a qf file to its queue directory. If it cannot create that file, if the directory exists, and if the uid of sendmail is 0, one of the following error messages will be logged (depending on your version of sendmail) and the fork(2)'d child will exit with EX_OSERR:

Cannot create
Cannot create "qf file" in "directory" (euid=uid): reason
queueup: cannot create qf file, uid=uid: reason
cannot rename(tf file, qf file), uid=uid

When sendmail has successfully connected to a remote host, it checks to see whether it knows to whom it connected. If, for some strange reason, it doesn't know, it logs this error and drops the connection, and the fork(2)'d child exits with EX_OSERR:

deliver: no hostname
    Previous Section Next Section