Interrelating Options

At the end of this chapter we list all the options in alphabetical order for easy lookup and explain each in detail. Here, we present them grouped by application with only a brief description.

File Locations

The only file that sendmail knows the location of is its configuration file. [3] Options in the configuration file tell sendmail where all other files and directories are located. The options that specify file locations are summarized in Table 34.6. All file location options are of type string.

[3] Beginning with V8.6 sendmail, it also knows the location of its pid file.

File Location Options
Option Name File
AliasFile (A) Aliases file and its database files
ErrorHeader (E) Set error message file
ForwardPath (J) Set ~/.forward search path
HelpFile (H) Specify location of the help file
HostsFile Specify alternate /etc/hosts file
QueueDirectory (Q) Location of queue directory
SafeFileEnvironment Directory for safe file writes
ServiceSwitchFile Specify file for switched services
StatusFile (S) Statistics file
UserDatabaseSpec (U) Specify user database

File locations should be expressed as full pathnames. Use of relative names will cause the location to become relative to the queue directory or, for some options, will cause the name to be interpreted as something other than a file or directory name.

The Queue

Several options combine to determine your site's policy for managing the sendmail queue (see The Queue). Among them is one that specifies the location of the queue directory and another that sets the permissions given to files in that directory. The list of all options that affect the queue is shown in Table 34.7.

Options that Affect the Queue
Option Name Description
CheckpointInterval (C) Checkpoint the queue
ForkEachJob (Y) Process queue files individually
MaxQueueRunSize Max queue messages processed
MinFreeBlocks (b) Define minimum free disk blocks
MinQueueAge Skip queue file if too young
QueueDirectory (Q) Location of queue directory
QueueFactor (q) Factor for high-load queuing
QueueLA (x) On high load queue only
QueueSortOrder How to presort the queue
QueueTimeout (T) Limit life in queue to days
RecipientFactor (y) Penalize large recipient lists
RetryFactor (Z) Increment per job priority
SuperSafe (s) Queue everything just in case
TempFileMode (F) Permissions for temporary files
Timeout.queuereturn Timeout life in queue
Timeout.queuewarn Timeout for still-in-queue warnings

Managing Aliases

In addition to knowing the location of the aliases file, some options determine how that file and its associated database files will be used. For example, there is an option that tells sendmail to automatically rebuild the database files whenever the aliases file is changed. The list of all aliases-related options is shown in Table 34.8.

Options for Managing Aliases
Option Name Description
AliasFile (A) Define the location of the aliases file
AliasWait (a) Wait for aliases file rebuild
AutoRebuildAliases (D) Autorebuild the aliases database
CheckAliases (n) Check right-hand side of aliases
ServiceSwitchFile Specify file for switched services

Controlling Machine Load

Several options control the sendmail program's behavior under high-machine-load conditions. They are intended to reduce the impact of sendmail on machines that provide other services and to help protect sendmail from overburdening a machine. The list of options that determine and help to prevent high-load conditions is shown in Table 34.9.

Options That Determine Load
Option Name Description
ClassFactor (z) Multiplier for priority increments
ConnectionRateThrottle Incoming SMTP connection rate
HoldExpensive (c) Queue for expensive mailers
MaxDaemonChildren Maximum forked children
MinQueueAge Skip queue file if too young
QueueFactor (q) Factor for high-load queuing
QueueLA (x) On high load queue only
RefuseLA (X) Refuse connections on high load

Connection Caching

V8 sendmail has connection caching to improve the performance of SMTP-transported mail. In processing the queue or delivering to a long list of recipients, keeping a few SMTP connections open (in case another message is for one of those same sites) improves the speed of transfers. Caching is most useful on busy mail hub machines but can benefit any machine that sends a great deal of network mail. Table 34.10 lists the options for how connections will be cached.

Options That Determine Connection Caching
Option Name Description
ConnectionCacheSize (k) Multiple-SMTP connections
ConnectionCacheTimeout (K) Multiple-SMTP timeouts

The sendmail program checks its connection cache just before opening up a new connection to a host. If the cache contains an entry for that host, sendmail sends an SMTP RSET command to the host to make sure the connection is still active. If the SMTP RSET succeeds, the connection is re-used. If the SMTP RSET times out (see , the Timeout.rset option), or fails, or if the host was not in the cache, an new connection is made.

Problem Solving

The sendmail program offers four options that will help in locating and solving some mail delivery problems. You are encouraged to enable the first two shown in Table 34.11. The third is of value only if you have many delivery agents (see Delivery Agents).

Options That Help with Problem Solving
Option Name Description
LogLevel (L) Set (increase) logging level
PostmasterCopy (P) Extra copies of postmaster mail (not V5 BSD)
StatusFile (S) Specify statistics fil
Verbose (v) Run in verbose mod

Other means to solve problems are described in Debugging with -d, which describes the -d debugging command-line switch, and in The Command Line, (specifically "Processing the Command Line"), which describes the -X traffic-logging command-line switch.

Other Options

The sendmail program supports a vast array of options. Take the time to study all the options (described at the end of this chapter) at least enough to get a basic feeling for what they do. Then, as you gain experience with sendmail, you'll know where to look for the particular option that will meet your needs.