Specify mode of error handling All versions

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=modeconfiguration file (V8.7 and later)
-OErrorMode=modecommand line (V8.7 and later)
define(`confERROR_MODE',mode)   ← mc configuration (V8.7 and later)
-emodecommand-line shorthand (not recommended)
Oemodeconfiguration file (deprecated)
-oemodecommand line (deprecated)

The type of mode is a 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





ErrorMode=e on page 1029

Like m, but always exit with a zero exit status.


ErrorMode=m on page 1029

Mail error notification to the sender no matter what.


ErrorMode=p on page 1030

Print error messages (the default).


ErrorMode=q on page 1030

Remain silent about all delivery errors.


ErrorMode=w on page 1030

Write errors to the sender’s terminal screen (deprecated and removed as of V8.13).

Note ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.