Previous Section Next Section

M

Define a macroObsolete 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:

OMXvalue configuration file (old obsolete form) 
-oMXvalue    command line (old obsolete form) 
-MXvalue command line (V8.7 and later) 
DXvalue  both 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 .

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.[76] This new value overrides whatever value $r might have been given in the configuration file. The M option should be approached with caution. If you later upgrade your sendmail program and install a new configuration file, you might find that the names of macros aren't what you expect. Previous command-line assumptions about macro names can suddenly break.

[76] Under V8 sendmail the $s and $r macros should be assigned values with the -p command-line switch (-p). Also note that -oM has been deprecated in favor of the new -M command-line switch.

The M option is safe in assigning values only to the $r and $s macros. For all other macros it is unsafe and, if specified from the command line, can cause sendmail to relinquish its special privileges. Pre-V8 SunOS sendmail was an exception in that it considered this option safe for all macros. Note that the M option should never be used in the configuration file (instead use the D configuration command).

    Previous Section Next Section