xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 65002)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*65002Seric		@(#)README	8.16 (Berkeley) 12/01/93
851220Seric
951220Seric
1057246SericThis document describes the sendmail configuration files being used
1163857Sericat Berkeley.  These use features in the new (R8) sendmail, and although
1257246Sericthere is an ``OLDSENDMAIL'' mode, they haven't really been tested on
1357247Sericold versions of sendmail and cannot be expected to work well.
1451220Seric
1557246SericThese configuration files are probably not as general as previous
1657246Sericversions, and don't handle as many of the wierd cases automagically.
1757246SericI was able to simplify by them for two reasons.  First, the network
1857246Serichas become more consistent -- for example, at this point, everyone
1957246Sericon the internet is supposed to be running a name server, so hacks to
2057246Serichandle NIC-registered hosts can go away.  Second, I assumed that a
2157246Sericsubdomain would be running SMTP internally -- UUCP is presumed to be
2257246Serica long-haul protocol.  I realize that this is not universal, but it
2357246Sericdoes describe the vast majority of sites with which I am familiar,
2457246Sericincluding those outside the US.
2551220Seric
2657246SericOf course, the downside of this is that if you do live in a wierd
2757246Sericworld, things are going to get wierder for you.  I'm sorry about that,
2857246Sericbut at the time we at Berkeley had a problem, and it seemed like the
2957246Sericright thing to do.
3051220Seric
3157247SericThis package requires a post-V7 version of m4; if you are running the
3257247Seric4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with
3357247Serica newer version.  You can m4-expand on their system, then run locally.
34*65002SericSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
35*65002Sericalso works.  Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't
36*65002Sericwork -- you'll have to use a Net/2 or GNU version.
3751220Seric
3858284SericIF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
3964371Seric"m4 foo.mc > foo.cf" -- that should be all you need.  There is also
4064371Serica fairly crude (but functional) Makefile.dist that works on the
4164371Sericold version of make.
4258284Seric
4358284SericTo get started, you may want to look at tcpproto.mc (for TCP-only
4464324Sericsites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for
4564324Sericclusters of clients using a single mail host).  Others are versions
4658284Sericthat we use at Berkeley, although not all are in current use.  For
4758284Sericexample, ucbarpa has gone away, but I've left ucbarpa.mc in because
4858284Sericit demonstrates some interesting techniques.
4958284Seric
5057246SericI'm not pretending that this README describes everything that these
5157246Sericconfiguration files can do; clever people can probably tweak them
5257246Sericto great effect.  But it should get you started.
5357246Seric
5458087Seric
5557246Seric+--------------------------+
5657246Seric| INTRODUCTION AND EXAMPLE |
5757246Seric+--------------------------+
5857246Seric
5957246SericConfiguration files are contained in the subdirectory "cf", with a
6057246Sericsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
6157246Seric
6251220SericLet's examine a typical .mc file (cf/cs-exposed.mc):
6351220Seric
6451220Seric	divert(-1)
6551220Seric	#
6651220Seric	# Copyright (c) 1983 Eric P. Allman
6751220Seric	# Copyright (c) 1988 The Regents of the University of California.
6851220Seric	# All rights reserved.
6951220Seric	#
7051220Seric	# Redistribution and use in source and binary forms are permitted
7151220Seric	# provided that the above copyright notice and this paragraph are
7251220Seric	# duplicated in all such forms and that any documentation,
7351220Seric	# advertising materials, and other materials related to such
7451220Seric	# distribution and use acknowledge that the software was developed
7551220Seric	# by the University of California, Berkeley.  The name of the
7651220Seric	# University may not be used to endorse or promote products derived
7751220Seric	# from this software without specific prior written permission.
7851220Seric	# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
7951220Seric	# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
8051220Seric	# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
8151220Seric	#
8251220Seric
8357246SericThe divert(-1) will delete the crud in the resulting output file.
8457247SericThe copyright notice is what your lawyers require.  Our lawyers require
8557246Sericthe one that I've included in my files. A copyleft is a copyright by
8657246Sericanother name.
8751220Seric
8857246SericThe next line MUST be
8957246Seric
9051220Seric	include(`../m4/cf.m4')
9151220Seric
9257246SericThis will pull in the M4 macros you will need to make sense of
9357246Sericeverything else.  As the saying goes, don't think about it, just
9457246Sericdo it.  If you don't do it, don't bother reading the rest of this
9557246Sericfile.
9651220Seric
9756778Seric	VERSIONID(`<SCCS or RCS version id>')
9851220Seric
9951220SericVERSIONID is a macro that stuffs the version information into the
10051220Sericresulting file.  We use SCCS; you could use RCS, something else, or
10157246Sericomit it completely.  This is not the same as the version id included
10257246Sericin SMTP greeting messages -- this is defined in m4/version.m4.
10351220Seric
10451268Seric	DOMAIN(cs.exposed)
10551220Seric
10651220SericThis example exposes the host inside of the CS subdomain -- that is,
10751220Sericit doesn't try to hide the name of the workstation to the outside
10851220Sericworld.  Changing this to DOMAIN(cs.hidden) would have made outgoing
10951220Sericmessages refer to "<username>@CS.Berkeley.EDU" instead of using the
11063857Sericlocal hostname.  Internally this is effected by using
11157246Seric"MASQUERADE_AS(CS.Berkeley.EDU)".
11251220Seric
11351268Seric	MAILER(smtp)
11451220Seric
11551309SericThese describe the mailers used at the default CS site site.  The
11651309Sericlocal mailer is always included automatically.
11751220Seric
11858087Seric
11957246Seric+--------+
12057246Seric| OSTYPE |
12157246Seric+--------+
12257246Seric
12351220SericNote that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes
12451220Sericdefault Computer Science Division environment.  There are several
12557247Sericexplicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1,
12657247Sericriscos4.5, sunos3.5, sunos4.1, and ultrix4.1.  These change things
12757247Sericlike the location of the alias file and queue directory.  Some of
12857247Sericthese files are identical to one another.
12951220Seric
13057246SericOperating system definitions are easy to write.  They may define
13157246Sericthe following variables (everything defaults, so an ostype file
13257246Sericmay be empty).
13351220Seric
13457246SericALIAS_FILE		[/etc/aliases] The location of the text version
13559761Seric			of the alias file(s).  It can be a comma-separated
13659761Seric			list of names.
13757246SericHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
13857246Seric			containing information printed in response to
13957246Seric			the SMTP HELP command.
14057246SericQUEUE_DIR		[/var/spool/mqueue] The directory containing
14157246Seric			queue files.
14257246SericSTATUS_FILE		[/etc/sendmail.st] The file containing status
14357246Seric			information.
14458087SericLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
14564153SericLOCAL_MAILER_FLAGS	[rmn] The flags used by the local mailer.  The
14664153Seric			flags lsDFM are always included.
14763761SericLOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
14863761Seric			mail.
14958087SericLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
15063791SericLOCAL_SHELL_FLAGS	[eu] The flags used by the shell mailer.  The
15163791Seric			flags lsDFM are always included.
15263791SericLOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
15363791Seric			mail.
15458087SericUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
15558087Seric			used to submit news.
15658087SericUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
15758087SericUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
15858087Seric			usenet mailer.
15963857SericSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
16063857Seric			flags are `mDFMUX' (and `a' for esmtp mailer).
16163857SericUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
16263857Seric			flags are `DFMhuU' (and `m' for suucp mailer, minus
16363857Seric			`U' for uucp-dom mailer).
16463761SericUUCP_MAILER_ARGS	[uux - -r -z -a$f -gC $h!rmail ($u)] The arguments
16563761Seric			passed to the UUCP mailer.
16663791SericUUCP_MAX_SIZE		[100000] The maximum size message accepted for
16763791Seric			transmission by the UUCP mailers.
16857246SericHOSTMAP_SPEC		[dbm -o /etc/hostmap] The value for the builtin
16957246Seric			hostmap key definition.  You can redefine this
17057246Seric			to change the class, flags, and filename of
17157246Seric			the hostmap.  The default flag (-o) makes this
17257246Seric			map optional.
17357246Seric
17457246Seric+---------+
17557246Seric| DOMAINS |
17657246Seric+---------+
17757246Seric
17857246SericYou will probably want to collect domain-dependent defines into one
17957246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
18057246Sericdomain file includes definitions for several internal distinguished
18157246Serichosts:
18257246Seric
18357246SericUUCP_RELAY	The host that will forward UUCP-addressed email.
18457246Seric		If not defined, all UUCP sites must be directly
18564028Seric		connected.
18657246SericBITNET_RELAY	The host that will forward BITNET-addressed email.
18757246Seric		If not defined, the .BITNET pseudo-domain won't work.
18857246SericCSNET_RELAY	The host that will forward CSNET-addressed email.
18957246Seric		If not defined, the .CSNET pseudo-domain won't work.
19057246SericLOCAL_RELAY	The site that will handle unqualified names -- that
19157246Seric		is, names with out an @domain extension.  If not set,
19257246Seric		they are assumed to belong on this machine.  This
19357246Seric		allows you to have a central site to store a
19457246Seric		company- or department-wide alias database.  This
19557246Seric		only works at small sites, and there are better
19664028Seric		methods.
19757246Seric
19864028SericEach of these can be either ``mailer:hostname'' (in which case the
19964028Sericmailer is the internal mailer name, such as ``suucp'' and the hostname
20064028Sericis the name of the host as appropriate for that mailer) or just a
20164028Seric``hostname'', in which case a default mailer type (usually ``relay'',
20264153Serica variant on SMTP) is used.  WARNING: if you have a wildcard MX
20364153Sericrecord matching your domain, you probably want to define these to
20464153Serichave a trailing dot so that you won't get the mail diverted back
20564153Sericto yourself.
20664028Seric
20757246SericThe domain file can also be used to define a domain name, if needed
20857982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
20957982Sericat your site masquerade behind one email name, you could also use
21057982SericMASQUERADE_AS here.
21157246Seric
21258408SericYou do not have to define a domain -- in particular, if you are a
21358408Sericsingle machine sitting off somewhere, it is probably more work than
21458408Sericit's worth.  This is just a mechanism for combining "domain dependent
21558408Sericknowledge" into one place.
21658408Seric
21757246Seric+---------+
21857246Seric| MAILERS |
21957246Seric+---------+
22057246Seric
22151220SericThere are fewer mailers supported in this version than the previous
22251220Sericversion, owing mostly to a simpler world.
22351220Seric
22451220Sericlocal		The local and prog mailers.  You will almost always
22551220Seric		need these; the only exception is if you relay ALL
22657247Seric		your mail to another site.  This mailer is included
22757247Seric		automatically.
22851220Seric
22951220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
23051220Seric		not hide hosts behind a gateway or another other
23151220Seric		such hack; it assumes a world where everyone is
23263761Seric		running the name server.  This file actually defines
23363761Seric		three mailers: "smtp" for regular (old-style) SMTP to
23463761Seric		other servers, "esmtp" for extended SMTP to other
23563761Seric		servers, and "relay" for transmission to our
23663761Seric		RELAY_HOST or MAILER_HUB.
23751220Seric
23851220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
23951220Seric		defines two mailers, "uucp" and "suucp".  The latter
24051220Seric		is for when you know that the UUCP mailer at the other
24151220Seric		end can handle multiple recipients in one transfer.
24257246Seric		When you invoke this, sendmail looks for all names in
24357246Seric		the $=U class and sends them to the uucp mailer; all
24457246Seric		names in the $=Y class are sent to suucp.  Note that
24557246Seric		this is a function of what version of rmail runs on
24657246Seric		the receiving end, and hence may be out of your control.
24763857Seric		If smtp is defined, it also defines a "uucp-dom" mailer
24863857Seric		that uses domain-style rewriting.
24951220Seric
25058087Sericusenet		Usenet (network news) delivery.  If this is specified,
25158087Seric		an extra rule is added to ruleset 0 that forwards all
25258087Seric		local email for users named ``group.usenet'' to the
25358087Seric		``inews'' program.  Note that this works for all groups,
25458087Seric		and may be considered a security problem.
25558087Seric
25658363Sericfax		Facsimile transmission.  This is experimental and based
25758363Seric		on Sam Leffler's FlexFAX software.  For more information,
25858363Seric		see below.
25958087Seric
26058363Seric
26157246Seric+----------+
26257246Seric| FEATURES |
26357246Seric+----------+
26451268Seric
26557246SericSpecial features can be requested using the "FEATURE" macro.  For
26657246Sericexample, the .mc line:
26757246Seric
26857246Seric	FEATURE(use_cw_file)
26957246Seric
27057246Serictells sendmail that you want to have it read an /etc/sendmail.cw
27158782Sericfile to get values for class $=w.  The FEATURE may contain a single
27258782Sericoptional parameter -- for example:
27357246Seric
27458782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
27558782Seric
27658782SericAvailable features are:
27758782Seric
27857246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
27957246Seric		names for this host.  This might be used if you were
28057246Seric		on a host that MXed for a dynamic set of other
28157246Seric		hosts.  If the set is static, just including the line
28257246Seric		"Cw<name1> <name2> ..." is probably superior.
28358408Seric		The actual filename can be overridden by redefining
28458408Seric		confCW_FILE.
28564324Seric
28658087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
28758087Seric		a ``551 User not local; please try <address>'' message.
28858087Seric		If this is set, you can alias people who have left
28958087Seric		to their new address with ".REDIRECT" appended.
29064324Seric
29158284Sericnouucp		Don't do anything special with UUCP addresses at all.
29264324Seric
29359080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
29459080Seric		This would generally only be used by sites that only
29559080Seric		act as mail gateways or which have user agents that do
29664028Seric		full canonification themselves.  You may also want to
29764028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
29864028Seric		turn off the usual resolver options that do a similar
29964028Seric		thing.
30064324Seric
30158526Sericnotsticky	By default, email sent to "user@local.host" are marked
30258526Seric		as "sticky" -- that is, the local addresses aren't
30358526Seric		matched against UDB and don't go through ruleset 5.
30458526Seric		This features disables this treatment.  It would
30558526Seric		normally be used on network gateway machines.
30664324Seric
30758782Sericmailertable	Include a "mailer table" which can be used to override
30858782Seric		routing for particular domains.  The argument of the
30958782Seric		FEATURE may be the key definition.  If none is specified,
31058782Seric		the definition used is:
31164164Seric			hash -o /etc/mailertable
31263761Seric		Keys in this database are fully qualified domain names
31363761Seric		or partial domains preceded by a dot -- for example,
31463761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
31563761Seric		Values must be of the form:
31658782Seric			mailer:domain
31763761Seric		where "mailer" is the internal mailer name, and "domain"
31863761Seric		is where to send the message.  These maps are not
31963761Seric		reflected into the message header.
32064324Seric
32163761Sericdomaintable	Include a "domain table" which can be used to provide
32263761Seric		full domains on unqualified (single word) hosts.  The
32363761Seric		argument of the FEATURE may be the key definition.  If
32463761Seric		none is specified, the definition used is:
32564164Seric			hash -o /etc/domaintable
32663761Seric		The key in this table is the unqualified host name; the
32763761Seric		value is the fully qualified domain.  Anything in the
32863761Seric		domaintable is reflected into headers; that is, this
32963761Seric		is done in ruleset 3.
33064324Seric
33159034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
33259034Seric		internet addresses.  The table can be built using the
33364153Seric		bitdomain program contributed by John Gardiner Myers.
33459034Seric		The argument of the FEATURE may be the key definition; if
33559034Seric		none is specified, the definition used is:
33664164Seric			hash -o /etc/bitdomain.db
33759034Seric		Keys are the bitnet hostname; values are the corresponding
33859034Seric		internet hostname.
33964324Seric
34059037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
34159037Seric		is:
34264164Seric			hash -o /etc/uudomain.db
34359037Seric		At the moment there is no automagic tool to build this
34459037Seric		database.
34564324Seric
34660263Sericalways_add_domain
34760263Seric		Include the local host domain even on locally delivered
34860263Seric		mail.  Normally it is not added unless it is already
34960263Seric		present.
35064324Seric
35163761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
35263761Seric		feature will cause recipient addresses to also masquerade
35363761Seric		as being from the masquerade host.  Normally they get
35463761Seric		the local hostname.  Although this may be right for
35563761Seric		ordinary users, it can break local aliases.  For example,
35663761Seric		if you send to "localalias", the originating sendmail will
35763761Seric		find that alias and send to all members, but send the
35863761Seric		message with "To: localalias@masqueradehost".  Since that
35963761Seric		alias likely does not exist, replies will fail.  Use this
36063761Seric		feature ONLY if you can guarantee that the ENTIRE
36163761Seric		namespace on your masquerade host supersets all the
36263761Seric		local entries.
36364324Seric
36464153Sericnodns		We aren't running DNS at our site (for example,
36564153Seric		we are UUCP-only connected).  It's hard to consider
36664153Seric		this a "feature", but hey, it had to go somewhere.
36757246Seric
36864324Sericnullclient	This is a special case -- it creates a stripped down
36964324Seric		configuration file containing nothing but support for
37064394Seric		forwarding all mail to a central hub via a local
37164394Seric		SMTP-based network.  The argument is the name of that
37264394Seric		hub.
37364394Seric
37464394Seric		The only other feature that should be used in conjunction
37564394Seric		with this one is "nocanonify" (this causes addresses to
37664394Seric		be sent unqualified via the SMTP connection; normally
37764394Seric		they are qualifed with the masquerade name, which
37864394Seric		defaults to the name of the hub machine).  No mailers
37964394Seric		should be defined.  No aliasing or forwarding is done.
38057246Seric
38164324Seric
38257246Seric+-------+
38357246Seric| HACKS |
38457246Seric+-------+
38557246Seric
38657246SericSome things just can't be called features.  To make this clear,
38757247Sericthey go in the hack subdirectory and are referenced using the HACK
38857246Sericmacro.  These will tend to be site-dependent.  The release
38957246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
39057246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
39157246Sericthis is intended as a short-term aid while we move hosts into
39257246Sericsubdomains.
39357246Seric
39458087Seric
39557246Seric+--------------------+
39657246Seric| SITE CONFIGURATION |
39757246Seric+--------------------+
39857246Seric
39957246SericComplex sites will need more local configuration information, such as
40057246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
40157246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
40257246Seric
40357246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
40457246Sericconfiguration information stored in the siteconfig subdirectory.  For
40557246Sericexample, the line
40657246Seric
40757246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
40857246Seric
40957246Sericreads the file uucp.ucbvax for local connection information.  The
41057246Sericsecond parameter is the local name (in this case just "ucbvax" since
41157246Sericit is locally connected, and hence a UUCP hostname) and the name of
41257246Sericthe class in which to store the host information.  Another SITECONFIG
41357246Sericline reads
41457246Seric
41557246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
41657246Seric
41757246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
41857246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
41957246Sericstore this list.  [The machine ucbarpa is gone now, but I've left
42057246Sericthis out-of-date configuration file around to demonstrate how you
42157246Sericmight do this.]
42257246Seric
42357246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
42457246Sericmore than a sequence of SITE macros describing connectivity.  For
42557246Sericexample:
42657246Seric
42757246Seric	SITE(cnmat)
42857246Seric	SITE(sgi olympus)
42957246Seric
43057246SericThe second example demonstrates that you can use two names on the
43157246Sericsame line; these are usually aliases for the same host (or are at
43257246Sericleast in the same company).
43357246Seric
43458087Seric
43557246Seric+-------------------+
43657246Seric| TWEAKING RULESETS |
43757246Seric+-------------------+
43857246Seric
43951268SericFor more complex configurations, you can define special rules.
44051268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
44151268Sericthe names.  Any modifications made here are reflected in the header.
44251268Seric
44351268SericA common use is to convert old UUCP addreses to SMTP addresses using
44451268Sericthe UUCPSMTP macro.  For example:
44551268Seric
44651268Seric	LOCAL_RULE_3
44751268Seric	UUCPSMTP(decvax,	decvax.dec.com)
44851268Seric	UUCPSMTP(research,	research.att.com)
44951268Seric
45051268Sericwill cause addresses of the form "decvax!user" and "research!user"
45151268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
45251268Sericrespectively.
45351268Seric
45457246SericThis could also be used to look hosts in a database map:
45557246Seric
45657246Seric	LOCAL_RULE_3
45757246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
45857246Seric
45957246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
46057246Seric
46151268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
46251268SericFor example, new rules are needed to parse hostnames that you accept
46351309Sericvia MX records.  For example, you might have:
46451268Seric
46551309Seric	LOCAL_RULE_0
46651309Seric	R$+ < @ cnmat.Berkeley.EDU >	$#uucp $@ cnmat $: $1
46751309Seric
46851309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
46951309Sericpointing at this host; this rule catches the message and forwards it on
47051309Sericusing UUCP.
47151309Seric
47258681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
47358681SericThese rulesets are normally empty.
47458681Seric
47557246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
47657246Sericboilerplate option setting but before rulesets, and can be used to
47757945Sericdeclare local database maps or whatever.  For example:
47851268Seric
47957246Seric	LOCAL_CONFIG
48057246Seric	Khostmap hash /etc/hostmap.db
48157246Seric	Kyplocal nis -m hosts.byname
48251220Seric
48358087Seric
48457246Seric+---------------------------+
48557246Seric| MASQUERADING AND RELAYING |
48657246Seric+---------------------------+
48757246Seric
48857246SericYou can have your host masquerade as another using
48957246Seric
49057246Seric	MASQUERADE_AS(host.domain)
49157246Seric
49257246SericThis causes outgoing SMTP mail to be labelled as coming from the
49357246Sericindicated domain, rather than $j.  One normally masquerades as one
49457246Sericof your own subdomains (for example, it's unlikely that I would
49557246Sericchoose to masquerade as an MIT site).
49657246Seric
49764153SericThe masquerade name is not normally canonified, so it is important
49864153Sericthat it be your One True Name, that is, fully qualified and not a
49964153SericCNAME.
50064153Seric
50157246Sericthere are always users that need to be "exposed" -- that is, their
50257246Sericinternal site name should be displayed instead of the masquerade name.
50357246SericRoot is an example.  You can add users to this list using
50457246Seric
50557246Seric	EXPOSED_USER(usernames)
50657246Seric
50757246SericThis adds users to class E; you could also use something like
50857246Seric
50957246Seric	FE/etc/sendmail.cE
51057246Seric
51157246SericYou can also arrange to relay all unqualified names (that is, names
51257246Sericwithout @host) to a relay host.  For example, if you have a central
51357246Sericemail server, you might relay to that host so that users don't have
51457246Sericto have .forward files or aliases.  You can do this using
51557246Seric
51658071Seric	define(`LOCAL_RELAY', mailer:hostname)
51757246Seric
51858071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
51958071Seric"smtp".  There are some user names that you don't want relayed, perhaps
52058071Sericbecause of local aliases.  A common example is root, which may be
52158071Sericlocally aliased.  You can add entries to this list using
52257246Seric
52357246Seric	LOCAL_USER(usernames)
52457246Seric
52557246SericThis adds users to class L; you could also use something like
52657246Seric
52757246Seric	FL/etc/sendmail.cL
52857246Seric
52964153SericIf you want all incoming mail sent to a centralized hub, as for a
53064153Sericshared /var/spool/mail scheme, use
53157591Seric
53258071Seric	define(`MAIL_HUB', mailer:hostname)
53357591Seric
53458071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
53558071Sericand MAIL_HUB, unqualified names and names in class L will be sent to
53658071Sericthe LOCAL_RELAY and other local names will be sent to MAIL_HUB.  For
53758071Sericexample, if are on machine mastodon.CS.Berkeley.EDU, the following
53858071Sericcombinations of settings will have the indicated effects:
53957591Seric
54057591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
54157591Seric
54257591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
54357591Sericmail.CS.Berkeley.EDU
54457591Seric
54557591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
54657591Sericmammoth.CS.Berkeley.EDU
54757591Seric
54857591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
54957591SericMAIL_HUB set as above
55057591Seric
55164153SericIf you want all outgoing mail to go to a central relay site, define
55264153SericSMART_HOST as well.  Briefly:
55358071Seric
55464153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
55564153Seric	MAIL_HUB applies to names qualified with the name of the
55664153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
55764153Seric	SMART_HOST applies to names qualified with other hosts.
55864153Seric
55964153SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and
56064153SericFAX_RELAY) take precedence over SMART_HOST, so if you really want
56164153Sericabsolutely everything to go to a single central site you will need to
56264153Sericunset all the other relays -- or better yet, find or build a minimal
56364153Sericconfig file that does this.
56464153Seric
56564153Seric
56658071Seric+-------------------------------+
56758071Seric| NON-SMTP BASED CONFIGURATIONS |
56858071Seric+-------------------------------+
56958071Seric
57058071SericThese configuration files are designed primarily for use by SMTP-based
57158071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
57258071SericUUCP-primarily nodes (the latter is defined as a small local net
57358071Sericconnected to the rest of the world via UUCP).  However, there is one
57458071Serichook to handle some special cases.
57558071Seric
57658071SericYou can define a ``smart host'' that understands a richer address syntax
57758071Sericusing:
57858071Seric
57958071Seric	define(`SMART_HOST', mailer:hostname)
58058071Seric
58164028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
58258071Sericcan't be handled using the usual UUCP rules are passed to this host.
58358071Seric
58458071SericIf you are on a local SMTP-based net that connects to the outside
58558071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
58658071SericFor example:
58758071Seric
58858071Seric	define(`SMART_HOST', suucp:uunet)
58958071Seric	LOCAL_NET_CONFIG
59063761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
59158071Seric
59258071SericThis will cause all names that end in your domain name ($m) via
59358071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
59463761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
59563761Sericthe $m.  If you are running a local DNS inside your domain which is
59663761Sericnot otherwise connected to the outside world, you probably want to
59763761Sericuse:
59858071Seric
59963761Seric	define(`SMART_HOST', smtp:fire.wall.com)
60063761Seric	LOCAL_NET_CONFIG
60163761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
60258071Seric
60363761SericThat is, send directly only to things you found in your DNS lookup;
60463761Sericanything else goes through SMART_HOST.
60563761Seric
60664153SericIf you are not running DNS at all, it is important to use
60764153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
60864153Sericfor the name server to come up.
60963761Seric
61064153Seric
61164259Seric+-----------+
61264259Seric| WHO AM I? |
61364259Seric+-----------+
61464259Seric
61564259SericNormally, the $j macro is automatically defined to be your fully
61664259Sericqualified domain name (FQDN).  Sendmail does this by getting your
61764259Serichost name using gethostname and then calling gethostbyname on the
61864259Sericresult.  For example, in some environments gethostname returns
61964259Sericonly the root of the host name (such as "foo"); gethostbyname is
62064259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
62164259Sericcases, gethostbyname may fail to return the FQDN.  In this case
62264259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
62364259Sericname.  This is usually done using:
62464259Seric
62564259Seric	Dmbar.com
62664259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
62764259Seric
62864259Seric
62964028Seric+--------------------+
63064028Seric| USING MAILERTABLES |
63164028Seric+--------------------+
63264028Seric
63364028SericTo use FEATURE(mailertable), you will have to create an external
63464028Sericdatabase containing the routing information for various domains.
63564028SericFor example, a mailertable file in text format might be:
63664028Seric
63764028Seric	.my.domain		xnet:%1.my.domain
63864028Seric	uuhost1.my.domain	suucp:uuhost1
63964028Seric	.bitnet			smtp:relay.bit.net
64064028Seric
64164028SericThis should normally be stored in /etc/mailertable.  The actual
64264028Sericdatabase version of the mailertable is built using:
64364028Seric
64464028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
64564028Seric
64664028SericThe semantics are simple.  Any LHS entry that does not begin with
64764028Serica dot matches the full host name indicated.  LHS entries beginning
64864028Sericwith a dot match anything ending with that domain name -- that is,
64964028Sericthey can be thought of as having a leading "*" wildcard.  Matching
65064028Sericis done in order of most-to-least qualified -- for example, even
65164028Sericthough ".my.domain" is listed first in the above example, an entry
65264028Sericof "uuhost1.my.domain" will match the second entry since it is
65364028Sericmore explicit.
65464028Seric
65564028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
65664028Sericconfiguration name of a mailer (that is, an `M' line in the
65764028Sericsendmail.cf file).  The "host" will be the hostname passed to
65864028Sericthat mailer.  In domain-based matches (that is, those with leading
65964028Sericdots) the "%1" may be used to interpolate the wildcarded part of
66064028Sericthe host name.  For example, the first line above sends everything
66164028Sericaddressed to "anything.my.domain" to that same host name, but using
66264028Sericthe (presumably experimental) xnet mailer.
66364028Seric
66464028Seric
66564153Seric+--------------------------------+
66664153Seric| USING USERDB TO MAP FULL NAMES |
66764153Seric+--------------------------------+
66864153Seric
66964153SericThe user database was not originally intended for mapping full names
67064153Sericto login names (e.g., Eric.Allman => eric), but some people are using
67164153Sericit that way.  (I would recommend that you set up aliases for this
67264153Sericpurpose instead -- since you can specify multiple alias files, this
67364153Sericis fairly easy.)  The intent was to locate the default maildrop at
67464153Serica site, but allow you to override this by sending to a specific host.
67564153Seric
67664153SericIf you decide to set up the user database in this fashion, it is
67764153Sericimperative that you also specify FEATURE(notsticky) -- otherwise,
67864153Serice-mail sent to Full.Name@local.host.name will be rejected.
67964153Seric
68064259SericTo build the internal form of the user databae, use:
68164153Seric
68264259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
68364259Seric
68464259Seric
68558363Seric+------------------+
68658363Seric| FlexFAX SOFTWARE |
68758363Seric+------------------+
68858363Seric
68958363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
69058363Sericpublic version out "later this week" [as of 3/1/93].  The following
69158363Sericblurb is direct from Sam:
69258363Seric
69364498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
69458363Seric
69558363Seric	How To Obtain This Software (in case all you get is this file)
69664498Seric	--------------------------------------------------------------
69758363Seric	The source code is available for public ftp on
69864498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
69958363Seric		(192.48.153.1)
70058363Seric
70158363Seric	You can also obtain inst'able images for Silicon Graphics machines from
70264498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
70358363Seric		(192.48.153.1)
70458363Seric
70558363Seric	For example,
70658363Seric	    % ftp -n sgi.com
70758363Seric	    ....
70858363Seric	    ftp> user anonymous
70958363Seric	    ... <type in password>
71058363Seric	    ftp> cd sgi/fax
71158363Seric	    ftp> binary
71264498Seric	    ftp> get v2.1.src.tar.Z
71358363Seric
71464498Seric	In general, the latest version of the 2.1 release of the software is
71564498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
71664498Seric	directory.  This file is a link to the appropriate released version (so
71764498Seric	don't waste your time retrieving the linked file as well!) Any files of
71864498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
71964498Seric	versions of the source code.  For example, the file v2.1.0.patch would
72064498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
72164498Seric	different than the naming conventions used during beta testing.) Patch
72264498Seric	files only work to go between consecutive versions, so if you are
72364498Seric	multiple versions behind the latest release, you will need to apply
72464498Seric	each patch file between your current version and the latest.
72564498Seric
72664498Seric
72764498Seric	Obtaining the Software by Electronic Mail
72864498Seric	-----------------------------------------
72964498Seric	Do not send me requests for the software; they will be ignored (without
73064498Seric	response).  If you cannot use FTP at all, there is a service called
73164498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
73264498Seric	this machine and it will use FTP to retrieve files for you and send you
73364498Seric	the files back again via e-mail.  To find out more about the ftpmail
73458363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
73558363Seric	consists of the single line "help".
73658363Seric
73764498Seric
73864498Seric	Obtaining the Software Within Silicon Graphics
73964498Seric	----------------------------------------------
74058363Seric	Internal to Silicon Graphics there are inst'able images on the host
74164498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
74258363Seric
74364498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
74458363Seric
74564498Seric	to install the latest version of the software on your machine.
74658363Seric
74764498Seric
74864498Seric	What to do Once You've Retrieved Stuff
74964498Seric	--------------------------------------
75058363Seric	The external distributions come in a compressed or uncompressed tar
75158363Seric	file.  To extract the source distribution:
75258363Seric
75364498Seric	    % zcat v2.1.src.tar.Z | tar xf -
75458363Seric
75558363Seric	(uncompress and extract individual files in current directory).  To
75658363Seric	unpack and install the client portion of the inst'able distribution:
75758363Seric
75858363Seric	    % mkdir dist
75964498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
76058363Seric	    % inst -f dist/flexfax
76158363Seric	    ...
76258363Seric	    inst> go
76358363Seric
76458363Seric	(Note, the dist subdirectory is because some versions of inst fail if
76564498Seric	the files are in the current directory.) Server binaries are also
76664498Seric	included in the inst'able images as flexfax.server.*.  They are not
76764498Seric	installed by default, so to get them also you need to do:
76858363Seric
76958363Seric	    % inst -f flexfax
77058363Seric	    ...
77158363Seric	    inst> install flexfax.server.*
77258363Seric	    inst> go
77358363Seric
77464498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
77558363Seric	system.  They should work w/o problem on earlier versions of the
77658363Seric	system, but I have not fully tested this.  Also, note that to install a
77758363Seric	server on an SGI machine, you need to have installed the Display
77858363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
77958363Seric	server will not be able to convert PostScript to facsimile for
78058363Seric	transmission.
78158363Seric
78264498Seric	If you are working from the source distribution, look at the file
78364498Seric	README in the top of the source tree.  If you are working from the inst
78464498Seric	images, the subsystem flexfax.man.readme contains the README file and
78564498Seric	other useful pieces of information--the installed files are placed in
78664498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
78764498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
78864498Seric	the README file and the manual page for faxaddmodem for information.
78958363Seric
79058363Seric
79164498Seric	FlexFAX Mail List
79264498Seric	-----------------
79358363Seric	A mailing list for users of this software is located on sgi.com.
79458363Seric	If you want to join this mailing list or have a list-related request
79558363Seric	such as getting your name removed from it, send a request to
79658363Seric
79764498Seric	    majordomo@whizzer.wpd.sgi.com
79858363Seric
79964498Seric	For example, to subscribe, send the line "subscribe flexfax" in
80064498Seric	the body of your message.  The line "help" will return a list of
80164498Seric	the commands understood by the mailing list management software.
80264498Seric
80358363Seric	Submissions (including bug reports) should be directed to:
80458363Seric
80558363Seric	    flexfax@sgi.com
80658363Seric
80764498Seric	When corresponding about this software please always specify what
80864498Seric	version you have, what system you're running on, and, if the problem is
80964498Seric	specific to your modem, identify the modem and firmware revision.
81058363Seric
81164498Seric
81257945Seric+--------------------------------+
81357945Seric| TWEAKING CONFIGURATION OPTIONS |
81457945Seric+--------------------------------+
81557945Seric
81657945SericThere are a large number of configuration options that don't normally
81757945Sericneed to be changed.  However, if you feel you need to tweak them, you
81857945Sericcan define the following M4 variables.  This list is shown in four
81957945Sericcolumns:  the name you define, the default value for that definition,
82057945Sericthe option or macro that is affected (either Ox for an option or Dx
82157945Sericfor a macro), and a brief description.  Greater detail of the semantics
82257945Sericcan be found in the Installation and Operations Guide.
82357945Seric
82463582SericSome options are likely to be deprecated in future versions -- that is,
82563582Sericthe option is only included to provide back-compatibility.  These are
82663582Sericmarked with "*".
82763582Seric
828*65002SericRemember that these options are M4 variables, and hence may need to
829*65002Sericbe quoted.  In particular, arguments with commas will usually have to
830*65002Sericbe ``double quoted, like this phrase'' to avoid having the comma
831*65002Sericconfuse things.  This is common for alias file definitions and for
832*65002Sericthe read timeout.
833*65002Seric
83457945SericM4 Variable Name	Default		Mac/Opt	Description
835*65002Seric================	=======		=======	===========
83657945SericconfMAILER_NAME		MAILER-DAEMON	Dn	The sender name used for
83757945Seric						internally generated
83857945Seric						outgoing messages.
83958681SericconfFROM_LINE		From $g  $d	Dl	The From_ line used when
84058681Seric						sending to files or programs.
84157945SericconfFROM_HEADER		$?x$x <$g>$|$g$.	The format of an internally
84257945Seric					Dq	generated From: address.
84357945SericconfOPERATORS		.:%@!^/[]	Do	Address operator characters.
84464153SericconfSMTP_LOGIN_MSG	$j Sendmail $v/$Z ready at $b
84557945Seric					De	The initial (spontaneous)
84657945Seric						SMTP greeting message.
84759743SericconfSEVEN_BIT_INPUT	False		O7	Force input to seven bits?
84857945SericconfALIAS_WAIT		10		Oa	Wait (in minutes) for alias
84957945Seric						file rebuild.
85058087SericconfMIN_FREE_BLOCKS	4		Ob	Minimum number of free blocks
85158087Seric						on queue filesystem to accept
85258087Seric						SMTP mail.
85357945SericconfBLANK_SUB		.		OB	Blank (space) substitution
85457945Seric						character.
85557945SericconfCON_EXPENSIVE	False		Oc	Connect immediately to
85657945Seric						mailers marked expensive?
85757945SericconfCHECKPOINT_INTERVAL	10		OC	Checkpoint queue files
85857945Seric						every N recipients.
85957945SericconfDELIVERY_MODE	background	Od	Default delivery mode.
86057945SericconfAUTO_REBUILD	False		OD	Automatically rebuild
86157945Seric						alias file if needed.
86257945SericconfERROR_MODE		(undefined)	Oe	Error message mode.
86357945SericconfERROR_MESSAGE	(undefined)	OE	Error message header/file.
86457945SericconfSAVE_FROM_LINES	False		Of	Save extra leading
86557945Seric						From_ lines.
86657945SericconfTEMP_FILE_MODE	0600		OF	Temporary file mode.
86757945SericconfDEF_GROUP_ID	1		Og	Default group id.
86857945SericconfMATCH_GECOS		False		OG	Match GECOS field.
86957945SericconfMAX_HOP		17		Oh	Maximum hop count.
87063582SericconfIGNORE_DOTS		False		Oi *	Ignore dot as terminator
87157945Seric						for incoming messages?
87257945SericconfBIND_OPTS		(empty)		OI	Default options for BIND.
87363582SericconfMIME_FORMAT_ERRORS	True		Oj *	Send error messages as MIME-
87459743Seric						encapsulated messages per
87559743Seric						RFC 1344.
87664153SericconfFORWARD_PATH	(undefined)	OJ	The colon-separated list of
87764153Seric						places to search for .forward
87864153Seric						files.
87957945SericconfMCI_CACHE_SIZE	2		Ok	Size of open connection cache.
88057945SericconfMCI_CACHE_TIMEOUT	5m		OK	Open connection cache timeout.
88163582SericconfUSE_ERRORS_TO	False		Ol *	Use the Errors-To: header to
88263582Seric						deliver error messages.  This
88363582Seric						should not be necessary because
88463582Seric						of general acceptance of the
88563582Seric						envelope/header distinction.
88657945SericconfLOG_LEVEL		9		OL	Log level.
88757945SericconfME_TOO		False		Om	Include sender in group
88857945Seric						expansions.
88957945SericconfCHECK_ALIASES	True		On	Check RHS of aliases when
89057945Seric						running newaliases.
89163582SericconfOLD_STYLE_HEADERS	True		Oo *	Assume that headers without
89257945Seric						special chars are old style.
89358859SericconfDAEMON_OPTIONS	(undefined)	OO	SMTP daemon options.
89458806SericconfPRIVACY_FLAGS	authwarnings	Op	Privacy flags.
89557945SericconfCOPY_ERRORS_TO	(undefined)	OP	Address for additional copies
89657945Seric						of all error messages.
89757945SericconfQUEUE_FACTOR	(undefined)	Oq	Slope of queue-only function
89858116SericconfREAD_TIMEOUT	(undefined)	Or	SMTP read timeouts.
89963582SericconfSAFE_QUEUE		True		Os *	Commit all messages to disk
90057945Seric						before forking.
90158806SericconfMESSAGE_TIMEOUT	5d/4h		OT	Timeout for messages before
90258806Seric						sending error/warning message.
90359317SericconfTIME_ZONE		USE_SYSTEM	Ot	Time zone info -- can be
90457945Seric						USE_SYSTEM to use the system's
90557945Seric						idea, USE_TZ to use the user's
90657945Seric						TZ envariable, or something
90757945Seric						else to force that value.
90857945SericconfDEF_USER_ID		1		Ou	Default user id.
90958718SericconfUSERDB_SPEC		(undefined)	OU	User database specification.
91058859SericconfFALLBACK_MX		(undefined)	OV	Fallback MX host.
91163857SericconfTRY_NULL_MX_LIST	False		Ow	If we are the best MX for a
91263857Seric						host and haven't made other
91363857Seric						arrangements, try connecting
91463857Seric						to the host directly; normally
91563857Seric						this would be a config error.
91657945SericconfQUEUE_LA		8		Ox	Load average at which queue-only
91757945Seric						function kicks in.
91857945SericconfREFUSE_LA		12		OX	Load average at which incoming
91957945Seric						SMTP connections are refused.
92063582SericconfWORK_RECIPIENT_FACTOR
92163582Seric			(undefined)	Oy	Cost of each recipient.
92263582SericconfSEPARATE_PROC	False		OY	Run all deliveries in a
92357945Seric						separate process.
92457945SericconfWORK_CLASS_FACTOR	(undefined)	Oz	Priority multiplier for class.
92557945SericconfWORK_TIME_FACTOR	(undefined)	OZ	Cost of each delivery attempt.
92658408SericconfCW_FILE		/etc/sendmail.cw	Name of file used to get the
92758408Seric					Fw	local additions to the $=w
92858408Seric						class.
92964153SericconfSMTP_MAILER		smtp		-	The mailer name used when
93063972Seric						SMTP connectivity is required.
93163972Seric						Either "smtp" or "esmtp".
93263999SericconfLOCAL_MAILER	local		-	The mailer name used when
93363999Seric						local connectivity is required.
93463999Seric						Almost always "local".
93564028SericconfRELAY_MAILER	relay		-	The default mailer name used
93664028Seric						for relaying any mail (e.g.,
93764028Seric						to a BITNET_RELAY, a
93864028Seric						SMART_HOST, or whatever).
93964028Seric						This can reasonably be "suucp"
94064028Seric						if you are on a UUCP-connected
94164028Seric						site.
94264259SericconfDOMAIN_NAME		(undefined)	Dj	If defined, sets $j.
94357945Seric
94458087Seric
94557246Seric+-----------+
94657246Seric| HIERARCHY |
94757246Seric+-----------+
94857246Seric
94951220SericWithin this directory are several subdirectories, to wit:
95051220Seric
95151220Sericm4		General support routines.  These are typically
95251220Seric		very important and should not be changed without
95357247Seric		very careful consideration.
95451220Seric
95551220Sericcf		The configuration files themselves.  They have
95651220Seric		".mc" suffixes, and must be run through m4 to
95751220Seric		become complete.  The resulting output should
95851220Seric		have a ".cf" suffix.
95951220Seric
96051220Sericostype		Definitions describing a particular operating
96151220Seric		system type.  These should always be referenced
96251220Seric		using the OSTYPE macro in the .mc file.  Examples
96351220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
96451220Seric		"sunos4.1".
96551220Seric
96651220Sericdomain		Definitions describing a particular domain, referenced
96751220Seric		using the DOMAIN macro in the .mc file.  These are
96851220Seric		site dependent; for example, we contribute "cs.exposed.m4"
96951220Seric		and "cs.hidden.m4" which both describe hosts in the
97051220Seric		CS.Berkeley.EDU subdomain; the former displays the local
97151220Seric		hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the
97251220Seric		latter does its best to hide the identity of the local
97351220Seric		workstation inside the CS subdomain.
97451220Seric
97551220Sericmailer		Descriptions of mailers.   These are referenced using
97651220Seric		the MAILER macro in the .mc file.
97751220Seric
97851220Sericsh		Shell files used when building the .cf file from the
97951220Seric		.mc file in the cf subdirectory.
98051220Seric
98151220Sericfeature		These hold special orthogonal features that you might
98251220Seric		want to include.  They should be referenced using
98351220Seric		the FEATURE macro.
98451220Seric
98551220Serichack		Local hacks.  These can be referenced using the HACK
98651220Seric		macro.  They shouldn't be of more than voyeuristic
98751220Seric		interest outside the .Berkeley.EDU domain, but who knows?
98851220Seric		We've all got our own peccadilloes.
98951220Seric
99051268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
99151268Seric		UUCP sites.
99251220Seric
99351268Seric
99457246Seric+------------------------+
99557246Seric| ADMINISTRATIVE DETAILS |
99657246Seric+------------------------+
99751220Seric
99851220SericThe following sections detail usage of certain internal parts of the
99951220Sericsendmail.cf file.  Read them carefully if you are trying to modify
100051220Sericthe current model.  If you find the above descriptions adequate, these
100151220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
100251220Seric
100351220SericRULESETS (* means built in to sendmail)
100451220Seric
100551220Seric   0 *	Parsing
100651220Seric   1 *	Sender rewriting
100751220Seric   2 *	Recipient rewriting
100851220Seric   3 *	Canonicalization
100951220Seric   4 *	Post cleanup
101054839Seric   5 *	Local address rewrite (after aliasing)
101160539Seric  1x	mailer rules (sender qualification)
101260539Seric  2x	mailer rules (recipient qualification)
101364801Seric  3x	mailer rules (sender header qualification)
101464801Seric  4x	mailer rules (recipient header qualification)
101564801Seric  5x	mailer subroutines (general)
101664801Seric  6x	mailer subroutines (general)
101764801Seric  7x	mailer subroutines (general)
101864801Seric  8x	reserved
101960539Seric  90	Mailertable host stripping
102060892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
102160892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
102263857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
102351220Seric
102451220Seric
102551220SericMAILERS
102651220Seric
102751220Seric   0	local, prog	local and program mailers
102851220Seric   1	smtp		SMTP channel
102958087Seric   2	uucp		UNIX-to-UNIX Copy Program
103058087Seric   3	netnews		Network News delivery
103158363Seric   4	fax		Sam Leffler's FlexFAX software
103251220Seric
103351220Seric
103451220SericMACROS
103551220Seric
103651220Seric   A
103751220Seric   B	Bitnet Relay
103851220Seric   C	CSNET Relay
103954839Seric   D	The local domain -- usually not needed
104051220Seric   E
104158363Seric   F	FAX Relay
104251220Seric   G
104357591Seric   H	mail Hub (for mail clusters)
104451220Seric   I
104551220Seric   J
104651220Seric   K
104751220Seric   L
104851220Seric   M	Masquerade (who I claim to be)
104951220Seric   N
105051220Seric   O
105151220Seric   P
105251220Seric   Q
105351220Seric   R	Relay (for unqualified names)
105458071Seric   S	Smart Host
105551220Seric   T
105651309Seric   U	my UUCP name (if I have a UUCP connection)
105751309Seric   V	UUCP Relay (class V hosts)
105851220Seric   W	UUCP Relay (class W hosts)
105951220Seric   X	UUCP Relay (class X hosts)
106051309Seric   Y	UUCP Relay (all other hosts)
106151220Seric   Z	Version number
106251220Seric
106351220Seric
106451220SericCLASSES
106551220Seric
106651220Seric   A
106751220Seric   B
106851220Seric   C
106951220Seric   D
107057246Seric   E	addresses that should not seem to come from $M
107154839Seric   F	hosts we forward for
107251220Seric   G
107351220Seric   H
107451220Seric   I
107551220Seric   J
107651220Seric   K
107751220Seric   L	addresses that should not be forwarded to $R
107851220Seric   M
107951220Seric   N
108051220Seric   O	operators that indicate network operations (cannot be in local names)
108160211Seric   P	top level pseudo-domains: BITNET, FAX, UUCP, etc.
108251220Seric   Q
108351220Seric   R
108451220Seric   S
108551220Seric   T
108651220Seric   U	locally connected UUCP hosts
108751309Seric   V	UUCP hosts connected to relay $V
108851309Seric   W	UUCP hosts connected to relay $W
108951309Seric   X	UUCP hosts connected to relay $X
109051309Seric   Y	locally connected smart UUCP hosts
109164153Seric   Z	locally connected domain-ized UUCP hosts
109254839Seric   .	the class containing only a dot
109351220Seric
109451220Seric
109551220SericM4 DIVERSIONS
109651220Seric
109758071Seric   1	Local host detection and resolution
109858071Seric   2	Local Ruleset 3 additions
109958071Seric   3	Local Ruleset 0 additions
110051268Seric   4	UUCP Ruleset 0 additions
110151309Seric   5	locally interpreted names (overrides $R)
110254839Seric   6	local configuration (at top of file)
110351220Seric   7	mailer definitions
110454839Seric   8	special local name recognition (late in ruleset 3)
110558681Seric   9	special local rulesets (1 and 2)
1106