sendmail Desktop Reference

sendmail Desktop ReferenceSearch this book
Previous: 3.10 HintsChapter 4Next: 4.2 FEATURE Declarations

4. Configuring with m4

Special Local Parameters
FEATURE Declarations
MAILER Declarations
Virtual User Tables
Mailer Tables

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

m4  ../m4/cf.m4 >

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

m4 -D_CF_DIR_=path/ path/m4/cf.m4 >

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

                      <- 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:


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.


Causes support to be included from one of the files in the cf/ostype directory.


This sets defaults for your operating system from the file cf/ostype/os.m4 (as for example, sunos4.1.m4). If you want to change any of the defaults that come with your operating system's file, do so after declaring OSTYPE. (See §19.3.1).


Collects together local paramater declarations for an (optional) administrative domain:


Here, domain is the name of a file in the cf/domain directory. With the exception of the file called generic, you should create your own domain file (see §19.3.3).

local parameter declarations

Are (mostly) named confNAME, and most all cases are declared using the define directive:

define(`parameter_name', `value')

the parameter_names define options and macros (see Chapter 2, The File). In some cases local parameters are declared using special macros; see the next section.


Supplies simple solutions to special needs. The FEATURE directive is described below.


Causes support for delivery agents to be included. It must follow local parameter declarations because some of them change how a MAILER directive will be interpreted. MAILER is detailed following the features.

local rule set declarations

Allow you to easily add rules and rule sets to your configuration file. Each definition stands on a line by itself, and the lines following each are included in the appropriate place in the configuration file. For example: LOCAL_CONFIG to add general declarations (e.g., K configuration databases) that should go at the top of the configuration file (see §19.6.30); LOCAL_RULE_0 to add rules to rule set 0 (see §19.6.32); LOCAL_RULE_1 to add rules to rule set 1 (see §19.6.33); LOCAL_RULE_2 to add rules to rule set 2 (see §19.6.34); LOCAL_RULE_3 to add rules to rule set 3 (see §19.6.35); and LOCAL_RULESETS to declare entirely new rule sets, such as check_relay (see §19.6.36). Also select from: LOCAL_NET_CONFIG (used in conjunction with LOCAL_RELAY) to add rules that tell what addresses should not be forwarded to the relay (see §19.6.37); and MAILER_DEFINITIONS to define new delivery agents and the rule sets associated with them (see §19.6.40).

4.1 Special Local Parameters

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


(Used with MASQUERADE_AS) tells what users should not be masqueraded (see §19.6.4).


Lists the names of domains that will be looked up with the genericstable feature. Declare one domain per line. There may be several such lines.


Specifies the file that contains the domains that will be looked up with the generic\%stable feature.


Causes all outgoing addresses to be rewritten as though they came from the indicated domain (see §19.6.42).


Specifies additional domains that will be translated into the MASQUERADE_AS domain. See also the limited_masquerade feature (see §19.6.43).


Specifies the name of the file that contains a list of domains that will be masqueraded (see §19.6.44).

Previous: 3.10 Hintssendmail Desktop ReferenceNext: 4.2 FEATURE Declarations
3.10 Hints 4.2 FEATURE Declarations