Options

Contents:
Command-Line Options
Configuration-File Options
Configuring with V8 m4 Options
Alphabetical Table of All Options
Option Argument Types
Interrelating Options
Pitfalls
Alphabetized Reference

Options affect the operation of the sendmail program. [1] Options can be specified in the command line, in the sendmail.cf file, and in a V8 m4 configuration. Among the many behavioral characteristics that can be tuned with options are the following examples:

[1] See Setting Options, for a tutorial introduction to options.

Most options are preset in your sendmail.cf file to be appropriate for your site. Those that need local definitions will usually be indicated by comments. Some sites, especially those that have high mail loads or those connected to many different networks, will need to tune many of the options according to their unique needs.

Command-Line Options

Beginning with version 8.7 sendmail, command-line options may use multicharacter option names. Prior to version 8.7, only single characters were allowed. We describe the old form first, then the new.

Pre-V8.7 Command-Line Option Declarations

Prior to version 8.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). Depending on the option selected, an argument may be required. If that argument is present, it must immediately follow the option name with no intervening space. Only one option may be specified for each -o switch.

Under V8 sendmail a space may appear between the -o and the X, but no space may exist between the X and its argument. This is because V8 sendmail uses getopt(3) to parse its command line.

Multicharacter Options in the Command Line

Beginning with version 8.7, option names may be single-character or multicharacter. Single-character options are declared with the -o (lower case) switch as described above. Multicharacter options are declared with a -O (uppercase) switch:

-OLongName=argument <-beginning with V8.7 -^ uppercase

Space may optionally exist between the -O and the LongName. Space may not exist between the LongName, the =, and the argument unless they are quoted:

-O "LongName = argument"

Only one option may be specified for each -O switch.

The sendmail program ignores case when it considers multicharacter names. Therefore the following three command lines have the same effect, and none produces an error:

-OQueueDirectory=/var/tmp -Oqueuedirectory=/var/tmp -OQuEuEdIrEcToRy=/var/tmp


Multicharacter name shorthand

Beginning with 8.7, multicharacter names in the command line may be specified by using the fewest unique leftmost characters in the name. For example, you can specify the queue directory with the complete QueueDirectory long name:

% /usr/lib/sendmail -OQueueDirectory=/var/tmp

But if you need to run this command line frequently, [2] you may find it handy to use an abbreviation:

[2] With any of the modern utilities such as tcsh(1), ksh(1), or emacs(1), repetition may not require this shorthand.



% /usr/lib/sendmail -OQueueDir=/var/tmp Option QueueDir used as abbreviation for QueueDirectory

Whenever a multicharacter name is abbreviated, sendmail prints a warning (the second line above) to discourage you from using abbreviations inside your configuration file. It will also warn you if you specify too few leftmost letters:

% /usr/lib/sendmail -OQueue=/var/tmp readcf: ambiguous option name Queue (matches QueueFactor and QueueDirectory)

If you misspell the single-character or multicharacter name, the following error is printed, and the option declaration is skipped:

% /usr/lib/sendmail -OQueDirectory=/var/tmp readcf: unknown option name QueDirectory

Although these abbreviations can be handy on command lines, it is vital that you alway use nonabbreviated names in your configuration file. New options will be added to sendmail over time, and the use of abbreviations can lead to future unexpected or ambiguous effects.

Appropriateness of Options

Some options are intended for use only on the command line and make little or no sense when used in the configuration file. Options that are inappropriate in the configuration file are shown in Table 34.1.

Options Inappropriate to the Configuration File
Option Name Description
ErrorMode (e) ErrorMode (e) Set error mode. But note that in unusual circumstances it may be useful in a configuration file.
IgnoreDots (i) IgnoreDots (i) Ignore dots. Use the -OIgnoreDots command line switch (see ) to set this option.
(M) (M) Define a macro. Use the D configuration command instead (see "Configuration File Definitions").
MaxDaemonChildren MaxDaemonChildren Set maximum forked children. Although appropriate on the command-line when processing a queue, it should seldom be used in the configuration file.
SingleThreadDelivery SingleThreadDelivery Set single-threaded delivery. Although appropriate on the command-line when processing a queue, it should seldom be used in the configuration file.
Verbose (v) Verbose Run in verbose mode. Use the -v command line switch (see -v).

Options that Are Safe

It is common practice to install sendmail so that it runs with root privilege. Security considerations normally require that sendmail give up that privilege for most command-line options specified by the ordinary user. But the ordinary user can specify a few options that allow sendmail to keep its root privilege. Those options are called "safe" and are shown in Table 34.2.

Options That Are Safe
Option Name Description
AllowBogusHELO AllowBogusHELO Allow no host with HELO or EHLO
CheckpointInterval (C) CheckpointInterval (C) Checkpoint the queue
ColonOkInAddr ColonOkInAddr Allow colons in addresses
DefaultCharSet DefaultCharSet Define Content-Type: character set
DeliveryMode (d) DeliveryMode (d) Set delivery mode
EightBitMode () EightBitMode (8) How to convert MIME input
ErrorMode (e) Specify mode for error handling
IgnoreDots (i) Ignore leading dots in messages
LogLevel (L) LogLevel (L) Set (increase) logging levela
MaxQueueRunSize MaxQueueRunSize Maximum queue messages processed
MeToo (m) MeToo (m) Send to me too
MinFreeBlocks (b) MinFreeBlocks (b) Define minimum free disk blocks
MinQueueAge MinQueueAge Skip queue file if too young
NoRecipientAction NoRecipientAction Handle no recipients in header
OldStyleHeaders (o) OldStyleHeaders (o) Allow spaces in recipient lists
PrivacyOptions (p) PrivacyOptions (p) Increase privacy of the daemon
QueueSortOrder QueueSortOrder How to pre-sort queue
SendMimeErrors (j) SendMimeErrors (j) Return MIME format errors
SevenBitInput () SevenBitInput (7) Force 7-bit input
SingleLineFromHeader SingleLineFromHeader Strip newlines from From:
SuperSafe (s) SuperSafe (s) Queue everything just in case
UseErrorsTo (l) UseErrorsTo (l) Use Errors-To: for errors
Verbose (v) Run in verbose mode

V8.7.3 was accidentally released with the LogLevel (L) option marked as not safe. For example, the AliasFile (A) option (location of the aliases file) is unsafe (and is not in Table 34.2). If you were to send mail by specifying a new location with the AliasFile option, sendmail would change its identity from root to an ordinary user (you), thus preventing sendmail from being able to queue its mail:

/var/spool/mqueue: Permission denied

Note that prior to V8.8.4, the DontInitGroups and TryNullMXList options were wrongly set to safe. This is yet another reason to always upgrade to the latest version of sendmail.