Command-Line Options
Beginning with V8.7 sendmail, command-line options can have multicharacter option names. Prior to V8.7, only single-character names were allowed. We describe the old form first, then the new.
Pre-V8.7 Command-Line Option Declarations
Prior to V8.7, option names that are declared on the command line could be only a single character long:
-oXargument← prior to V8.7
The -o
switch (lowercase o
) is
immediately followed (with no intervening space) by the one-letter
name of the option (here, X
). The one-letter names
are case-sensitive (x
is not the same as
X
). Depending on the option selected, an
argument
might be required. If that
argument
is present, it must immediately
follow the option name with no intervening space. Only one option can
be specified for each -o
switch.
Under V8 sendmail a space can appear between the
-o
and the X
, but no space can
exist between the X
and its
argument
. This is because V8
sendmail uses getopt(3) to
parse its command line.
If an unknown single-character option name is used, sendmail will print and log the following error:
readcf: unknown option name 0x31
Here, the unknown character was a 1, printed in hexadecimal notation.
Multicharacter Command-Line Options
Beginning
with V8.7, option names can be single-character or multicharacter.
Single-character options are declared with the -o
(lowercase) switch as described earlier. Multicharacter options,
which are preferred, are declared with a -O
(uppercase) switch:
-OLongName=argument ← beginning ...
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.