Name

ErrorMode

Synopsis

The sendmail program is flexible in its handling of delivery errors. By selecting from five possible modes with the ErrorMode option, you can tailor notification of delivery errors to suit many needs.

This option is intended primarily for use from the command line. If included in the configuration file, it should be given only a p or m argument, for print mode (the default) or mail-error mode.

The forms of the ErrorMode option are as follows:

O ErrorMode=mode             configuration file (V8.7 and later) 
-OErrorMode=mode             command line (V8.7 and later) 
define(`confERROR_MODE',mode)    mc configuration (V8.7 and later) 
-emode                       command-line shorthand (not recommended) 
Oemode                       configuration file (deprecated) 
-oemode command line (deprecated) 

The type of mode is character. If mode is missing, the default value is p (for print normally). If this ErrorMode option is entirely missing, the default value is p.

The possible characters for the mode argument are listed in Table 24-20.

Table 24-20. ErrorMode option modes

Mode

§

Meaning

e

See this section

Like m, but always exit with a zero exit status

m

See this section

Mail error notification to the sender no matter what

p

See this section

Print error messages (the default)

q

See this section

Remain silent about all delivery errors

w

See this section

Write errors to the sender’s terminal screen

Note that the error-handling mode is automatically set to m (for mail errors) in three special circumstances. ...

Get Sendmail, 3rd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.