Полезная информация

sendmail

sendmailSearch this book
Previous: 34.5 Option Argument TypesChapter 34
Options
Next: 34.7 Pitfalls
 

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

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

Table 34.6: File Location Options
Option NameFile
AliasFile(A)Section 34.8.1

Aliases file and its database files

ErrorHeader(E)Section 34.8.23

Set error message file

ForwardPath(J)Section 34.8.27

Set ~/.forward search path

HelpFile(H)Section 34.8.28

Specify location of the help file

HostsFileSection 34.8.30

Specify alternate /etc/hosts file

QueueDirectory(Q)Section 34.8.48

Location of queue directory

SafeFileEnvironmentSection 34.8.58

Directory for safe file writes

ServiceSwitchFileSection 34.8.61

Specify file for switched services

StatusFile(S)Section 34.8.66

Statistics file

UserDatabaseSpec(U)Section 34.8.75

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.

34.6.2 The Queue

Several options combine to determine your site's policy for managing the sendmail queue (see Chapter 23, 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.

Table 34.7: Options that Affect the Queue
Option NameDescription
CheckpointInterval(C)Section 34.8.7

Checkpoint the queue

ForkEachJob(Y)Section 34.8.26

Process queue files individually

MaxQueueRunSizeSection 34.8.38

Max queue messages processed

MinFreeBlocks(b)Section 34.8.40

Define minimum free disk blocks

MinQueueAgeSection 34.8.41

Skip queue file if too young

QueueDirectory(Q)Section 34.8.48

Location of queue directory

QueueFactor(q)Section 34.8.49

Factor for high-load queuing

QueueLA(x)Section 34.8.50

On high load queue only

QueueSortOrderSection 34.8.51

How to presort the queue

QueueTimeout(T)Section 34.8.52

Limit life in queue to days

RecipientFactor(y)Section 34.8.53

Penalize large recipient lists

RetryFactor(Z)Section 34.8.56

Increment per job priority

SuperSafe(s)Section 34.8.67

Queue everything just in case

TempFileMode(F)Section 34.8.68

Permissions for temporary files

Timeout.queuereturnSection 34.8.70.14

Timeout life in queue

Timeout.queuewarnSection 34.8.70.15

Timeout for still-in-queue warnings

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

Table 34.8: Options for Managing Aliases
Option NameDescription
AliasFile(A)Section 34.8.1

Define the location of the aliases file

AliasWait(a)Section 34.8.2

Wait for aliases file rebuild

AutoRebuildAliases(D)Section 34.8.4

Autorebuild the aliases database

CheckAliases(n)Section 34.8.6

Check right-hand side of aliases

ServiceSwitchFileSection 34.8.61

Specify file for switched services

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

Table 34.9: Options That Determine Load
Option NameDescription
ClassFactor(z)Section 34.8.8

Multiplier for priority increments

ConnectionRateThrottleSection 34.8.12

Incoming SMTP connection rate

HoldExpensive(c)Section 34.8.29

Queue for expensive mailers

MaxDaemonChildrenSection 34.8.35

Maximum forked children

MinQueueAgeSection 34.8.41

Skip queue file if too young

QueueFactor(q)Section 34.8.49

Factor for high-load queuing

QueueLA(x)Section 34.8.50

On high load queue only

RefuseLA(X)Section 34.8.54

Refuse connections on high load

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

Table 34.10: Options That Determine Connection Caching
Option NameDescription
ConnectionCacheSize(k)Section 34.8.10Multiple-SMTP connections
ConnectionCacheTimeout(K)Section 34.8.11Multiple-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 Section 34.8.70.18, the Timeout.rset option), or fails, or if the host was not in the cache, an new connection is made.

34.6.6 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 Chapter 30, Delivery Agents).

Table 34.11: Options That Help with Problem Solving
Option NameDescription
LogLevel(L)Section 34.8.33

Set (increase) logging level

PostmasterCopy(P)Section 34.8.46

Extra copies of postmaster mail (not V5 BSD)

StatusFile(S)Section 34.8.66

Specify statistics fil

Verbose(v)Section 34.8.76

Run in verbose mod

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

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


Previous: 34.5 Option Argument TypessendmailNext: 34.7 Pitfalls
34.5 Option Argument TypesBook Index34.7 Pitfalls