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


sendmail

sendmailSearch this book
Previous: 15.5 Prevent the Daemon from Running Chapter 15
Install and Test the client.cf File
Next: 15.7 Things to Try
 

15.6 Install the client.cf File

At last! All the pieces are in place, and you can install the client.cf file as the official system configuration file.

As we explained when we began developing the client.cf file, you should not type it in yourself. The pieces that we developed were strictly instructional and should not be used as is. Instead, you should bear with us for the rest of the tutorial chapters. In the next chapter you are shown how to generate a full-fledged configuration file. If you have been typing in client.cf all along, you can use it here. If you waited, you should skip to the next chapter, then return here.

Just to be safe, once you have obtained, tuned, and tested a client.cf file, make a backup copy of the system configuration file:

# 

cp /etc/sendmail.cf /etc/sendmail.cf.orig

The # prompt indicates that you are doing this as root . Next, overwrite the system configuration file with the new client.cf file:

# 

cp ./client.cf /etc/sendmail.cf

Now that the client.cf file is in place as your system configuration file, you need to kill and restart the sendmail daemon. Review Section 4.1.1, "Daemon Mode (-bd)" if you have forgotten how to do this. Remember, when you restart it, that you are now starting it in queue-processing mode as shown in the previous section. Here is how we kill and restart sendmail for version 8.7:

# 

kill -HUP `head -1 /etc/sendmail.pid`

That's all there is to it. From now on, any mail that is sent from your machine will result in sendmail using your configuration file in place of the original.

Once again, it is important to test your configuration file. Send mail to yourself and others using your favorite MUA. Examine the results (especially the header information), and ask others to do so too. If anything is amiss, first try to fix the new configuration file. If that fails, put the saved original back as the system configuration file until you can solve the problem.

Some problems will doubtless require expertise beyond that provided in this tutorial. For those, you will need to take on the reference chapters. This will be even more necessary if you are managing a hub machine or if you want mail delivered locally.


Previous: 15.5 Prevent the Daemon from Running sendmail Next: 15.7 Things to Try
15.5 Prevent the Daemon from Running Book Index 15.7 Things to Try