NoRecipientAction

How to handle no recipients in header V8.7 and later

The header portion of a mail message must contain at least one recipient header. Problems can arise when an MUA produces a message with no recipients or when the only recipients are listed in a Bcc: header line. In the past, sendmail inserted an Apparently-To: header (Apparently-To: on page 1151) into any message that lacked header recipients. The addresses in the Apparently-To: were gleaned from the envelope.

Beginning with V8.7 sendmail, it is possible to choose how messages without recipients will be handled. This is done with the NoRecipientAction option, which is used like this:

O NoRecipientAction=whatconfiguration file (V8.7 and later)
-ONoRecipientAction=whatcommand line (V8.7 and later)
define(`confNO_RCPT_ACTION',what)     ← mc configuration (V8.7 and later)

The argument what is of type string and must be selected from those shown in Table 24-22. If the what is omitted or if it is other than one of the possibilities shown, the following error is printed, and the option is ignored:

Invalid NoRecipientAction: bad what

If the entire option is omitted, the default becomes none. The default for the mc technique is to omit this option.

The what is case-insensitive (meaning that none and nOnE are both identical).

Table 24-22. NoRecipientAction option keywords

What

§

Meaning

add-apparently-to

NoRecipientAction=add-apparently-to on page 1060

Add an Apparently-To: header.

add-bcc

NoRecipientAction=add-bcc on ...

Get sendmail, 4th 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.