Configuration files are contained in the subdirectory "cf"
,
with a suffix ".mc"
. They must be run through "m4"
to produce a ".cf"
file. You must pre-load
"cf.m4"
:
m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
where ${CFDIR}
is the root of the cf directory and
config.mc
is the name of your configuration file. If you are
running a version of M4 that understands the __file__
builtin
(versions of GNU m4 >= 0.75 do this, but the versions distributed with
4.4BSD and derivatives do not) or the -I flag (ditto), then
${CFDIR}
can be in an arbitrary directory. For "traditional"
versions, ${CFDIR}
***MUST*** be
".."
, or you MUST use
-D_CF_DIR_=/path/to/cf/dir/
-- note the trailing slash! For
example:
m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf
Let's examine a typical .mc file:
divert(-1) # # Copyright (c) 1983 Eric P. Allman # Copyright (c) 1988, 1993 # The Regents of the University of California. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # 3. All advertising materials mentioning features or use of this # software # must display the following acknowledgement: # This product includes software developed by the University of # California, Berkeley and its contributors. # 4. Neither the name of the University nor the names of its # contributors may be used to endorse or promote products derived # from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # # # This is a Berkeley-specific configuration file for HP-UX 9.x. # It applies only to the Computer Science Division at Berkeley, # and should not be used elsewhere. It is provided on the sendmail # distribution as a sample only. To create your own configuration # file, create an appropriate domain file in ../domain, change the # `DOMAIN' macro below to reference that file, and copy the result # to a name of your own choosing. # divert(0)
The divert(-1)
will delete the crud in the resulting output
file. The copyright notice can be replaced by whatever your lawyers require;
our lawyers require the one that I've included in my files. A copyleft
is a copyright by another name. The divert(0)
restores regular
output.
VERSIONID(`<SCCS or RCS version id>')
VERSIONID
is a macro that stuffs the version information into
the resulting file. We use SCCS; you could use RCS, something else, or
omit it completely. This is not the same as the version id included
in SMTP greeting messages -- this is defined in m4/version.m4
.
OSTYPE(hpux9)dnl
You must specify an OSTYPE
to
properly configure things such as the pathname of the help and status files,
the flags needed for the local mailer, and other important things. If you
omit it, you will get an error when you try to build the configuration. Look
at the ostype directory for the list of known operating system types.
DOMAIN(CS.Berkeley.EDU)dnl
This example is specific to the Computer Science Division at Berkeley. You
can use "DOMAIN(generic)"
to get a
sufficiently bland definition that may well work for you, or you can create a
customized domain definition appropriate for your environment.
MAILER(local) MAILER(smtp)
These describe the mailers used at the default
CS site site. The local mailer is always included automatically.
Beware: MAILER
declarations should always be at
the end of the configuration file, and MAILER(smtp)
should always precede
MAILER(uucp)
. The general rules
are that the order should be:
VERSIONID OSTYPE DOMAIN FEATURE local macro definitions MAILER LOCAL_RULESET_*