|
Configuring Sendmail
The sendmail configuration file (sendmail.cf) controls how your server
sends and receives e-mail. It uses options, rules, and other
directives to modify the behavior of the sendmail program. Because of the sendmail configuration
file's complexity, many have shied away from modifying the default sendmail configuration.
Creating and customizing a configuration file is much easier if you use the m4 macro preprocessor. The m4 preprocessor
reads directives from a file whose name ends with .mc (for "macro configuration") and generates a sendmail
configuration file in a file whose name ends with .cf. When you rename the file to sendmail.cf and store it
in your server's ~/etc directory, it becomes your sendmail configuration file.
Installation
We have created an easy program to install the sendmail configuration utilities, including m4 macros for generating
sendmail configuration files on your virtual server. Simply run the following command from your
virtual server shell prompt.
% vinstall sendmail
The installation script installs the macros and sendmail configuration tools in the directory
~/usr/local/sendmail and its subdirectories. It does not change your existing sendmail configuration file or
setup in any way! The m4 macros include slight modifications for the virtual server environment.
Some sample .mc files (and corresponding .cf files) are installed into the directory ~/usr/local/sendmail/cf/cf.
They illustrate how to control spam with the access.db and by querying the mail-abuse.org online anti-spam databases.
Documentation
A sizable README file documents many additional features, and gives numerous examples. The README file
is located at ~/usr/local/sendmail/cf/README.
Chapter 19 of the second edition of the book Sendmail by Bryan Costales and Eric Allman (Sebastopol, CA:
O'Reilly, 1997) describes the procedure for generating configuration files with the m4 macro preprocessor.
Additional information is also available online:
Additional Reading
|