home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


sendmail Desktop Reference

sendmail Desktop ReferenceSearch this book
Previous: 1.5 Hints Chapter 2 Next: 2.2 Delivery Agent Equates
 

2. The sendmail.cf File

The sendmail configuration file, usually called sendmail.cf , provides all the central information that controls the sendmail program's behavior. It lists the location of all the other files sendmail needs to access and the location of all the directories in which sendmail needs to create and remove files. It sets the definitions sendmail uses when rewriting addresses. It defines the rules and sets of rules sendmail uses for transforming mail addresses (and aliases for those addresses) into usable information, such as which delivery agent to use and the correct form of the address to use with that delivery agent.

2.1 Overview

Each line in the configuration files begins with a key character that defines the function of that line. Any character other than those shown here is an error.

#

Begins a comment line (the entire line is ignored).

tab

Continues the previous line.

space

Continues the previous line.

C w localhost

Adds localhost to class w (see §32.5.8).

C {GuestDomains} guest.com visit.com

Adds guest.com and visit.com to the multi-character class named {GuestDomains} (see §32.1.1).

D m our.domain

Defines macro m with the value our.domain (see §31.10.24).

D {OurOldDomain} old.domain

Defines multi-character macro name {OurOldDomain} with the value old.domain (see §31.3).

E HOME = /u/mail

Assigns value /u/mail to the environmental variable HOME . (Such assignments are only available to delivery agents that sendmail executes.) (See 22.2.1.)

E USER

Imports the value of USER from the environment and makes it available to delivery agents.

F w /etc/sendmail.cw

Fills the class w with values read from the /etc/sendmail.cw file (see §19.6.26).

F k | /usr/sbin/showuu

Runs the program /usr/sbin/showuu and fills the class k with values printed by that program. (see §32.5.2).

H Date: $a

Defines the Date: header with the value $a (see §35.10.10).

H ?P?Return-Path: <$g>

Defines the Return-Path: header with the value <$g> . This header will only be output if the P in ?P? appears in the delivery agent's F= equate (see §35.4).

K uid text -z: -k2 -v0 /etc/passwd

Declares a database named uid to be of class text , which will look up keys in the flat file named /etc/passwd (see §33.8.18). The -z: , -k2 , and -v0 say that /etc/passwd has colon-delimited fields, that the key will be in the index 2 field, and the value in the index 0 field, thus converting uid values to login names, see §33.3.4.12).

M name , equate = value, ...

Declares a mail delivery agent. The name is the symbolic name for this agent. The items in the equate list are described in the next section, "Delivery Agent Equates."

O MaxQueueRunSize= 100

Gives the option MaxQueueRunSize the value 100 (see §34.8.38). Note that there must be a space between the O and the option name. Options are summarized later in this chapter.

O J/var/forward/$u:$z/.forward

Uses the old single-character name J to define the ForwardPath option (see §34.8.27).

P bulk= -60

Associates the symbolic name bulk with a delivery priority of -60 . These symbolic names are compared to the Precedence: header (if one) during delivery, and used to begin a message's priority in the queue (see §35.8).

R LHS tabs RHS [ tabs COMMENT ]

Defines a rewriting rule (do-while clause) where the RHS rewrites an address while the LHS comparison evaluates to true. The LHS and RHS must be separated by one or more tab characters. Optional tabs and a COMMENT may follow and are not part of the rewriting rule (see §28.1).

S name [ = val ]

Declares a rule-set start to have the name name (where name is either a number or is symbolic text). When name is symbolic, an optional numeric value val may be assigned to it (see §29.1).

T bob jane

Declares that the users bob and jane are "trusted" and may use the -f command-line switch to precondition the sender identity. Users who are not trusted and who use the -f switch cause a warning to be included in the outgoing mail headers (see §22.8.1).

V 7/Berkeley

Specifies the version of the configuration file to be 7 . An optional slash and a vendor identifier may follow, as /Berkeley (see §27.5).