start page | rating of books | rating of authors | reviews | copyrights

sendmail

sendmailSearch this book
Previous: 12.3 Things to Try Chapter 13 Next: 13.2 Required Options
 

13. Setting Options

Contents:
Options: An Overview
Required Options
Testing the Options
Sending Mail
Things to Try

The client.cf file is now roughed out enough that it can almost be used to send mail. All that remains are two important loose ends: options, which we cover in this chapter, and headers, which we cover in the next.

Options determine much of the behavior of sendmail . For example, they can specify the location of the queue directory, set the default permissions for files, and list the characters that separate tokens in an address. These and other options will be discussed in this chapter.

13.1 Options: An Overview

Options are declared in the configuration file by beginning a line with the letter O :

OQ/var/spool/mqueue                     
<- single-character name (prior to V8.7)

Prior to V8.7 sendmail , option names could only be a single character. The short (single character) name of the option (here Q ) immediately follows the O with no intervening space. The value assigned to a single-character option immediately follows the option letter with no intervening space.

Beginning with V8.7 sendmail , option names may consist of multiple characters:

O QueueDirectory=/var/spool/mqueue      
<- multicharacter name (beginning with V8.7)
  
-^
  
exactly one space

To use multicharacter names, you must separate the name (here QueueDirectory ) from the O command with exactly one space character. [1] The value assigned to the multicharacter option follows an equal sign. The equal sign can be surrounded by optional spaces.

[1] If the short option name is a space, sendmail presumes that the option name will be multicharacter.

Some options have both a single-character name and a multicharacter name, in which case the two names are equivalent:

OQ/var/spool/mqueue                     
<- define location of queue directory
 O QueueDirectory=/var/spool/mqueue      
<- the same

Other options (the newer ones) only have multicharacter names:

O ServiceSwitchFile=/etc/service.switch       
<- only multicharacter form available

When we mention such options in the text, we will specify the multicharacter name first, followed by the single-character name in parentheses if there is one; for example, the QueueDirectory ( Q ) option, but the ServiceSwitchFile option.

The values for some options are strings (such as /tmp ), while the values for others can be numbers (such as 3 ), time durations (such as 3d for three days), or a Boolean value (such as True ). There are no hard rules for which type of value goes with which option. Instead, you'll need to look up each option in Chapter 34, Options , and use the type indicated there.


Previous: 12.3 Things to Try sendmail Next: 13.2 Required Options
12.3 Things to Try Book Index 13.2 Required Options