O'Reilly logo

Sendmail, 3rd Edition by Bryan Costales

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required