Configuring with m4

Contents:
Special Local Parameters
FEATURE Declarations
MAILER Declarations
Virtual User Tables
Mailer Tables
Hints

A configuration file is generated from an m4 source file (e.g., one named our.mc) in the cf/cf sendmail source tree like this:

m4 ../m4/cf.m4 our.mc > sendmail.cf

To use a directory other than ../m4, use:

m4 -D_CF_DIR_=path/ path/m4/cf.m4 our.mc > sendmail.cf

Here, path is the full path to the m4/cf.m4 file. The our.mc source may contain the following lines (in this order):

OSTYPE(os) DOMAIN(domain) <-declare local parameters using  define here FEATURE(feature) <-can be several MAILER(agent) <-can be several <-local rule set declarations here

Thus, a minimal file would declare the operating system and local delivery agent support with two lines like this:

OSTYPE(os) MAILER(local)

In some cases you may see lines terminated with dnl, which means "delete to new line." Its use prevents extra blank lines from appearing in the output. It is almost never required. For more details about the m4 technique in general, see §19.2.

Special Local Parameters

These lines should go in the DOMAIN file or before FEATURE declarations (because they precondition certain features).