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


sendmail

sendmailSearch this book
Previous: 13.2 Required Options Chapter 13
Setting Options
Next: 13.4 Sending Mail
 

13.3 Testing the Options

Now that the necessary options have been described, add them to the client.cf file. As the name "option" implies, the values that you give them are somewhat optional. You are free to change timeouts and the like to values that you consider more appropriate:

V7
# Defined macros
D{REMOTE}mailhost              # The name of the mail hub
D{HUB}mail.us.edu              # Hub as known to the outside world

Cw localhost                   # My other names.
Fw -o /etc/sendmail.cw         # An optional file of other names



# Options                                                                  


<- new



O QueueDirectory=/tmp       # BEWARE: use /var/spool/mqueue upon release   


<- new



O Timeout.queuewarn=4h                                                     


<- new



O Timeout.queuereturn=5d                                                   


<- new



O DeliveryMode=background                                                  


<- new



O TempFileMode=0600                                                        


<- new



O DefaultUser=1:1                                                          


<- new



O LogLevel=9                                                               


<- new



O OldStyleHeaders=True                                                     


<- new



O BlankSub=.                # Replace unquoted spaces                      


<- new

Take a moment to test these new option declarations. Run sendmail in rule-testing mode with the -d37.1 switch. This will cause each option to be printed as it is found in the client.cf file:

% 

./sendmail -d37.1 -Cclient.cf -bt < /dev/null


setoption QueueDirectory (Q).=/tmp (unsafe)
setoption Timeout (r).queuewarn=4h
setoption Timeout (r).queuereturn=5d
setoption DeliveryMode (d).=background
setoption TempFileMode (F).=0600 (unsafe)
setoption DefaultUser (u).=1:1 (unsafe)
setoption LogLevel (L).=9
setoption OldStyleHeaders (o).=True
setoption BlankSub (B).=. (unsafe)

Notice that the options that used to have single-character names ( Q instead of QueueDirectory ) are printed showing both the new multicharacter name and the single-character name in parentheses.

Second, note that some of the lines end with (unsafe ). This is sendmail telling you that it cannot run as root . Whenever you do something unsafe (such as using your own configuration file with the -C switch), sendmail stops being root and becomes you. It prints (unsafe) for each option you specify that only root should be able to use.