Options affect the operation of the sendmail program.  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:
 See Chapter 13, Setting Options, for a tutorial introduction to options.
Locations of all the other files that sendmail needs to access, such as the aliases file.
Location of the queue directory.
Time limits that should be applied to the Time To Live in the queue, the length of the wait with an SMTP connection, and so on.
Default permissions for files and the default user and group identities to use when not running as another user.
Degree of privacy desired, such as what kinds of inquiry to reject or who may examine the queue.
Modes of behavior, such as always queuing or running as a daemon and listening for incoming connections.
Limits that should be placed on system resources. Should one queue only under high load? Should one reserve minimal space in the queue?
Small bits of sendmail's behavior, such as allowing colons to appear in addresses and stripping newlines from sender addresses.
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.
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.
Prior to version 8.7, option names that are declared on the command line could be only a single character long:
argumentprior to V8.7
-o switch (lowercase
is immediately followed (with no intervening
space) by the one-letter name of the option (here,
on the option selected, an
argument may be required.
argument is present, it must immediately follow the
option name with no intervening space. Only one option may be specified
Under V8 sendmail
a space may appear between the
-o and the
X, but no space
may exist between the
X and its
This is because V8 sendmail uses
getopt(3) to parse its command line.
Beginning with version 8.7, option names
may be single-character or multicharacter.
Single-character options are declared with the
case) switch as described above.
Multicharacter options are declared with a
-OLongName=argument beginning with V8.7 uppercase
Space may optionally exist between the
-O and the
LongName. Space may not
exist between the
=, and the
argument unless they are quoted:
-O "LongName = argument"
Only one option may be specified for each
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
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:
But if you need to run this command line frequently,  you may find it handy to use an abbreviation:
 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/tmpOption 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/tmpreadcf: 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/tmpreadcf: 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.
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.
|ErrorMode||(||Section 34.8.24, ErrorMode (e)|
|IgnoreDots||(||Section 34.8.32, IgnoreDots (i)|
Ignore dots. Use the
|(||Section 34.8.77, (M)|
Define a macro. Use the D configuration command instead (see Section 31.3, "Configuration File Definitions").
|MaxDaemonChildren||Section 34.8.35, MaxDaemonChildren|
|SingleThreadDelivery||Section 34.8.64, SingleThreadDelivery|
|Verbose||(||Section 34.8.76, Verbose|
Run in verbose mode. Use the
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.
|AllowBogusHELO||Section 34.8.3, AllowBogusHELO|
Allow no host with HELO or EHLO
|CheckpointInterval||(||Section 34.8.7, CheckpointInterval (C)|
Checkpoint the queue
|ColonOkInAddr||Section 34.8.9, ColonOkInAddr|
Allow colons in addresses
|DefaultCharSet||Section 34.8.14, DefaultCharSet|
Define Content-Type: character set
|DeliveryMode||(||Section 34.8.16, DeliveryMode (d)|
Set delivery mode
|EightBitMode||(||Section 34.8.22, EightBitMode (8)|
How to convert MIME input
Specify mode for error handling
Ignore leading dots in messages
|LogLevel||(||Section 34.8.33, LogLevel (L)|
Set (increase) logging levela
|MaxQueueRunSize||Section 34.8.38, MaxQueueRunSize|
Maximum queue messages processed
|MeToo||(||Section 34.8.39, MeToo (m)|
Send to me too
|MinFreeBlocks||(||Section 34.8.40, MinFreeBlocks (b)|
Define minimum free disk blocks
|MinQueueAge||Section 34.8.41, MinQueueAge|
Skip queue file if too young
|NoRecipientAction||Section 34.8.43, NoRecipientAction|
Handle no recipients in header
|OldStyleHeaders||(||Section 34.8.44, OldStyleHeaders (o)|
Allow spaces in recipient lists
|PrivacyOptions||(||Section 34.8.47, PrivacyOptions (p)|
Increase privacy of the daemon
|QueueSortOrder||Section 34.8.51, QueueSortOrder|
How to pre-sort queue
|SendMimeErrors||(||Section 34.8.60, SendMimeErrors (j)|
Return MIME format errors
|SevenBitInput||(||Section 34.8.62, SevenBitInput (7)|
Force 7-bit input
|SingleLineFromHeader||Section 34.8.63, SingleLineFromHeader|
Strip newlines from From:
|SuperSafe||(||Section 34.8.67, SuperSafe (s)|
Queue everything just in case
|UseErrorsTo||(||Section 34.8.74, UseErrorsTo (l)|
Use Errors-To: for errors
Run in verbose mode
V8.7.3 was accidentally released with the
L) option marked as not safe.
For example, the
(location of the aliases file) is unsafe (and is not in
If you were to send mail by specifying
a new location with the
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
TryNullMXList options were wrongly set to safe. This is yet another reason to always upgrade to the latest version of sendmail.