xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 69540)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*69540Seric		@(#)README	8.57 (Berkeley) 05/18/95
851220Seric
951220Seric
1057246SericThis document describes the sendmail configuration files being used
1167469Sericat Berkeley.  These use features in the new (R8) sendmail; they will
1267469Sericnot work on other versions.
1351220Seric
1457246SericThese configuration files are probably not as general as previous
1565957Sericversions, and don't handle as many of the weird cases automagically.
1657246SericI was able to simplify by them for two reasons.  First, the network
1757246Serichas become more consistent -- for example, at this point, everyone
1857246Sericon the internet is supposed to be running a name server, so hacks to
1957246Serichandle NIC-registered hosts can go away.  Second, I assumed that a
2057246Sericsubdomain would be running SMTP internally -- UUCP is presumed to be
2157246Serica long-haul protocol.  I realize that this is not universal, but it
2257246Sericdoes describe the vast majority of sites with which I am familiar,
2357246Sericincluding those outside the US.
2451220Seric
2565957SericOf course, the downside of this is that if you do live in a weird
2665957Sericworld, things are going to get weirder for you.  I'm sorry about that,
2757246Sericbut at the time we at Berkeley had a problem, and it seemed like the
2857246Sericright thing to do.
2951220Seric
3057247SericThis package requires a post-V7 version of m4; if you are running the
3157247Seric4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with
3257247Serica newer version.  You can m4-expand on their system, then run locally.
3365002SericSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
3465002Sericalso works.  Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't
3565002Sericwork -- you'll have to use a Net/2 or GNU version.
3651220Seric
3758284SericIF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
3864371Seric"m4 foo.mc > foo.cf" -- that should be all you need.  There is also
3964371Serica fairly crude (but functional) Makefile.dist that works on the
4064371Sericold version of make.
4158284Seric
4258284SericTo get started, you may want to look at tcpproto.mc (for TCP-only
4364324Sericsites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for
4464324Sericclusters of clients using a single mail host).  Others are versions
4558284Sericthat we use at Berkeley, although not all are in current use.  For
4658284Sericexample, ucbarpa has gone away, but I've left ucbarpa.mc in because
4758284Sericit demonstrates some interesting techniques.
4858284Seric
4957246SericI'm not pretending that this README describes everything that these
5057246Sericconfiguration files can do; clever people can probably tweak them
5157246Sericto great effect.  But it should get you started.
5257246Seric
5365509Seric*******************************************************************
5465509Seric***  BE SURE YOU CUSTOMIZE THESE FILES!  They have some		***
5565509Seric***  Berkeley-specific assumptions built in, such as the name	***
5665509Seric***  of our UUCP-relay.  You'll want to create your own domain	***
5765509Seric***  description, and use that in place of domain/Berkeley.m4.	***
5865509Seric*******************************************************************
5958087Seric
6065509Seric
6157246Seric+--------------------------+
6257246Seric| INTRODUCTION AND EXAMPLE |
6357246Seric+--------------------------+
6457246Seric
6557246SericConfiguration files are contained in the subdirectory "cf", with a
6657246Sericsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
6757246Seric
6868845SericLet's examine a typical .mc file (cf/cs-hpux9.mc):
6951220Seric
7051220Seric	divert(-1)
7151220Seric	#
7251220Seric	# Copyright (c) 1983 Eric P. Allman
7368845Seric	# Copyright (c) 1988, 1993
7468845Seric	#	The Regents of the University of California.  All rights reserved.
7551220Seric	#
7668845Seric	# Redistribution and use in source and binary forms, with or without
7768845Seric	# modification, are permitted provided that the following conditions
7868845Seric	# are met:
7968845Seric	# 1. Redistributions of source code must retain the above copyright
8068845Seric	#    notice, this list of conditions and the following disclaimer.
8168845Seric	# 2. Redistributions in binary form must reproduce the above copyright
8268845Seric	#    notice, this list of conditions and the following disclaimer in
8368845Seric	#    the documentation and/or other materials provided with the
8468845Seric	#    distribution.
8568845Seric	# 3. All advertising materials mentioning features or use of this
8668845Seric	#    software #    must display the following acknowledgement:
8768845Seric	#	This product includes software developed by the University of
8868845Seric	#	California, Berkeley and its contributors.
8968845Seric	# 4. Neither the name of the University nor the names of its
9068845Seric	#    contributors may be used to endorse or promote products derived
9168845Seric	#    from this software without specific prior written permission.
9251220Seric	#
9368845Seric	# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
9468845Seric	# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
9568845Seric	# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9668845Seric	# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
9768845Seric	# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
9868845Seric	# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
9968845Seric	# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
10068845Seric	# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
10168845Seric	# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
10268845Seric	# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
10368845Seric	# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10468845Seric	#
10551220Seric
10668845Seric	#
10768845Seric	#  This is a Berkeley-specific configuration file for HP-UX 9.x.
10868845Seric	#  It applies only the the Computer Science Division at Berkeley,
10968845Seric	#  and should not be used elsewhere.   It is provided on the sendmail
11068845Seric	#  distribution as a sample only.  To create your own configuration
11168845Seric	#  file, create an appropriate domain file in ../domain, change the
11268845Seric	#  `DOMAIN' macro below to reference that file, and copy the result
11368845Seric	#  to a name of your own choosing.
11468845Seric	#
11568845Seric
11657246SericThe divert(-1) will delete the crud in the resulting output file.
11768845SericThe copyright notice can be replace by whatever your lawyers require;
11868845Sericour lawyers require the one that I've included in my files.  A copyleft
11968845Sericis a copyright by another name.
12051220Seric
12157246SericThe next line MUST be
12257246Seric
12351220Seric	include(`../m4/cf.m4')
12451220Seric
12557246SericThis will pull in the M4 macros you will need to make sense of
12657246Sericeverything else.  As the saying goes, don't think about it, just
12757246Sericdo it.  If you don't do it, don't bother reading the rest of this
12857246Sericfile.
12951220Seric
13056778Seric	VERSIONID(`<SCCS or RCS version id>')
13151220Seric
13251220SericVERSIONID is a macro that stuffs the version information into the
13351220Sericresulting file.  We use SCCS; you could use RCS, something else, or
13457246Sericomit it completely.  This is not the same as the version id included
13557246Sericin SMTP greeting messages -- this is defined in m4/version.m4.
13651220Seric
13768845Seric	OSTYPE(hpux9)dnl
13851220Seric
13968845SericYou must specify an OSTYPE to properly configure things such as the
14068845Sericpathname of the help and status files, the flags needed for the local
14168845Sericmailer, and other important things.  If you omit it, you will get an
14268845Sericerror when you try to build the configuration.  Look at the ostype
14368845Sericdirectory for the list of known operating system types.
14451220Seric
14568845Seric	DOMAIN(CS.Berkeley.EDU)dnl
14668845Seric
14768845SericThis example is specific to the Computer Science Division at Berkeley.
14868845SericYou can use "DOMAIN(generic)" to get a sufficiently bland definition
14968845Sericthat may well work for you, or you can create a customized domain
15068845Sericdefinition appropriate for your environment.
15168845Seric
15268845Seric	MAILER(local)
15351268Seric	MAILER(smtp)
15451220Seric
15551309SericThese describe the mailers used at the default CS site site.  The
15651309Sericlocal mailer is always included automatically.
15751220Seric
15858087Seric
15957246Seric+--------+
16057246Seric| OSTYPE |
16157246Seric+--------+
16257246Seric
16368845SericYou MUST define an operating system environment, or the configuration
16468845Sericfile build will puke.  There are several environments available; look
16568845Sericat the "ostype" directory for the current list.  This macro changes
16668845Sericthings like the location of the alias file and queue directory.  Some
16768845Sericof these files are identical to one another.
16851220Seric
16968845SericOperating system definitions are usually easy to write.  They may define
17068845Sericthe following variables (everything defaults, so an ostype file may be
17168845Sericempty).  Unfortunately, the list of configuration-supported systems is
17268845Sericnot as broad as the list of source-supported systems, since many of
17368845Sericthe source contributors do not include corresponding ostype files.
17451220Seric
17557246SericALIAS_FILE		[/etc/aliases] The location of the text version
17659761Seric			of the alias file(s).  It can be a comma-separated
17766790Seric			list of names (but be sure you quote values with
17868452Seric			commas in them -- for example, use
17966790Seric				define(`ALIAS_FILE', `a,b')
18066790Seric			to get "a" and "b" both listed as alias files;
18166790Seric			otherwise the define() primitive only sees "a").
18257246SericHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
18357246Seric			containing information printed in response to
18457246Seric			the SMTP HELP command.
18557246SericQUEUE_DIR		[/var/spool/mqueue] The directory containing
18657246Seric			queue files.
18757246SericSTATUS_FILE		[/etc/sendmail.st] The file containing status
18857246Seric			information.
18958087SericLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
19064153SericLOCAL_MAILER_FLAGS	[rmn] The flags used by the local mailer.  The
19164153Seric			flags lsDFM are always included.
19263761SericLOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
19363761Seric			mail.
19468340SericLOCAL_MAILER_MAX	[undefined] If defined, the maximum size of local
19568340Seric			mail that you are willing to accept.
19668891SericLOCAL_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
19768891Seric			that ARRIVE from an address that resolves to the
19868891Seric			local mailer and which are converted to MIME will be
19968891Seric			labelled with this character set.
20058087SericLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
20163791SericLOCAL_SHELL_FLAGS	[eu] The flags used by the shell mailer.  The
20263791Seric			flags lsDFM are always included.
20363791SericLOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
20463791Seric			mail.
20567989SericLOCAL_SHELL_DIR		[$z:/] The directory search path in which the
20667989Seric			shell should run.
20758087SericUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
20858087Seric			used to submit news.
20958087SericUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
21058087SericUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
21158087Seric			usenet mailer.
21265911SericUSENET_MAILER_MAX	[100000] The maximum size of messages that will
21365911Seric			be accepted by the usenet mailer.
21463857SericSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
21567915Seric			flags are `mDFMUX' for all SMTP-based mailers; the
21667915Seric			"esmtp" mailer adds `a' and "smtp8" adds `8'.
21765911SericSMTP_MAILER_MAX		[undefined] The maximum size of messages that will
21867915Seric			be transported using the smtp, smtp8, or esmtp
21967915Seric			mailers.
22067915SericSMTP_MAILER_ARGS	[IPC $h] The arguments passed to the smtp mailer.
22167915Seric			About the only reason you would want to change this
22267915Seric			would be to change the default port.
22367915SericESMTP_MAILER_ARGS	[IPC $h] The arguments passed to the esmtp mailer.
22467915SericSMTP8_MAILER_ARGS	[IPC $h] The arguments passed to the smtp8 mailer.
22567915SericRELAY_MAILER_ARGS	[IPC $h] The arguments passed to the relay mailer.
22668891SericSMTP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
22768891Seric			that ARRIVE from an address that resolves to one of
22868891Seric			the SMTP mailers and which are converted to MIME will
22968891Seric			be labelled with this character set.
23063857SericUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
23168694Seric			flags are `DFMhuU' (and `m' for uucp-new mailer,
23268694Seric			minus `U' for uucp-dom mailer).
23368057SericUUCP_MAILER_ARGS	[uux - -r -z -a$g -gC $h!rmail ($u)] The arguments
23463761Seric			passed to the UUCP mailer.
23568891SericUUCP_MAILER_MAX		[100000] The maximum size message accepted for
23663791Seric			transmission by the UUCP mailers.
23768891SericUUCP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
23868891Seric			that ARRIVE from an address that resolves to one of
23968891Seric			the UUCP mailers and which are converted to MIME will
24068891Seric			be labelled with this character set.
24165911SericFAX_MAILER_PATH		[/usr/local/lib/fax/mailfax] The program used to
24265911Seric			submit FAX messages.
24365911SericFAX_MAILER_MAX		[100000] The maximum size message accepted for
24465911Seric			transmission by FAX.
24567934SericPOP_MAILER_PATH		[/usr/lib/mh/spop] The pathname of the POP mailer.
24667934SericPOP_MAILER_FLAGS	[Penu] Flags added to POP mailer.  Flags "lsDFM"
24767934Seric			are always added.
24867934SericPOP_MAILER_ARGS		[pop $u] The arguments passed to the POP mailer.
24967942SericPROCMAIL_MAILER_FLAGS	[Shu] Flags added to Procmail mailer.  Flags
25067942Seric			``DFMmn'' are always set.
25167942SericPROCMAIL_MAILER_ARGS	[procmail -m $h $f $u] The arguments passed to
25267942Seric			the Procmail mailer.
25368340SericPROCMAIL_MAILER_MAX	[undefined] If set, the maximum size message that
25468340Seric			will be accepted by the procmail mailer.
25557246Seric
25657246Seric+---------+
25757246Seric| DOMAINS |
25857246Seric+---------+
25957246Seric
26057246SericYou will probably want to collect domain-dependent defines into one
26157246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
26257246Sericdomain file includes definitions for several internal distinguished
26357246Serichosts:
26457246Seric
26557246SericUUCP_RELAY	The host that will forward UUCP-addressed email.
26657246Seric		If not defined, all UUCP sites must be directly
26764028Seric		connected.
26857246SericBITNET_RELAY	The host that will forward BITNET-addressed email.
26957246Seric		If not defined, the .BITNET pseudo-domain won't work.
27068697SericLOCAL_RELAY	DEPRECATED.  The site that will handle unqualified
27168697Seric		names -- that is, names with out an @domain extension.
27268697Seric		If not set, they are assumed to belong on this machine.
27368697Seric		This allows you to have a central site to store a
27457246Seric		company- or department-wide alias database.  This
27568697Seric		only works at small sites, and only with some user
27668697Seric		agents.
27767915SericLUSER_RELAY	The site that will handle lusers -- that is, apparently
27867915Seric		local names that aren't local accounts or aliases.
27957246Seric
28067915SericAny of these can be either ``mailer:hostname'' (in which case the
28168694Sericmailer is the internal mailer name, such as ``uucp-new'' and the hostname
28264028Sericis the name of the host as appropriate for that mailer) or just a
28364028Seric``hostname'', in which case a default mailer type (usually ``relay'',
28464153Serica variant on SMTP) is used.  WARNING: if you have a wildcard MX
28564153Sericrecord matching your domain, you probably want to define these to
28664153Serichave a trailing dot so that you won't get the mail diverted back
28764153Sericto yourself.
28864028Seric
28957246SericThe domain file can also be used to define a domain name, if needed
29057982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
29157982Sericat your site masquerade behind one email name, you could also use
29257982SericMASQUERADE_AS here.
29357246Seric
29458408SericYou do not have to define a domain -- in particular, if you are a
29558408Sericsingle machine sitting off somewhere, it is probably more work than
29658408Sericit's worth.  This is just a mechanism for combining "domain dependent
29758408Sericknowledge" into one place.
29858408Seric
29957246Seric+---------+
30057246Seric| MAILERS |
30157246Seric+---------+
30257246Seric
30351220SericThere are fewer mailers supported in this version than the previous
30451220Sericversion, owing mostly to a simpler world.
30551220Seric
30651220Sericlocal		The local and prog mailers.  You will almost always
30751220Seric		need these; the only exception is if you relay ALL
30857247Seric		your mail to another site.  This mailer is included
30957247Seric		automatically.
31051220Seric
31151220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
31251220Seric		not hide hosts behind a gateway or another other
31351220Seric		such hack; it assumes a world where everyone is
31463761Seric		running the name server.  This file actually defines
31567915Seric		four mailers: "smtp" for regular (old-style) SMTP to
31663761Seric		other servers, "esmtp" for extended SMTP to other
31767915Seric		servers, "smtp8" to do SMTP to other servers without
31867915Seric		converting 8-bit data to MIME (essentially, this is
31967915Seric		your statement that you know the other end is 8-bit
32067915Seric		clean even if it doesn't say so), and "relay" for
32167915Seric		transmission to our RELAY_HOST, LUSER_RELAY, or
32267915Seric		MAILER_HUB.
32351220Seric
32451220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
32567471Seric		defines two mailers, "uucp-old" (a.k.a. "uucp") and
32667471Seric		"uucp-new" (a.k.a. "suucp").  The latter is for when you
32767471Seric		know that the UUCP mailer at the other end can handle
32867471Seric		multiple recipients in one transfer.  If the smtp mailer
32967471Seric		is also included in your configuration, two other mailers
33068694Seric		("uucp-dom" and "uucp-uudom") are also defined [warning:
33168694Seric		you MUST specify MAILER(smtp) before MAILER(uucp)].  When you
33267471Seric		include the uucp mailer, sendmail looks for all names in
33365218Seric		the $=U class and sends them to the uucp-old mailer; all
33465218Seric		names in the $=Y class are sent to uucp-new; and all
33565218Seric		names in the $=Z class are sent to uucp-uudom.  Note that
33657246Seric		this is a function of what version of rmail runs on
33757246Seric		the receiving end, and hence may be out of your control.
33865218Seric		See the section below describing UUCP mailers in more
33965218Seric		detail.
34051220Seric
34158087Sericusenet		Usenet (network news) delivery.  If this is specified,
34258087Seric		an extra rule is added to ruleset 0 that forwards all
34358087Seric		local email for users named ``group.usenet'' to the
34458087Seric		``inews'' program.  Note that this works for all groups,
34558087Seric		and may be considered a security problem.
34658087Seric
34758363Sericfax		Facsimile transmission.  This is experimental and based
34858363Seric		on Sam Leffler's FlexFAX software.  For more information,
34958363Seric		see below.
35058087Seric
35165148Sericpop		Post Office Protocol.
35258363Seric
35367942Sericprocmail	An interface to procmail (does not come with sendmail).
35467942Seric		This is designed to be used in mailertables.  For example,
35567942Seric		a common question is "how do I forward all mail for a given
35667942Seric		domain to a single person?".  If you have this mailer
35767942Seric		defined, you could set up a mailertable reading:
35867942Seric
35967942Seric			host.com	procmail:/etc/procmailrcs/host.com
36067942Seric
36167942Seric		with the file /etc/procmailrcs/host.com reading:
36267942Seric
36367942Seric			:0	# forward mail for host.com
36467942Seric			! -oi -f $1 person@other.host
36567942Seric
36667942Seric		This would arrange for (anything)@host.com to be sent
36767942Seric		to person@other.host.  Within the procmail script, $1 is
36867942Seric		the name of the sender and $2 is the name of the recipient.
36967942Seric		If you use this with FEATURE(local_procmail), the FEATURE
37067942Seric		should be listed first.
37167942Seric
37267929SericThe local mailer accepts addresses of the form "user+detail", where
37367929Sericthe "+detail" is not used for mailbox matching but is available
37467942Sericto certain local mail programs (in particular, see FEATURE(local_procmail)).
37567929SericFor example, "eric", "eric+sendmail", and "eric+sww" all indicate
37667929Sericthe same user, but additional arguments <null>, "sendmail", and "sww"
37767929Sericmay be provided for use in sorting mail.
37865148Seric
37967929Seric
38057246Seric+----------+
38157246Seric| FEATURES |
38257246Seric+----------+
38351268Seric
38457246SericSpecial features can be requested using the "FEATURE" macro.  For
38557246Sericexample, the .mc line:
38657246Seric
38757246Seric	FEATURE(use_cw_file)
38857246Seric
38957246Serictells sendmail that you want to have it read an /etc/sendmail.cw
39058782Sericfile to get values for class $=w.  The FEATURE may contain a single
39158782Sericoptional parameter -- for example:
39257246Seric
39358782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
39458782Seric
39558782SericAvailable features are:
39658782Seric
39757246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
39857246Seric		names for this host.  This might be used if you were
39957246Seric		on a host that MXed for a dynamic set of other
40057246Seric		hosts.  If the set is static, just including the line
40157246Seric		"Cw<name1> <name2> ..." is probably superior.
40258408Seric		The actual filename can be overridden by redefining
40358408Seric		confCW_FILE.
40464324Seric
40558087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
40658087Seric		a ``551 User not local; please try <address>'' message.
40758087Seric		If this is set, you can alias people who have left
40858087Seric		to their new address with ".REDIRECT" appended.
40964324Seric
41058284Sericnouucp		Don't do anything special with UUCP addresses at all.
41164324Seric
41259080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
41359080Seric		This would generally only be used by sites that only
41459080Seric		act as mail gateways or which have user agents that do
41564028Seric		full canonification themselves.  You may also want to
41664028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
41764028Seric		turn off the usual resolver options that do a similar
41864028Seric		thing.
41964324Seric
42067917Sericstickyhost	If set, email sent to "user@local.host" are marked
42158526Seric		as "sticky" -- that is, the local addresses aren't
42258526Seric		matched against UDB and don't go through ruleset 5.
42367915Seric		This is used if you want a set up where "user" is
42467915Seric		not necessarily the same as "user@local.host", e.g.,
42567915Seric		to make a distinct domain-wide namespace.  Prior to
42667915Seric		8.7 this was the default, and notsticky was used to
42767915Seric		turn this off.
42864324Seric
42958782Sericmailertable	Include a "mailer table" which can be used to override
43058782Seric		routing for particular domains.  The argument of the
43158782Seric		FEATURE may be the key definition.  If none is specified,
43258782Seric		the definition used is:
43364164Seric			hash -o /etc/mailertable
43463761Seric		Keys in this database are fully qualified domain names
43563761Seric		or partial domains preceded by a dot -- for example,
43663761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
43763761Seric		Values must be of the form:
43858782Seric			mailer:domain
43963761Seric		where "mailer" is the internal mailer name, and "domain"
44063761Seric		is where to send the message.  These maps are not
44163761Seric		reflected into the message header.
44264324Seric
44363761Sericdomaintable	Include a "domain table" which can be used to provide
44467451Seric		domain name mapping.  Use of this should really be
44567451Seric		limited to your own domains.  It may be useful if you
44667451Seric		change names (e.g., your company changes names from
44767451Seric		oldname.com to newname.com).  The argument of the
44867451Seric		FEATURE may be the key definition.  If none is specified,
44967451Seric		the definition used is:
45064164Seric			hash -o /etc/domaintable
45167451Seric		The key in this table is the domain name; the value is
45267451Seric		the new (fully qualified) domain.  Anything in the
45363761Seric		domaintable is reflected into headers; that is, this
45463761Seric		is done in ruleset 3.
45564324Seric
45659034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
45759034Seric		internet addresses.  The table can be built using the
45864153Seric		bitdomain program contributed by John Gardiner Myers.
45959034Seric		The argument of the FEATURE may be the key definition; if
46059034Seric		none is specified, the definition used is:
46164164Seric			hash -o /etc/bitdomain.db
46259034Seric		Keys are the bitnet hostname; values are the corresponding
46359034Seric		internet hostname.
46464324Seric
46559037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
46659037Seric		is:
46764164Seric			hash -o /etc/uudomain.db
46859037Seric		At the moment there is no automagic tool to build this
46959037Seric		database.
47064324Seric
47160263Sericalways_add_domain
47260263Seric		Include the local host domain even on locally delivered
47360263Seric		mail.  Normally it is not added unless it is already
47460263Seric		present.
47564324Seric
47663761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
47763761Seric		feature will cause recipient addresses to also masquerade
47863761Seric		as being from the masquerade host.  Normally they get
47963761Seric		the local hostname.  Although this may be right for
48063761Seric		ordinary users, it can break local aliases.  For example,
48163761Seric		if you send to "localalias", the originating sendmail will
48263761Seric		find that alias and send to all members, but send the
48363761Seric		message with "To: localalias@masqueradehost".  Since that
48463761Seric		alias likely does not exist, replies will fail.  Use this
48563761Seric		feature ONLY if you can guarantee that the ENTIRE
48663761Seric		namespace on your masquerade host supersets all the
48763761Seric		local entries.
48864324Seric
48964153Sericnodns		We aren't running DNS at our site (for example,
49064153Seric		we are UUCP-only connected).  It's hard to consider
49164153Seric		this a "feature", but hey, it had to go somewhere.
49257246Seric
49364324Sericnullclient	This is a special case -- it creates a stripped down
49464324Seric		configuration file containing nothing but support for
49564394Seric		forwarding all mail to a central hub via a local
49664394Seric		SMTP-based network.  The argument is the name of that
49764394Seric		hub.
49864394Seric
49964394Seric		The only other feature that should be used in conjunction
50064394Seric		with this one is "nocanonify" (this causes addresses to
50164394Seric		be sent unqualified via the SMTP connection; normally
50264394Seric		they are qualifed with the masquerade name, which
50364394Seric		defaults to the name of the hub machine).  No mailers
50464394Seric		should be defined.  No aliasing or forwarding is done.
50557246Seric
50667942Sericlocal_procmail	Use procmail as the local mailer.  This mailer can
50767929Seric		make use of the "user+indicator@local.host" syntax;
50867929Seric		normally the +indicator is just tossed, but by default
50967929Seric		it is passed as the -a argument to procmail.  The
51067929Seric		argument to this feature is the pathname of procmail,
51167929Seric		which defaults to /usr/local/bin/procmail.
51264324Seric
51368206Sericbestmx_is_local	Accept mail as though locally addressed for any host that
51468206Seric		lists us as the best possible MX record.  This generates
51568206Seric		additional DNS traffic, but should be OK for low to
51668206Seric		medium traffic hosts.
51767929Seric
51868216Sericsmrsh		Use the SendMail Restricted SHell (smrsh) provided
51968216Seric		with the distribution instead of /bin/sh for mailing
52068216Seric		to programs.  This improves the ability of the local
52168216Seric		system administrator to control what gets run via
52268216Seric		e-mail.  If an argument is provided it is used as the
52368216Seric		pathname to smrsh; otherwise, /usr/local/etc/smrsh is
52468216Seric		assumed.
52568206Seric
52668216Seric
52757246Seric+-------+
52857246Seric| HACKS |
52957246Seric+-------+
53057246Seric
53157246SericSome things just can't be called features.  To make this clear,
53257247Sericthey go in the hack subdirectory and are referenced using the HACK
53357246Sericmacro.  These will tend to be site-dependent.  The release
53457246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
53557246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
53657246Sericthis is intended as a short-term aid while we move hosts into
53757246Sericsubdomains.
53857246Seric
53958087Seric
54057246Seric+--------------------+
54157246Seric| SITE CONFIGURATION |
54257246Seric+--------------------+
54357246Seric
54468057Seric    *****************************************************
54568057Seric    * This section is really obsolete, and is preserved	*
54668057Seric    * only for back compatibility.  You should plan on	*
54768057Seric    * using mailertables for new installations.	  In	*
54868057Seric    * particular, it doesn't work for the newer forms	*
54968057Seric    * of UUCP mailers, such as uucp-uudom.		*
55068057Seric    *****************************************************
55168057Seric
55257246SericComplex sites will need more local configuration information, such as
55357246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
55457246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
55557246Seric
55666336SericIf your host is known by several different names, you need to augment
55766336Sericthe $=w class.  This is a list of names by which you are known, and
55866336Sericanything sent to an address using a host name in this list will be
55966336Serictreated as local mail.  You can do this in two ways: either create
56066336Sericthe file /etc/sendmail.cw containing a list of your aliases (one per
56166336Sericline), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
56266336Sericline:
56366336Seric
56466336Seric	Cw alias.host.name
56566336Seric
56666336Sericat the end of that file.  See the ``vangogh.mc'' file for an example.
56766336SericBe sure you use the fully-qualified name of the host, rather than a
56866336Sericshort name.
56966336Seric
57057246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
57157246Sericconfiguration information stored in the siteconfig subdirectory.  For
57257246Sericexample, the line
57357246Seric
57457246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
57557246Seric
57657246Sericreads the file uucp.ucbvax for local connection information.  The
57757246Sericsecond parameter is the local name (in this case just "ucbvax" since
57866336Sericit is locally connected, and hence a UUCP hostname).  The third
57966336Sericparameter is the name of both a macro to store the local name (in
58066336Sericthis case, $U) and the name of the class (e.g., $=U) in which to store
58166336Sericthe host information read from the file.  Another SITECONFIG line reads
58257246Seric
58357246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
58457246Seric
58557246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
58657246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
58766336Sericstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
58866336Sericis, the name of the relay to which the hosts listed in uucp.ucbarpa
58966336Sericare connected.  [The machine ucbarpa is gone now, but I've left
59057246Sericthis out-of-date configuration file around to demonstrate how you
59157246Sericmight do this.]
59257246Seric
59366336SericNote that the case of SITECONFIG with a third parameter of ``U'' is
59466336Sericspecial; the second parameter is assumed to be the UUCP name of the
59566336Sericlocal site, rather than the name of a remote site, and the UUCP name
59666336Sericis entered into $=w (the list of local hostnames) as $U.UUCP.
59766336Seric
59857246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
59957246Sericmore than a sequence of SITE macros describing connectivity.  For
60057246Sericexample:
60157246Seric
60257246Seric	SITE(cnmat)
60357246Seric	SITE(sgi olympus)
60457246Seric
60557246SericThe second example demonstrates that you can use two names on the
60657246Sericsame line; these are usually aliases for the same host (or are at
60757246Sericleast in the same company).
60857246Seric
60958087Seric
61065218Seric+--------------------+
61165218Seric| USING UUCP MAILERS |
61265218Seric+--------------------+
61365218Seric
61465218SericIt's hard to get UUCP mailers right because of the extremely ad hoc
61565218Sericnature of UUCP addressing.  These config files are really designed
61665218Sericfor domain-based addressing, even for UUCP sites.
61765218Seric
61865218SericThere are four UUCP mailers available.  The choice of which one to
61965218Sericuse is partly a matter of local preferences and what is running at
62065218Sericthe other end of your UUCP connection.  Unlike good protocols that
62165218Sericdefine what will go over the wire, UUCP uses the policy that you
62265218Sericshould do what is right for the other end; if they change, you have
62365218Sericto change.  This makes it hard to do the right thing, and discourages
62465218Sericpeople from updating their software.  In general, if you can avoid
62565218SericUUCP, please do.
62665218Seric
62765218SericThe major choice is whether to go for a domainized scheme or a
62865218Sericnon-domainized scheme.  This depends entirely on what the other
62965218Sericend will recognize.  If at all possible, you should encourage the
63065218Sericother end to go to a domain-based system -- non-domainized addresses
63165218Sericdon't work entirely properly.
63265218Seric
63365218SericThe four mailers are:
63465218Seric
63565218Seric    uucp-old (obsolete name: "uucp")
63665218Seric	This is the oldest, the worst (but the closest to UUCP) way of
63765218Seric	sending messages accros UUCP connections.  It does bangify
63865218Seric	everything and prepends $U (your UUCP name) to the sender's
63965218Seric	address (which can already be a bang path itself).  It can
64065218Seric	only send to one address at a time, so it spends a lot of
64165218Seric	time copying duplicates of messages.  Avoid this if at all
64265218Seric	possible.
64365218Seric
64465218Seric    uucp-new (obsolete name: "suucp")
64565218Seric	The same as above, except that it assumes that in one rmail
64665218Seric	command you can specify several recipients.  It still has a
64765218Seric	lot of other problems.
64865218Seric
64965218Seric    uucp-dom
65065218Seric	This UUCP mailer keeps everything as domain addresses.
65167471Seric	Basically, it uses the SMTP mailer rewriting rules.  This mailer
65267471Seric	is only included if MAILER(smtp) is also specified.
65365218Seric
65465218Seric	Unfortunately, a lot of UUCP mailer transport agents require
65565218Seric	bangified addresses in the envelope, although you can use
65665218Seric	domain-based addresses in the message header.  (The envelope
65765218Seric	shows up as the From_ line on UNIX mail.)  So....
65865218Seric
65965218Seric    uucp-uudom
66065218Seric	This is a cross between uucp-new (for the envelope addresses)
66165218Seric	and uucp-dom (for the header addresses).  It bangifies the
66265218Seric	envelope sender (From_ line in messages) without adding the
66365218Seric	local hostname, unless there is no host name on the address
66465218Seric	at all (e.g., "wolf") or the host component is a UUCP host name
66565218Seric	instead of a domain name ("somehost!wolf" instead of
66667471Seric	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
66767471Seric	is also specified.
66865218Seric
66965218SericExamples:
67065218Seric
67165218SericWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
67265218Sericfollowing summarizes the sender rewriting for various mailers.
67365218Seric
67465218SericMailer          sender		rewriting in the envelope
67565218Seric------		------		-------------------------
67665218Sericuucp-{old,new}	wolf		grasp!wolf
67765218Sericuucp-dom	wolf		wolf@grasp.insa-lyon.fr
67865218Sericuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
67965218Seric
68065218Sericuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
68165218Sericuucp-dom	wolf@fr.net	wolf@fr.net
68265218Sericuucp-uudom	wolf@fr.net	fr.net!wolf
68365218Seric
68465218Sericuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
68565218Sericuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
68665218Sericuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
68765218Seric
68865218SericIf you are using one of the domainized UUCP mailers, you really want
68965218Sericto convert all UUCP addresses to domain format -- otherwise, it will
69065218Sericdo it for you (and probably not the way you expected).  For example,
69165218Sericif you have the address foo!bar!baz (and you are not sending to foo),
69265218Sericthe heuristics will add the @uucp.relay.name or @local.host.name to
69365218Sericthis address.  However, if you map foo to foo.host.name first, it
69465218Sericwill not add the local hostname.  You can do this using the uucpdomain
69565218Sericfeature.
69665218Seric
69765218Seric
69857246Seric+-------------------+
69957246Seric| TWEAKING RULESETS |
70057246Seric+-------------------+
70157246Seric
70251268SericFor more complex configurations, you can define special rules.
70351268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
70451268Sericthe names.  Any modifications made here are reflected in the header.
70551268Seric
70651268SericA common use is to convert old UUCP addreses to SMTP addresses using
70751268Sericthe UUCPSMTP macro.  For example:
70851268Seric
70951268Seric	LOCAL_RULE_3
71051268Seric	UUCPSMTP(decvax,	decvax.dec.com)
71151268Seric	UUCPSMTP(research,	research.att.com)
71251268Seric
71351268Sericwill cause addresses of the form "decvax!user" and "research!user"
71451268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
71551268Sericrespectively.
71651268Seric
71765957SericThis could also be used to look up hosts in a database map:
71857246Seric
71957246Seric	LOCAL_RULE_3
72057246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
72157246Seric
72257246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
72357246Seric
72451268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
72551268SericFor example, new rules are needed to parse hostnames that you accept
72651309Sericvia MX records.  For example, you might have:
72751268Seric
72851309Seric	LOCAL_RULE_0
72965986Seric	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
73051309Seric
73151309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
73251309Sericpointing at this host; this rule catches the message and forwards it on
73351309Sericusing UUCP.
73451309Seric
73558681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
73658681SericThese rulesets are normally empty.
73758681Seric
73857246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
73957246Sericboilerplate option setting but before rulesets, and can be used to
74057945Sericdeclare local database maps or whatever.  For example:
74151268Seric
74257246Seric	LOCAL_CONFIG
74357246Seric	Khostmap hash /etc/hostmap.db
74457246Seric	Kyplocal nis -m hosts.byname
74551220Seric
74658087Seric
74757246Seric+---------------------------+
74857246Seric| MASQUERADING AND RELAYING |
74957246Seric+---------------------------+
75057246Seric
75157246SericYou can have your host masquerade as another using
75257246Seric
75357246Seric	MASQUERADE_AS(host.domain)
75457246Seric
75565957SericThis causes outgoing SMTP mail to be labeled as coming from the
75657246Sericindicated domain, rather than $j.  One normally masquerades as one
75765957Sericof one's own subdomains (for example, it's unlikely that I would
75857246Sericchoose to masquerade as an MIT site).
75957246Seric
76064153SericThe masquerade name is not normally canonified, so it is important
76164153Sericthat it be your One True Name, that is, fully qualified and not a
76264153SericCNAME.
76364153Seric
76457246Sericthere are always users that need to be "exposed" -- that is, their
76557246Sericinternal site name should be displayed instead of the masquerade name.
76657246SericRoot is an example.  You can add users to this list using
76757246Seric
76857246Seric	EXPOSED_USER(usernames)
76957246Seric
77057246SericThis adds users to class E; you could also use something like
77157246Seric
77257246Seric	FE/etc/sendmail.cE
77357246Seric
77457246SericYou can also arrange to relay all unqualified names (that is, names
77557246Sericwithout @host) to a relay host.  For example, if you have a central
77657246Sericemail server, you might relay to that host so that users don't have
77757246Sericto have .forward files or aliases.  You can do this using
77857246Seric
77958071Seric	define(`LOCAL_RELAY', mailer:hostname)
78057246Seric
78158071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
78258071Seric"smtp".  There are some user names that you don't want relayed, perhaps
78358071Sericbecause of local aliases.  A common example is root, which may be
78458071Sericlocally aliased.  You can add entries to this list using
78557246Seric
78657246Seric	LOCAL_USER(usernames)
78757246Seric
78857246SericThis adds users to class L; you could also use something like
78957246Seric
79057246Seric	FL/etc/sendmail.cL
79157246Seric
79264153SericIf you want all incoming mail sent to a centralized hub, as for a
79364153Sericshared /var/spool/mail scheme, use
79457591Seric
79558071Seric	define(`MAIL_HUB', mailer:hostname)
79657591Seric
79758071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
79868697Sericand MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
79968697Sericbe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
80068697SericNames in $=L will be delivered locally, so you MUST have aliases or
80168697Seric.forward files for them.
80266047Seric
80368697SericFor example, if are on machine mastodon.CS.Berkeley.EDU and you have
80468697SericFEATURE(stickyhost), the following combinations of settings will have the
80568697Sericindicated effects:
80657591Seric
80757591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
80857591Seric
80957591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
81068697Sericmail.CS.Berkeley.EDU	  (no local aliasing)	    (aliasing done)
81157591Seric
81257591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
81368697Sericmammoth.CS.Berkeley.EDU	  (aliasing done)	    (aliasing done)
81457591Seric
81557591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
81668697SericMAIL_HUB set as above	  (no local aliasing)	    (aliasing done)
81757591Seric
81868697SericIf you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
81968697SericMAIL_HUB act identically, with MAIL_HUB taking precedence.
82068697Seric
82164153SericIf you want all outgoing mail to go to a central relay site, define
82264153SericSMART_HOST as well.  Briefly:
82358071Seric
82464153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
82564153Seric	MAIL_HUB applies to names qualified with the name of the
82664153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
82764153Seric	SMART_HOST applies to names qualified with other hosts.
82864153Seric
82964153SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and
83064153SericFAX_RELAY) take precedence over SMART_HOST, so if you really want
83164153Sericabsolutely everything to go to a single central site you will need to
83264153Sericunset all the other relays -- or better yet, find or build a minimal
83364153Sericconfig file that does this.
83464153Seric
83564153Seric
83658071Seric+-------------------------------+
83758071Seric| NON-SMTP BASED CONFIGURATIONS |
83858071Seric+-------------------------------+
83958071Seric
84058071SericThese configuration files are designed primarily for use by SMTP-based
84158071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
84258071SericUUCP-primarily nodes (the latter is defined as a small local net
84358071Sericconnected to the rest of the world via UUCP).  However, there is one
84458071Serichook to handle some special cases.
84558071Seric
84658071SericYou can define a ``smart host'' that understands a richer address syntax
84758071Sericusing:
84858071Seric
84958071Seric	define(`SMART_HOST', mailer:hostname)
85058071Seric
85164028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
85258071Sericcan't be handled using the usual UUCP rules are passed to this host.
85358071Seric
85458071SericIf you are on a local SMTP-based net that connects to the outside
85558071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
85658071SericFor example:
85758071Seric
85858071Seric	define(`SMART_HOST', suucp:uunet)
85958071Seric	LOCAL_NET_CONFIG
86063761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
86158071Seric
86258071SericThis will cause all names that end in your domain name ($m) via
86358071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
86463761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
86563761Sericthe $m.  If you are running a local DNS inside your domain which is
86663761Sericnot otherwise connected to the outside world, you probably want to
86763761Sericuse:
86858071Seric
86963761Seric	define(`SMART_HOST', smtp:fire.wall.com)
87063761Seric	LOCAL_NET_CONFIG
87163761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
87258071Seric
87363761SericThat is, send directly only to things you found in your DNS lookup;
87463761Sericanything else goes through SMART_HOST.
87563761Seric
87664153SericIf you are not running DNS at all, it is important to use
87764153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
87864153Sericfor the name server to come up.
87963761Seric
88064153Seric
88164259Seric+-----------+
88264259Seric| WHO AM I? |
88364259Seric+-----------+
88464259Seric
88564259SericNormally, the $j macro is automatically defined to be your fully
88664259Sericqualified domain name (FQDN).  Sendmail does this by getting your
88764259Serichost name using gethostname and then calling gethostbyname on the
88864259Sericresult.  For example, in some environments gethostname returns
88964259Sericonly the root of the host name (such as "foo"); gethostbyname is
89064259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
89164259Sericcases, gethostbyname may fail to return the FQDN.  In this case
89264259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
89364259Sericname.  This is usually done using:
89464259Seric
89564259Seric	Dmbar.com
89664259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
89764259Seric
89864259Seric
89964028Seric+--------------------+
90064028Seric| USING MAILERTABLES |
90164028Seric+--------------------+
90264028Seric
90364028SericTo use FEATURE(mailertable), you will have to create an external
90464028Sericdatabase containing the routing information for various domains.
90564028SericFor example, a mailertable file in text format might be:
90664028Seric
90764028Seric	.my.domain		xnet:%1.my.domain
90864028Seric	uuhost1.my.domain	suucp:uuhost1
90964028Seric	.bitnet			smtp:relay.bit.net
91064028Seric
91164028SericThis should normally be stored in /etc/mailertable.  The actual
91264028Sericdatabase version of the mailertable is built using:
91364028Seric
91464028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
91564028Seric
91664028SericThe semantics are simple.  Any LHS entry that does not begin with
91764028Serica dot matches the full host name indicated.  LHS entries beginning
91864028Sericwith a dot match anything ending with that domain name -- that is,
91964028Sericthey can be thought of as having a leading "*" wildcard.  Matching
92064028Sericis done in order of most-to-least qualified -- for example, even
92164028Sericthough ".my.domain" is listed first in the above example, an entry
92264028Sericof "uuhost1.my.domain" will match the second entry since it is
92364028Sericmore explicit.
92464028Seric
92564028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
92664028Sericconfiguration name of a mailer (that is, an `M' line in the
92764028Sericsendmail.cf file).  The "host" will be the hostname passed to
92864028Sericthat mailer.  In domain-based matches (that is, those with leading
92964028Sericdots) the "%1" may be used to interpolate the wildcarded part of
93064028Sericthe host name.  For example, the first line above sends everything
93164028Sericaddressed to "anything.my.domain" to that same host name, but using
93264028Sericthe (presumably experimental) xnet mailer.
93364028Seric
93467915SericIn some cases you may want to temporarily turn off MX records,
93567915Sericparticularly on gateways.  For example, you may want to MX
93667915Sericeverything in a domain to one machine that then forwards it
93767915Sericdirectly.  To do this, you might use the DNS configuration:
93864028Seric
93967915Seric	*.domain.	IN	MX	0	relay.machine
94067915Seric
94167915Sericand on relay.machine use the mailertable:
94267915Seric
94367915Seric	.domain		smtp:[gateway.domain]
94467915Seric
94567915SericThe [square brackets] turn off MX records for this host only.
94667915SericIf you didn't do this, the mailertable would use the MX record
94767915Sericagain, which would give you an MX loop.
94867915Seric
94967915Seric
95064153Seric+--------------------------------+
95164153Seric| USING USERDB TO MAP FULL NAMES |
95264153Seric+--------------------------------+
95364153Seric
95464153SericThe user database was not originally intended for mapping full names
95564153Sericto login names (e.g., Eric.Allman => eric), but some people are using
95664153Sericit that way.  (I would recommend that you set up aliases for this
95764153Sericpurpose instead -- since you can specify multiple alias files, this
95864153Sericis fairly easy.)  The intent was to locate the default maildrop at
95964153Serica site, but allow you to override this by sending to a specific host.
96064153Seric
96164153SericIf you decide to set up the user database in this fashion, it is
96267917Sericimperative that you not use FEATURE(stickyhost) -- otherwise,
96364153Serice-mail sent to Full.Name@local.host.name will be rejected.
96464153Seric
96567917SericTo build the internal form of the user database, use:
96664153Seric
96764259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
96864259Seric
96969508SericAs a general rule, I am adamantly opposed to using full names as
97069508Serice-mail addresses, since they are not in any sense unique.  For example,
97169508Sericthe Unix software-development community has two Andy Tannenbaums,
97269508Sericat least two well-known Peter Deutsches, and at one time Bell Labs
97369508Serichad two Stephen R. Bournes with offices along the same hallway.
97469508SericWhich one will be forced to suffer the indignity of being
97569508SericStephen_R_Bourne_2?  The less famous of the two, or the one that
97669508Sericwas hired later?
97764259Seric
97869508SericFinger should handle full names (and be fuzzy).  Mail should use
97969508Serichandles, and not be fuzzy.  [Not that I expect anyone to pay any
98069508Sericattention to my opinions.]
98169508Seric
98269508Seric
98367539Seric+--------------------------------+
98467539Seric| MISCELLANEOUS SPECIAL FEATURES |
98567539Seric+--------------------------------+
98667539Seric
987*69540SericPlussed users
98867539Seric	Sometimes it is convenient to merge configuration on a
98967539Seric	centralized mail machine, for example, to forward all
99067539Seric	root mail to a mail server.  In this case it might be
99167539Seric	useful to be able to treat the root addresses as a class
99267539Seric	of addresses with subtle differences.  You can do this
993*69540Seric	using plussed users.  For example, a client might include
99467539Seric	the alias:
99567539Seric
996*69540Seric		root:  root+client1@server
99767539Seric
998*69540Seric	On the server, this will match an alias for "root+client1".
999*69540Seric	If that is not found, the alias "root+*" will be tried,
1000*69540Seric	then "root".
100167539Seric
100267539Seric
100367960Seric+----------------+
100467960Seric| SECURITY NOTES |
100567960Seric+----------------+
100667960Seric
100767960SericA lot of sendmail security comes down to you.  Sendmail 8 is much
100867960Sericmore careful about checking for security problems than previous
100967960Sericversions, but there are some things that you still need to watch
101067960Sericfor.  In particular:
101167960Seric
101267960Seric* Make sure the aliases file isn't writable except by trusted
101367960Seric  system personnel.  This includes both the text and database
101467960Seric  version.
101567960Seric
101667960Seric* Make sure that other files that sendmail reads, such as the
101767960Seric  mailertable, is only writable by trusted system personnel.
101867960Seric
101967960Seric* The queue directory should not be world writable PARTICULARLY
102067960Seric  if your system allows "file giveaways" (that is, if a non-root
102167960Seric  user can chown any file they own to any other user).
102267960Seric
102367960Seric* If your system allows file giveaways, DO NOT create a publically
102467960Seric  writable directory for forward files.  This will allow anyone
102567960Seric  to steal anyone else's e-mail.  Instead, create a script that
102667960Seric  copies the .forward file from users' home directories once a
102767960Seric  night (if you want the non-NFS-mounted forward directory).
102867960Seric
102967960Seric* If your system allows file giveaways, you'll find that
103067960Seric  sendmail is much less trusting of :include: files -- in
103167960Seric  particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
103267960Seric  /etc/shells before they will be trusted (that is, before
103367960Seric  files and programs listed in them will be honored).
103467960Seric
103567960SericIn general, file giveaways are a mistake -- if you can turn them
103667960Sericoff I recommend you do so.
103767960Seric
103867960Seric
103958363Seric+------------------+
104058363Seric| FlexFAX SOFTWARE |
104158363Seric+------------------+
104258363Seric
104358363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
104458363Sericpublic version out "later this week" [as of 3/1/93].  The following
104558363Sericblurb is direct from Sam:
104658363Seric
104764498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
104858363Seric
104958363Seric	How To Obtain This Software (in case all you get is this file)
105064498Seric	--------------------------------------------------------------
105158363Seric	The source code is available for public ftp on
105264498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
105358363Seric		(192.48.153.1)
105458363Seric
105558363Seric	You can also obtain inst'able images for Silicon Graphics machines from
105664498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
105758363Seric		(192.48.153.1)
105858363Seric
105958363Seric	For example,
106058363Seric	    % ftp -n sgi.com
106158363Seric	    ....
106258363Seric	    ftp> user anonymous
106358363Seric	    ... <type in password>
106458363Seric	    ftp> cd sgi/fax
106558363Seric	    ftp> binary
106664498Seric	    ftp> get v2.1.src.tar.Z
106758363Seric
106864498Seric	In general, the latest version of the 2.1 release of the software is
106964498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
107064498Seric	directory.  This file is a link to the appropriate released version (so
107164498Seric	don't waste your time retrieving the linked file as well!) Any files of
107264498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
107364498Seric	versions of the source code.  For example, the file v2.1.0.patch would
107464498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
107564498Seric	different than the naming conventions used during beta testing.) Patch
107664498Seric	files only work to go between consecutive versions, so if you are
107764498Seric	multiple versions behind the latest release, you will need to apply
107864498Seric	each patch file between your current version and the latest.
107964498Seric
108064498Seric
108164498Seric	Obtaining the Software by Electronic Mail
108264498Seric	-----------------------------------------
108364498Seric	Do not send me requests for the software; they will be ignored (without
108464498Seric	response).  If you cannot use FTP at all, there is a service called
108564498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
108664498Seric	this machine and it will use FTP to retrieve files for you and send you
108764498Seric	the files back again via e-mail.  To find out more about the ftpmail
108858363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
108958363Seric	consists of the single line "help".
109058363Seric
109164498Seric
109264498Seric	Obtaining the Software Within Silicon Graphics
109364498Seric	----------------------------------------------
109458363Seric	Internal to Silicon Graphics there are inst'able images on the host
109564498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
109658363Seric
109764498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
109858363Seric
109964498Seric	to install the latest version of the software on your machine.
110058363Seric
110164498Seric
110264498Seric	What to do Once You've Retrieved Stuff
110364498Seric	--------------------------------------
110458363Seric	The external distributions come in a compressed or uncompressed tar
110558363Seric	file.  To extract the source distribution:
110658363Seric
110764498Seric	    % zcat v2.1.src.tar.Z | tar xf -
110858363Seric
110958363Seric	(uncompress and extract individual files in current directory).  To
111058363Seric	unpack and install the client portion of the inst'able distribution:
111158363Seric
111258363Seric	    % mkdir dist
111364498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
111458363Seric	    % inst -f dist/flexfax
111558363Seric	    ...
111658363Seric	    inst> go
111758363Seric
111858363Seric	(Note, the dist subdirectory is because some versions of inst fail if
111964498Seric	the files are in the current directory.) Server binaries are also
112064498Seric	included in the inst'able images as flexfax.server.*.  They are not
112164498Seric	installed by default, so to get them also you need to do:
112258363Seric
112358363Seric	    % inst -f flexfax
112458363Seric	    ...
112558363Seric	    inst> install flexfax.server.*
112658363Seric	    inst> go
112758363Seric
112864498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
112958363Seric	system.  They should work w/o problem on earlier versions of the
113058363Seric	system, but I have not fully tested this.  Also, note that to install a
113158363Seric	server on an SGI machine, you need to have installed the Display
113258363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
113358363Seric	server will not be able to convert PostScript to facsimile for
113458363Seric	transmission.
113558363Seric
113664498Seric	If you are working from the source distribution, look at the file
113764498Seric	README in the top of the source tree.  If you are working from the inst
113864498Seric	images, the subsystem flexfax.man.readme contains the README file and
113964498Seric	other useful pieces of information--the installed files are placed in
114064498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
114164498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
114264498Seric	the README file and the manual page for faxaddmodem for information.
114358363Seric
114458363Seric
114564498Seric	FlexFAX Mail List
114664498Seric	-----------------
114758363Seric	A mailing list for users of this software is located on sgi.com.
114858363Seric	If you want to join this mailing list or have a list-related request
114958363Seric	such as getting your name removed from it, send a request to
115058363Seric
115164498Seric	    majordomo@whizzer.wpd.sgi.com
115258363Seric
115364498Seric	For example, to subscribe, send the line "subscribe flexfax" in
115464498Seric	the body of your message.  The line "help" will return a list of
115564498Seric	the commands understood by the mailing list management software.
115664498Seric
115758363Seric	Submissions (including bug reports) should be directed to:
115858363Seric
115958363Seric	    flexfax@sgi.com
116058363Seric
116164498Seric	When corresponding about this software please always specify what
116264498Seric	version you have, what system you're running on, and, if the problem is
116364498Seric	specific to your modem, identify the modem and firmware revision.
116458363Seric
116564498Seric
116657945Seric+--------------------------------+
116757945Seric| TWEAKING CONFIGURATION OPTIONS |
116857945Seric+--------------------------------+
116957945Seric
117057945SericThere are a large number of configuration options that don't normally
117157945Sericneed to be changed.  However, if you feel you need to tweak them, you
117257945Sericcan define the following M4 variables.  This list is shown in four
117357945Sericcolumns:  the name you define, the default value for that definition,
117457945Sericthe option or macro that is affected (either Ox for an option or Dx
117557945Sericfor a macro), and a brief description.  Greater detail of the semantics
117657945Sericcan be found in the Installation and Operations Guide.
117757945Seric
117863582SericSome options are likely to be deprecated in future versions -- that is,
117963582Sericthe option is only included to provide back-compatibility.  These are
118063582Sericmarked with "*".
118163582Seric
118265002SericRemember that these options are M4 variables, and hence may need to
118365002Sericbe quoted.  In particular, arguments with commas will usually have to
118465002Sericbe ``double quoted, like this phrase'' to avoid having the comma
118565002Sericconfuse things.  This is common for alias file definitions and for
118665002Sericthe read timeout.
118765002Seric
118868694SericM4 Variable Name	Configuration	Description & [Default]
118968694Seric================	=============	=======================
119068694SericconfMAILER_NAME		$n macro	[MAILER-DAEMON] The sender name used
119168694Seric					for internally generated outgoing
119268694Seric					messages.
119368694SericconfFROM_LINE		$l macro	[From $g  $d] The From_ line used
119468694Seric					when sending to files or programs.
119568694SericconfFROM_HEADER		$q macro	[$?x$x <$g>$|$g$.] The format of an
119668694Seric					internally generated From: address.
119768694SericconfOPERATORS		$o macro	[.:%@!^/[]+] Address operator
119868694Seric					characters.
119968767SericconfSMTP_LOGIN_MSG	$e macro	[$j Sendmail $v/$Z; $b]
120068694Seric					The initial (spontaneous) SMTP
120168767Seric					greeting message.  The word "ESMTP"
120268767Seric					will be inserted between the first and
120368767Seric					second words to convince other
120468767Seric					sendmails to try to speak ESMTP.
120568694SericconfDOMAIN_NAME		$j macro	If defined, sets $j.  This should
120668694Seric					only be done if your system cannot
120768694Seric					determine your local domain name,
120868694Seric					and then it should be set to
120968694Seric					$w.Foo.COM, where Foo.COM is your
121068694Seric					domain name.
121168694SericconfRECEIVED_HEADER	Received:
121268694Seric      [.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b]
121368694Seric					The format of the Received: header
121468694Seric					in messages passed through this host.
121568694Seric					It is unwise to try to change this.
121668694SericconfCW_FILE		Fw class	[/etc/sendmail.cw] Name of file used
121768694Seric					to get the local additions to the $=w
121868694Seric					class.
121968694SericconfSMTP_MAILER		-		[smtp] The mailer name used when
122068694Seric					SMTP connectivity is required.
122168694Seric					One of "smtp", "smtp8", or "esmtp".
122268694SericconfLOCAL_MAILER	-		[local] The mailer name used when
122368694Seric					local connectivity is required.
122468694Seric					Almost always "local".
122568694SericconfRELAY_MAILER	-		[relay] The default mailer name used
122668694Seric					for relaying any mail (e.g., to a
122768694Seric					BITNET_RELAY, a SMART_HOST, or
122868694Seric					whatever).  This can reasonably be
122968694Seric					"uucp-new" if you are on a
123068694Seric					UUCP-connected site.
123168694SericconfSEVEN_BIT_INPUT	SevenBitInput	[False] Force input to seven bits?
123268694SericconfEIGHT_BIT_HANDLING	EightBitMode	[pass8] 8-bit data handling
123368694SericconfALIAS_WAIT		AliasWait	[10m] Time to wait for alias file
123468694Seric					rebuild until you get bored and
123568694Seric					decide that the apparently pending
123668694Seric					rebuild failed.
123768694SericconfMIN_FREE_BLOCKS	MinFreeBlocks	[100] Minimum number of free blocks on
123868694Seric					queue filesystem to accept SMTP mail.
123968749Seric					(Prior to 8.7 this was minfree/maxsize,
124068749Seric					where minfree was the number of free
124168749Seric					blocks and maxsize was the maximum
124268749Seric					message size.  Use confMAX_MESSAGE_SIZE
124368749Seric					for the second value now.)
124468749SericconfMAX_MESSAGE_SIZE	MaxMessageSize	The maximum size of messages that will
124568749Seric					be accepted (in bytes).
124668694SericconfBLANK_SUB		BlankSub	[.] Blank (space) substitution
124768694Seric					character.
124868694SericconfCON_EXPENSIVE	HoldExpensive	[False] Avoid connecting immediately
124968694Seric					to mailers marked expensive?
125068694SericconfCHECKPOINT_INTERVAL	CheckpointInterval
125168694Seric					Checkpoint queue files every N
125268694Seric					recipients.
125368694SericconfDELIVERY_MODE	DeliveryMode	[background] Default delivery mode.
125468694SericconfAUTO_REBUILD	AutoRebuildAliases
125568694Seric					Automatically rebuild alias
125668694Seric					file if needed.
125768694SericconfERROR_MODE		ErrorMode	Error message mode.
125868694SericconfERROR_MESSAGE	ErrorHeader	Error message header/file.
125968694SericconfSAVE_FROM_LINES	SafeFromLine	Save extra leading From_ lines.
126068694SericconfTEMP_FILE_MODE	TempFileMode	[0600] Temporary file mode.
126168694SericconfMATCH_GECOS		MatchGECOS	Match GECOS field.
126268694SericconfMAX_HOP		MaxHopCount	Maximum hop count.
126368694SericconfIGNORE_DOTS*	IgnoreDots	Ignore dot as terminator for incoming
126468694Seric					messages?
126568694SericconfBIND_OPTS		ResolverOptions	Default options for DNS resolver.
126668694SericconfMIME_FORMAT_ERRORS*	SendMimeErrors	[True] Send error messages as MIME-
126768694Seric					encapsulated messages per RFC 1344.
126868694SericconfFORWARD_PATH	ForwardPath	[$z/.forward.$w:$z/.forward]
126968694Seric					The colon-separated list of places to
127068694Seric					search for .forward files.  N.B.: see
127168694Seric					the Security Notes section.
127268694SericconfMCI_CACHE_SIZE	ConnectionCacheSize
127368694Seric					[2] Size of open connection cache.
127468694SericconfMCI_CACHE_TIMEOUT	ConnectionCacheTimeout
127568694Seric					[5m] Open connection cache timeout.
127668694SericconfUSE_ERRORS_TO*	UserErrorsTo	[False] Use the Errors-To: header to deliver
127768694Seric					error messages.  This should not be
127868694Seric					necessary because of general acceptance
127968694Seric					of the envelope/header distinction.
128068694SericconfLOG_LEVEL		LogLevel	[9] Log level.
128168694SericconfME_TOO		MeToo		Include sender in group expansions.
128268694SericconfCHECK_ALIASES	CheckAliases	[True] Check RHS of aliases when
128368694Seric					running newaliases.
128468694SericconfOLD_STYLE_HEADERS*	OldStyleHeaders	[True] Assume that headers without
128568694Seric					special chars are old style.
128668694SericconfDAEMON_OPTIONS	DaemonPortOptions
128768694Seric					SMTP daemon options.
128868694SericconfPRIVACY_FLAGS	PrivacyOptions	[authwarnings] Privacy flags.
128968694SericconfCOPY_ERRORS_TO	PostmasterCopy	Address for additional copies of all
129068694Seric					error messages.
129168694SericconfQUEUE_FACTOR	QueueFactor	Slope of queue-only function.
129268694SericconfDONT_PRUNE_ROUTES	DontPruneRoutes	Don't prune down route-addr syntax
129368694Seric					addresses to the minimum possible.
129468694SericconfSAFE_QUEUE*		SuperSafe	[True] Commit all messages to disk
129568694Seric					before forking.
129668694SericconfTIME_ZONE		TimeZoneSpec	[USE_SYSTEM] Time zone info -- can be
129768694Seric					USE_SYSTEM to use the system's idea,
129868694Seric					USE_TZ to use the user's TZ envariable,
129968694Seric					or something else to force that value.
130068694SericconfDEF_USER_ID		DefaultUser	[1:1] Default user id.
130168694SericconfUSERDB_SPEC		UserDatabaseSpec
130268694Seric					User database specification.
130368694SericconfFALLBACK_MX		FallbackMXhost	Fallback MX host.
130468694SericconfTRY_NULL_MX_LIST	TryNullMXList	If we are the best MX for a host and
130568694Seric					haven't made other arrangements, try
130668694Seric					connecting to the host directly;
130768694Seric					normally this would be a config error.
130868694SericconfQUEUE_LA		QueueLA		Load average at which queue-only
130968694Seric					function kicks in.
131068694SericconfREFUSE_LA		RefuseLA	Load average at which incoming
131168694Seric					SMTP connections are refused.
131263582SericconfWORK_RECIPIENT_FACTOR
131368694Seric			RecipientFactor	Cost of each recipient.
131468694SericconfSEPARATE_PROC	ForkEachJob	Run all deliveries in a separate
131568694Seric					process.
131668694SericconfWORK_CLASS_FACTOR	ClassFactor	Priority multiplier for class.
131768694SericconfWORK_TIME_FACTOR	RetryFactor	Cost of each delivery attempt.
131868694SericconfQUEUE_SORT_ORDER	QueueSortOrder	Queue sort algorithm: Priority or Host.
131968694SericconfMIN_QUEUE_AGE	MinQueueAge	The minimum amount of time a job
132068694Seric					must sit in the queue between queue
132168694Seric					runs.  This allows you to set the
132268694Seric					queue run interval low for better
132368694Seric					resposiveness without trying all
132468694Seric					jobs in each run.
132568694SericconfDEF_CHAR_SET	DefaultCharSet	When converting unlabelled 8 bit
132668694Seric					input to MIME, the character set to
132768694Seric					use by default.
132868694SericconfSERVICE_SWITCH_FILE	ServiceSwitchFile
132968694Seric					The file to use for the service switch
133068694Seric					on systems that do not have a system-
133168694Seric					defined switch.
133268694SericconfDIAL_DELAY		DialDelay	If a connection fails, wait this long
133368694Seric					and try again.  This is to allow
133468694Seric					"dial on demand" connections to have
133568694Seric					enough time to complete a connection.
133668694SericconfNO_RCPT_ACTION	NoRecipientAction
133768694Seric					What to do if there are no legal
133868694Seric					recipient fields (To:, Cc: or Bcc:)
133968694Seric					in the message.  Legal values can
134068694Seric					be "none" to just leave the
134168694Seric					nonconforming message as is, "add-to"
134268694Seric					to add a To: header with all the
134368694Seric					known recipients (which may expose
134468694Seric					blind recipients), "add-apparently-to"
134568694Seric					to do the same but use Apparently-To:
134668694Seric					instead of To:, "add-bcc" to add an
134768694Seric					empty Bcc: header, or
134868694Seric					"add-to-undisclosed" to add the header
134968694Seric					``To: undisclosed-recipients:;''.
135068694Seric					Default is "none".
135168694SericconfSAFE_FILE_ENV	SafeFileEnvironment
135268694Seric					If set, sendmail will do a chroot()
135368694Seric					into this directory before writing
135468694Seric					files.
135568807SericconfCOLON_OK_IN_ADDR	ColonOkInAddr	If set, colons are treated as a regular
135668807Seric					character in addresses.  If not set,
135768807Seric					they are treated as the introducer to
135868807Seric					the RFC 822 "group" syntax.  Colons are
135968807Seric					handled properly in route-addrs.  This
136068807Seric					option defaults on for V5 and lower
136168807Seric					configuration files.
136257945Seric
136358087Seric
136457246Seric+-----------+
136557246Seric| HIERARCHY |
136657246Seric+-----------+
136757246Seric
136851220SericWithin this directory are several subdirectories, to wit:
136951220Seric
137051220Sericm4		General support routines.  These are typically
137151220Seric		very important and should not be changed without
137257247Seric		very careful consideration.
137351220Seric
137451220Sericcf		The configuration files themselves.  They have
137551220Seric		".mc" suffixes, and must be run through m4 to
137651220Seric		become complete.  The resulting output should
137751220Seric		have a ".cf" suffix.
137851220Seric
137951220Sericostype		Definitions describing a particular operating
138051220Seric		system type.  These should always be referenced
138151220Seric		using the OSTYPE macro in the .mc file.  Examples
138251220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
138351220Seric		"sunos4.1".
138451220Seric
138551220Sericdomain		Definitions describing a particular domain, referenced
138651220Seric		using the DOMAIN macro in the .mc file.  These are
138768845Seric		site dependent; for example, "CS.Berkeley.EDU.m4"
138868845Seric		describes hosts in the CS.Berkeley.EDU subdomain.
138951220Seric
139051220Sericmailer		Descriptions of mailers.   These are referenced using
139151220Seric		the MAILER macro in the .mc file.
139251220Seric
139351220Sericsh		Shell files used when building the .cf file from the
139451220Seric		.mc file in the cf subdirectory.
139551220Seric
139651220Sericfeature		These hold special orthogonal features that you might
139751220Seric		want to include.  They should be referenced using
139851220Seric		the FEATURE macro.
139951220Seric
140051220Serichack		Local hacks.  These can be referenced using the HACK
140151220Seric		macro.  They shouldn't be of more than voyeuristic
140251220Seric		interest outside the .Berkeley.EDU domain, but who knows?
140365957Seric		We've all got our own peccadillos.
140451220Seric
140551268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
140651268Seric		UUCP sites.
140751220Seric
140851268Seric
140957246Seric+------------------------+
141057246Seric| ADMINISTRATIVE DETAILS |
141157246Seric+------------------------+
141251220Seric
141351220SericThe following sections detail usage of certain internal parts of the
141451220Sericsendmail.cf file.  Read them carefully if you are trying to modify
141551220Sericthe current model.  If you find the above descriptions adequate, these
141651220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
141751220Seric
141851220SericRULESETS (* means built in to sendmail)
141951220Seric
142051220Seric   0 *	Parsing
142151220Seric   1 *	Sender rewriting
142251220Seric   2 *	Recipient rewriting
142351220Seric   3 *	Canonicalization
142451220Seric   4 *	Post cleanup
142554839Seric   5 *	Local address rewrite (after aliasing)
142660539Seric  1x	mailer rules (sender qualification)
142760539Seric  2x	mailer rules (recipient qualification)
142864801Seric  3x	mailer rules (sender header qualification)
142964801Seric  4x	mailer rules (recipient header qualification)
143064801Seric  5x	mailer subroutines (general)
143164801Seric  6x	mailer subroutines (general)
143264801Seric  7x	mailer subroutines (general)
143364801Seric  8x	reserved
143460539Seric  90	Mailertable host stripping
143560892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
143660892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
143763857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
143851220Seric
143951220Seric
144051220SericMAILERS
144151220Seric
144251220Seric   0	local, prog	local and program mailers
144365218Seric   1	[e]smtp, relay	SMTP channel
144465218Seric   2	uucp-*		UNIX-to-UNIX Copy Program
144558087Seric   3	netnews		Network News delivery
144658363Seric   4	fax		Sam Leffler's FlexFAX software
144751220Seric
144851220Seric
144951220SericMACROS
145051220Seric
145151220Seric   A
145251220Seric   B	Bitnet Relay
145365182Seric   C
145454839Seric   D	The local domain -- usually not needed
145551220Seric   E
145658363Seric   F	FAX Relay
145751220Seric   G
145857591Seric   H	mail Hub (for mail clusters)
145951220Seric   I
146051220Seric   J
146151220Seric   K
146267915Seric   L	Luser Relay
146351220Seric   M	Masquerade (who I claim to be)
146451220Seric   N
146551220Seric   O
146651220Seric   P
146751220Seric   Q
146851220Seric   R	Relay (for unqualified names)
146958071Seric   S	Smart Host
147051220Seric   T
147151309Seric   U	my UUCP name (if I have a UUCP connection)
147251309Seric   V	UUCP Relay (class V hosts)
147351220Seric   W	UUCP Relay (class W hosts)
147451220Seric   X	UUCP Relay (class X hosts)
147551309Seric   Y	UUCP Relay (all other hosts)
147651220Seric   Z	Version number
147751220Seric
147851220Seric
147951220SericCLASSES
148051220Seric
148151220Seric   A
148251220Seric   B
148351220Seric   C
1484*69540Seric   D
148557246Seric   E	addresses that should not seem to come from $M
148654839Seric   F	hosts we forward for
148751220Seric   G
148851220Seric   H
148951220Seric   I
149051220Seric   J
149151220Seric   K
149251220Seric   L	addresses that should not be forwarded to $R
149351220Seric   M
149451220Seric   N
149551220Seric   O	operators that indicate network operations (cannot be in local names)
149660211Seric   P	top level pseudo-domains: BITNET, FAX, UUCP, etc.
149751220Seric   Q
149851220Seric   R
149951220Seric   S
150051220Seric   T
150151220Seric   U	locally connected UUCP hosts
150251309Seric   V	UUCP hosts connected to relay $V
150351309Seric   W	UUCP hosts connected to relay $W
150451309Seric   X	UUCP hosts connected to relay $X
150551309Seric   Y	locally connected smart UUCP hosts
150664153Seric   Z	locally connected domain-ized UUCP hosts
150754839Seric   .	the class containing only a dot
150851220Seric
150951220Seric
151051220SericM4 DIVERSIONS
151151220Seric
151258071Seric   1	Local host detection and resolution
151358071Seric   2	Local Ruleset 3 additions
151458071Seric   3	Local Ruleset 0 additions
151551268Seric   4	UUCP Ruleset 0 additions
151651309Seric   5	locally interpreted names (overrides $R)
151754839Seric   6	local configuration (at top of file)
151851220Seric   7	mailer definitions
151966099Seric   8
152058681Seric   9	special local rulesets (1 and 2)
1521