Command-Line Definitions
Defined sendmail
macros can also be declared when sendmail
processes its command line, by using either the -M
command-line switch or the M
option (M). The forms for these command-line
declarations are:
-oMXtext ← no longer recommended -MXtext ← preferred as of V8.7
For both forms, the X is the
sendmail macro name, which can be
single-character or multicharacter (we discuss this soon). The
text
follows the name and is the value
assigned to the macro.
In the first form, the -o
switch tells
sendmail that this is an option. The
M
is the name of the option. The
M
option causes sendmail to
use the characters that follow the M
as a macro
definition. This form still works but might be eliminated in a future
version of sendmail.
In the second form, the -M
command-line switch
causes sendmail to use the characters that
follow the M
as a macro definition. Beginning with
V8.7 sendmail, this is now the preferred form.
Because these forms of definition are a part of the command line, all
special characters are interpreted by the shell. Any
text
that contains shell wildcard or
history characters should have each of those special characters
prefixed with a backslash:
-MXsurprise!me ← /! is special for the C shell
Command-line macros are defined before the configuration file is read and parsed by sendmail. Note that configuration-file macros always override command-line macros. Despite this, command-line definitions can still be useful. Preassigned macros can be given new values, ...
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.