M

Define a macro Obsolete as of V8.7

The M option is used to set or change a defined macro’s value. Although this option is allowed in the sendmail.cf file, it is intended exclusively for use from the command line. Macros that are defined in the command line will not override the values of those same macros defined in the configuration file.

The forms of the M option are as follows:

OMXvalueconfiguration file (old obsolete form)
-oMXvaluecommand line (old obsolete form)
-MXvaluecommand line (V8.7 and later)
DXvalueboth are equivalent to this in the configuration and mc files

In all four cases, the argument value is of type string. The value is assigned to the macro named X. Pre-V8.7 macro names are always a single character. Multicharacter macro names that are available with V8.7 are described in Chapter 21 on page 784.

One example of the usefulness of this option concerns the rmail(8) program. Suppose a machine is used for networked mail. Ordinarily, the $r macro is given the value “ESMTP” to signify that mail is received over the network. But for UUCP mail, the $r macro should be given the value “UUCP.” One way to effect such a change is to arrange for rmail(8) to invoke sendmail with a command-line argument of:

-oMrUUCP

In this command line, the -o switch tells sendmail to define a macro (the M) whose name is r to have the text UUCP as its new value.[434] This new value overrides whatever value $r might have been given in the configuration file. The M option should be approached ...

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.