xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 65148)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*65148Seric		@(#)README	8.17 (Berkeley) 12/15/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.
3465002SericSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
3565002Sericalso works.  Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't
3665002Sericwork -- 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
260*65148Sericpop		Post Office Protocol.
26158363Seric
262*65148Seric
26357246Seric+----------+
26457246Seric| FEATURES |
26557246Seric+----------+
26651268Seric
26757246SericSpecial features can be requested using the "FEATURE" macro.  For
26857246Sericexample, the .mc line:
26957246Seric
27057246Seric	FEATURE(use_cw_file)
27157246Seric
27257246Serictells sendmail that you want to have it read an /etc/sendmail.cw
27358782Sericfile to get values for class $=w.  The FEATURE may contain a single
27458782Sericoptional parameter -- for example:
27557246Seric
27658782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
27758782Seric
27858782SericAvailable features are:
27958782Seric
28057246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
28157246Seric		names for this host.  This might be used if you were
28257246Seric		on a host that MXed for a dynamic set of other
28357246Seric		hosts.  If the set is static, just including the line
28457246Seric		"Cw<name1> <name2> ..." is probably superior.
28558408Seric		The actual filename can be overridden by redefining
28658408Seric		confCW_FILE.
28764324Seric
28858087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
28958087Seric		a ``551 User not local; please try <address>'' message.
29058087Seric		If this is set, you can alias people who have left
29158087Seric		to their new address with ".REDIRECT" appended.
29264324Seric
29358284Sericnouucp		Don't do anything special with UUCP addresses at all.
29464324Seric
29559080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
29659080Seric		This would generally only be used by sites that only
29759080Seric		act as mail gateways or which have user agents that do
29864028Seric		full canonification themselves.  You may also want to
29964028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
30064028Seric		turn off the usual resolver options that do a similar
30164028Seric		thing.
30264324Seric
30358526Sericnotsticky	By default, email sent to "user@local.host" are marked
30458526Seric		as "sticky" -- that is, the local addresses aren't
30558526Seric		matched against UDB and don't go through ruleset 5.
30658526Seric		This features disables this treatment.  It would
30758526Seric		normally be used on network gateway machines.
30864324Seric
30958782Sericmailertable	Include a "mailer table" which can be used to override
31058782Seric		routing for particular domains.  The argument of the
31158782Seric		FEATURE may be the key definition.  If none is specified,
31258782Seric		the definition used is:
31364164Seric			hash -o /etc/mailertable
31463761Seric		Keys in this database are fully qualified domain names
31563761Seric		or partial domains preceded by a dot -- for example,
31663761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
31763761Seric		Values must be of the form:
31858782Seric			mailer:domain
31963761Seric		where "mailer" is the internal mailer name, and "domain"
32063761Seric		is where to send the message.  These maps are not
32163761Seric		reflected into the message header.
32264324Seric
32363761Sericdomaintable	Include a "domain table" which can be used to provide
32463761Seric		full domains on unqualified (single word) hosts.  The
32563761Seric		argument of the FEATURE may be the key definition.  If
32663761Seric		none is specified, the definition used is:
32764164Seric			hash -o /etc/domaintable
32863761Seric		The key in this table is the unqualified host name; the
32963761Seric		value is the fully qualified domain.  Anything in the
33063761Seric		domaintable is reflected into headers; that is, this
33163761Seric		is done in ruleset 3.
33264324Seric
33359034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
33459034Seric		internet addresses.  The table can be built using the
33564153Seric		bitdomain program contributed by John Gardiner Myers.
33659034Seric		The argument of the FEATURE may be the key definition; if
33759034Seric		none is specified, the definition used is:
33864164Seric			hash -o /etc/bitdomain.db
33959034Seric		Keys are the bitnet hostname; values are the corresponding
34059034Seric		internet hostname.
34164324Seric
34259037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
34359037Seric		is:
34464164Seric			hash -o /etc/uudomain.db
34559037Seric		At the moment there is no automagic tool to build this
34659037Seric		database.
34764324Seric
34860263Sericalways_add_domain
34960263Seric		Include the local host domain even on locally delivered
35060263Seric		mail.  Normally it is not added unless it is already
35160263Seric		present.
35264324Seric
35363761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
35463761Seric		feature will cause recipient addresses to also masquerade
35563761Seric		as being from the masquerade host.  Normally they get
35663761Seric		the local hostname.  Although this may be right for
35763761Seric		ordinary users, it can break local aliases.  For example,
35863761Seric		if you send to "localalias", the originating sendmail will
35963761Seric		find that alias and send to all members, but send the
36063761Seric		message with "To: localalias@masqueradehost".  Since that
36163761Seric		alias likely does not exist, replies will fail.  Use this
36263761Seric		feature ONLY if you can guarantee that the ENTIRE
36363761Seric		namespace on your masquerade host supersets all the
36463761Seric		local entries.
36564324Seric
36664153Sericnodns		We aren't running DNS at our site (for example,
36764153Seric		we are UUCP-only connected).  It's hard to consider
36864153Seric		this a "feature", but hey, it had to go somewhere.
36957246Seric
37064324Sericnullclient	This is a special case -- it creates a stripped down
37164324Seric		configuration file containing nothing but support for
37264394Seric		forwarding all mail to a central hub via a local
37364394Seric		SMTP-based network.  The argument is the name of that
37464394Seric		hub.
37564394Seric
37664394Seric		The only other feature that should be used in conjunction
37764394Seric		with this one is "nocanonify" (this causes addresses to
37864394Seric		be sent unqualified via the SMTP connection; normally
37964394Seric		they are qualifed with the masquerade name, which
38064394Seric		defaults to the name of the hub machine).  No mailers
38164394Seric		should be defined.  No aliasing or forwarding is done.
38257246Seric
38364324Seric
38457246Seric+-------+
38557246Seric| HACKS |
38657246Seric+-------+
38757246Seric
38857246SericSome things just can't be called features.  To make this clear,
38957247Sericthey go in the hack subdirectory and are referenced using the HACK
39057246Sericmacro.  These will tend to be site-dependent.  The release
39157246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
39257246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
39357246Sericthis is intended as a short-term aid while we move hosts into
39457246Sericsubdomains.
39557246Seric
39658087Seric
39757246Seric+--------------------+
39857246Seric| SITE CONFIGURATION |
39957246Seric+--------------------+
40057246Seric
40157246SericComplex sites will need more local configuration information, such as
40257246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
40357246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
40457246Seric
40557246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
40657246Sericconfiguration information stored in the siteconfig subdirectory.  For
40757246Sericexample, the line
40857246Seric
40957246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
41057246Seric
41157246Sericreads the file uucp.ucbvax for local connection information.  The
41257246Sericsecond parameter is the local name (in this case just "ucbvax" since
41357246Sericit is locally connected, and hence a UUCP hostname) and the name of
41457246Sericthe class in which to store the host information.  Another SITECONFIG
41557246Sericline reads
41657246Seric
41757246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
41857246Seric
41957246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
42057246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
42157246Sericstore this list.  [The machine ucbarpa is gone now, but I've left
42257246Sericthis out-of-date configuration file around to demonstrate how you
42357246Sericmight do this.]
42457246Seric
42557246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
42657246Sericmore than a sequence of SITE macros describing connectivity.  For
42757246Sericexample:
42857246Seric
42957246Seric	SITE(cnmat)
43057246Seric	SITE(sgi olympus)
43157246Seric
43257246SericThe second example demonstrates that you can use two names on the
43357246Sericsame line; these are usually aliases for the same host (or are at
43457246Sericleast in the same company).
43557246Seric
43658087Seric
43757246Seric+-------------------+
43857246Seric| TWEAKING RULESETS |
43957246Seric+-------------------+
44057246Seric
44151268SericFor more complex configurations, you can define special rules.
44251268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
44351268Sericthe names.  Any modifications made here are reflected in the header.
44451268Seric
44551268SericA common use is to convert old UUCP addreses to SMTP addresses using
44651268Sericthe UUCPSMTP macro.  For example:
44751268Seric
44851268Seric	LOCAL_RULE_3
44951268Seric	UUCPSMTP(decvax,	decvax.dec.com)
45051268Seric	UUCPSMTP(research,	research.att.com)
45151268Seric
45251268Sericwill cause addresses of the form "decvax!user" and "research!user"
45351268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
45451268Sericrespectively.
45551268Seric
45657246SericThis could also be used to look hosts in a database map:
45757246Seric
45857246Seric	LOCAL_RULE_3
45957246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
46057246Seric
46157246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
46257246Seric
46351268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
46451268SericFor example, new rules are needed to parse hostnames that you accept
46551309Sericvia MX records.  For example, you might have:
46651268Seric
46751309Seric	LOCAL_RULE_0
46851309Seric	R$+ < @ cnmat.Berkeley.EDU >	$#uucp $@ cnmat $: $1
46951309Seric
47051309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
47151309Sericpointing at this host; this rule catches the message and forwards it on
47251309Sericusing UUCP.
47351309Seric
47458681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
47558681SericThese rulesets are normally empty.
47658681Seric
47757246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
47857246Sericboilerplate option setting but before rulesets, and can be used to
47957945Sericdeclare local database maps or whatever.  For example:
48051268Seric
48157246Seric	LOCAL_CONFIG
48257246Seric	Khostmap hash /etc/hostmap.db
48357246Seric	Kyplocal nis -m hosts.byname
48451220Seric
48558087Seric
48657246Seric+---------------------------+
48757246Seric| MASQUERADING AND RELAYING |
48857246Seric+---------------------------+
48957246Seric
49057246SericYou can have your host masquerade as another using
49157246Seric
49257246Seric	MASQUERADE_AS(host.domain)
49357246Seric
49457246SericThis causes outgoing SMTP mail to be labelled as coming from the
49557246Sericindicated domain, rather than $j.  One normally masquerades as one
49657246Sericof your own subdomains (for example, it's unlikely that I would
49757246Sericchoose to masquerade as an MIT site).
49857246Seric
49964153SericThe masquerade name is not normally canonified, so it is important
50064153Sericthat it be your One True Name, that is, fully qualified and not a
50164153SericCNAME.
50264153Seric
50357246Sericthere are always users that need to be "exposed" -- that is, their
50457246Sericinternal site name should be displayed instead of the masquerade name.
50557246SericRoot is an example.  You can add users to this list using
50657246Seric
50757246Seric	EXPOSED_USER(usernames)
50857246Seric
50957246SericThis adds users to class E; you could also use something like
51057246Seric
51157246Seric	FE/etc/sendmail.cE
51257246Seric
51357246SericYou can also arrange to relay all unqualified names (that is, names
51457246Sericwithout @host) to a relay host.  For example, if you have a central
51557246Sericemail server, you might relay to that host so that users don't have
51657246Sericto have .forward files or aliases.  You can do this using
51757246Seric
51858071Seric	define(`LOCAL_RELAY', mailer:hostname)
51957246Seric
52058071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
52158071Seric"smtp".  There are some user names that you don't want relayed, perhaps
52258071Sericbecause of local aliases.  A common example is root, which may be
52358071Sericlocally aliased.  You can add entries to this list using
52457246Seric
52557246Seric	LOCAL_USER(usernames)
52657246Seric
52757246SericThis adds users to class L; you could also use something like
52857246Seric
52957246Seric	FL/etc/sendmail.cL
53057246Seric
53164153SericIf you want all incoming mail sent to a centralized hub, as for a
53264153Sericshared /var/spool/mail scheme, use
53357591Seric
53458071Seric	define(`MAIL_HUB', mailer:hostname)
53557591Seric
53658071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
53758071Sericand MAIL_HUB, unqualified names and names in class L will be sent to
53858071Sericthe LOCAL_RELAY and other local names will be sent to MAIL_HUB.  For
53958071Sericexample, if are on machine mastodon.CS.Berkeley.EDU, the following
54058071Sericcombinations of settings will have the indicated effects:
54157591Seric
54257591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
54357591Seric
54457591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
54557591Sericmail.CS.Berkeley.EDU
54657591Seric
54757591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
54857591Sericmammoth.CS.Berkeley.EDU
54957591Seric
55057591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
55157591SericMAIL_HUB set as above
55257591Seric
55364153SericIf you want all outgoing mail to go to a central relay site, define
55464153SericSMART_HOST as well.  Briefly:
55558071Seric
55664153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
55764153Seric	MAIL_HUB applies to names qualified with the name of the
55864153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
55964153Seric	SMART_HOST applies to names qualified with other hosts.
56064153Seric
56164153SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and
56264153SericFAX_RELAY) take precedence over SMART_HOST, so if you really want
56364153Sericabsolutely everything to go to a single central site you will need to
56464153Sericunset all the other relays -- or better yet, find or build a minimal
56564153Sericconfig file that does this.
56664153Seric
56764153Seric
56858071Seric+-------------------------------+
56958071Seric| NON-SMTP BASED CONFIGURATIONS |
57058071Seric+-------------------------------+
57158071Seric
57258071SericThese configuration files are designed primarily for use by SMTP-based
57358071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
57458071SericUUCP-primarily nodes (the latter is defined as a small local net
57558071Sericconnected to the rest of the world via UUCP).  However, there is one
57658071Serichook to handle some special cases.
57758071Seric
57858071SericYou can define a ``smart host'' that understands a richer address syntax
57958071Sericusing:
58058071Seric
58158071Seric	define(`SMART_HOST', mailer:hostname)
58258071Seric
58364028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
58458071Sericcan't be handled using the usual UUCP rules are passed to this host.
58558071Seric
58658071SericIf you are on a local SMTP-based net that connects to the outside
58758071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
58858071SericFor example:
58958071Seric
59058071Seric	define(`SMART_HOST', suucp:uunet)
59158071Seric	LOCAL_NET_CONFIG
59263761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
59358071Seric
59458071SericThis will cause all names that end in your domain name ($m) via
59558071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
59663761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
59763761Sericthe $m.  If you are running a local DNS inside your domain which is
59863761Sericnot otherwise connected to the outside world, you probably want to
59963761Sericuse:
60058071Seric
60163761Seric	define(`SMART_HOST', smtp:fire.wall.com)
60263761Seric	LOCAL_NET_CONFIG
60363761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
60458071Seric
60563761SericThat is, send directly only to things you found in your DNS lookup;
60663761Sericanything else goes through SMART_HOST.
60763761Seric
60864153SericIf you are not running DNS at all, it is important to use
60964153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
61064153Sericfor the name server to come up.
61163761Seric
61264153Seric
61364259Seric+-----------+
61464259Seric| WHO AM I? |
61564259Seric+-----------+
61664259Seric
61764259SericNormally, the $j macro is automatically defined to be your fully
61864259Sericqualified domain name (FQDN).  Sendmail does this by getting your
61964259Serichost name using gethostname and then calling gethostbyname on the
62064259Sericresult.  For example, in some environments gethostname returns
62164259Sericonly the root of the host name (such as "foo"); gethostbyname is
62264259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
62364259Sericcases, gethostbyname may fail to return the FQDN.  In this case
62464259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
62564259Sericname.  This is usually done using:
62664259Seric
62764259Seric	Dmbar.com
62864259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
62964259Seric
63064259Seric
63164028Seric+--------------------+
63264028Seric| USING MAILERTABLES |
63364028Seric+--------------------+
63464028Seric
63564028SericTo use FEATURE(mailertable), you will have to create an external
63664028Sericdatabase containing the routing information for various domains.
63764028SericFor example, a mailertable file in text format might be:
63864028Seric
63964028Seric	.my.domain		xnet:%1.my.domain
64064028Seric	uuhost1.my.domain	suucp:uuhost1
64164028Seric	.bitnet			smtp:relay.bit.net
64264028Seric
64364028SericThis should normally be stored in /etc/mailertable.  The actual
64464028Sericdatabase version of the mailertable is built using:
64564028Seric
64664028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
64764028Seric
64864028SericThe semantics are simple.  Any LHS entry that does not begin with
64964028Serica dot matches the full host name indicated.  LHS entries beginning
65064028Sericwith a dot match anything ending with that domain name -- that is,
65164028Sericthey can be thought of as having a leading "*" wildcard.  Matching
65264028Sericis done in order of most-to-least qualified -- for example, even
65364028Sericthough ".my.domain" is listed first in the above example, an entry
65464028Sericof "uuhost1.my.domain" will match the second entry since it is
65564028Sericmore explicit.
65664028Seric
65764028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
65864028Sericconfiguration name of a mailer (that is, an `M' line in the
65964028Sericsendmail.cf file).  The "host" will be the hostname passed to
66064028Sericthat mailer.  In domain-based matches (that is, those with leading
66164028Sericdots) the "%1" may be used to interpolate the wildcarded part of
66264028Sericthe host name.  For example, the first line above sends everything
66364028Sericaddressed to "anything.my.domain" to that same host name, but using
66464028Sericthe (presumably experimental) xnet mailer.
66564028Seric
66664028Seric
66764153Seric+--------------------------------+
66864153Seric| USING USERDB TO MAP FULL NAMES |
66964153Seric+--------------------------------+
67064153Seric
67164153SericThe user database was not originally intended for mapping full names
67264153Sericto login names (e.g., Eric.Allman => eric), but some people are using
67364153Sericit that way.  (I would recommend that you set up aliases for this
67464153Sericpurpose instead -- since you can specify multiple alias files, this
67564153Sericis fairly easy.)  The intent was to locate the default maildrop at
67664153Serica site, but allow you to override this by sending to a specific host.
67764153Seric
67864153SericIf you decide to set up the user database in this fashion, it is
67964153Sericimperative that you also specify FEATURE(notsticky) -- otherwise,
68064153Serice-mail sent to Full.Name@local.host.name will be rejected.
68164153Seric
68264259SericTo build the internal form of the user databae, use:
68364153Seric
68464259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
68564259Seric
68664259Seric
68758363Seric+------------------+
68858363Seric| FlexFAX SOFTWARE |
68958363Seric+------------------+
69058363Seric
69158363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
69258363Sericpublic version out "later this week" [as of 3/1/93].  The following
69358363Sericblurb is direct from Sam:
69458363Seric
69564498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
69658363Seric
69758363Seric	How To Obtain This Software (in case all you get is this file)
69864498Seric	--------------------------------------------------------------
69958363Seric	The source code is available for public ftp on
70064498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
70158363Seric		(192.48.153.1)
70258363Seric
70358363Seric	You can also obtain inst'able images for Silicon Graphics machines from
70464498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
70558363Seric		(192.48.153.1)
70658363Seric
70758363Seric	For example,
70858363Seric	    % ftp -n sgi.com
70958363Seric	    ....
71058363Seric	    ftp> user anonymous
71158363Seric	    ... <type in password>
71258363Seric	    ftp> cd sgi/fax
71358363Seric	    ftp> binary
71464498Seric	    ftp> get v2.1.src.tar.Z
71558363Seric
71664498Seric	In general, the latest version of the 2.1 release of the software is
71764498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
71864498Seric	directory.  This file is a link to the appropriate released version (so
71964498Seric	don't waste your time retrieving the linked file as well!) Any files of
72064498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
72164498Seric	versions of the source code.  For example, the file v2.1.0.patch would
72264498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
72364498Seric	different than the naming conventions used during beta testing.) Patch
72464498Seric	files only work to go between consecutive versions, so if you are
72564498Seric	multiple versions behind the latest release, you will need to apply
72664498Seric	each patch file between your current version and the latest.
72764498Seric
72864498Seric
72964498Seric	Obtaining the Software by Electronic Mail
73064498Seric	-----------------------------------------
73164498Seric	Do not send me requests for the software; they will be ignored (without
73264498Seric	response).  If you cannot use FTP at all, there is a service called
73364498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
73464498Seric	this machine and it will use FTP to retrieve files for you and send you
73564498Seric	the files back again via e-mail.  To find out more about the ftpmail
73658363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
73758363Seric	consists of the single line "help".
73858363Seric
73964498Seric
74064498Seric	Obtaining the Software Within Silicon Graphics
74164498Seric	----------------------------------------------
74258363Seric	Internal to Silicon Graphics there are inst'able images on the host
74364498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
74458363Seric
74564498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
74658363Seric
74764498Seric	to install the latest version of the software on your machine.
74858363Seric
74964498Seric
75064498Seric	What to do Once You've Retrieved Stuff
75164498Seric	--------------------------------------
75258363Seric	The external distributions come in a compressed or uncompressed tar
75358363Seric	file.  To extract the source distribution:
75458363Seric
75564498Seric	    % zcat v2.1.src.tar.Z | tar xf -
75658363Seric
75758363Seric	(uncompress and extract individual files in current directory).  To
75858363Seric	unpack and install the client portion of the inst'able distribution:
75958363Seric
76058363Seric	    % mkdir dist
76164498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
76258363Seric	    % inst -f dist/flexfax
76358363Seric	    ...
76458363Seric	    inst> go
76558363Seric
76658363Seric	(Note, the dist subdirectory is because some versions of inst fail if
76764498Seric	the files are in the current directory.) Server binaries are also
76864498Seric	included in the inst'able images as flexfax.server.*.  They are not
76964498Seric	installed by default, so to get them also you need to do:
77058363Seric
77158363Seric	    % inst -f flexfax
77258363Seric	    ...
77358363Seric	    inst> install flexfax.server.*
77458363Seric	    inst> go
77558363Seric
77664498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
77758363Seric	system.  They should work w/o problem on earlier versions of the
77858363Seric	system, but I have not fully tested this.  Also, note that to install a
77958363Seric	server on an SGI machine, you need to have installed the Display
78058363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
78158363Seric	server will not be able to convert PostScript to facsimile for
78258363Seric	transmission.
78358363Seric
78464498Seric	If you are working from the source distribution, look at the file
78564498Seric	README in the top of the source tree.  If you are working from the inst
78664498Seric	images, the subsystem flexfax.man.readme contains the README file and
78764498Seric	other useful pieces of information--the installed files are placed in
78864498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
78964498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
79064498Seric	the README file and the manual page for faxaddmodem for information.
79158363Seric
79258363Seric
79364498Seric	FlexFAX Mail List
79464498Seric	-----------------
79558363Seric	A mailing list for users of this software is located on sgi.com.
79658363Seric	If you want to join this mailing list or have a list-related request
79758363Seric	such as getting your name removed from it, send a request to
79858363Seric
79964498Seric	    majordomo@whizzer.wpd.sgi.com
80058363Seric
80164498Seric	For example, to subscribe, send the line "subscribe flexfax" in
80264498Seric	the body of your message.  The line "help" will return a list of
80364498Seric	the commands understood by the mailing list management software.
80464498Seric
80558363Seric	Submissions (including bug reports) should be directed to:
80658363Seric
80758363Seric	    flexfax@sgi.com
80858363Seric
80964498Seric	When corresponding about this software please always specify what
81064498Seric	version you have, what system you're running on, and, if the problem is
81164498Seric	specific to your modem, identify the modem and firmware revision.
81258363Seric
81364498Seric
81457945Seric+--------------------------------+
81557945Seric| TWEAKING CONFIGURATION OPTIONS |
81657945Seric+--------------------------------+
81757945Seric
81857945SericThere are a large number of configuration options that don't normally
81957945Sericneed to be changed.  However, if you feel you need to tweak them, you
82057945Sericcan define the following M4 variables.  This list is shown in four
82157945Sericcolumns:  the name you define, the default value for that definition,
82257945Sericthe option or macro that is affected (either Ox for an option or Dx
82357945Sericfor a macro), and a brief description.  Greater detail of the semantics
82457945Sericcan be found in the Installation and Operations Guide.
82557945Seric
82663582SericSome options are likely to be deprecated in future versions -- that is,
82763582Sericthe option is only included to provide back-compatibility.  These are
82863582Sericmarked with "*".
82963582Seric
83065002SericRemember that these options are M4 variables, and hence may need to
83165002Sericbe quoted.  In particular, arguments with commas will usually have to
83265002Sericbe ``double quoted, like this phrase'' to avoid having the comma
83365002Sericconfuse things.  This is common for alias file definitions and for
83465002Sericthe read timeout.
83565002Seric
83657945SericM4 Variable Name	Default		Mac/Opt	Description
83765002Seric================	=======		=======	===========
83857945SericconfMAILER_NAME		MAILER-DAEMON	Dn	The sender name used for
83957945Seric						internally generated
84057945Seric						outgoing messages.
84158681SericconfFROM_LINE		From $g  $d	Dl	The From_ line used when
84258681Seric						sending to files or programs.
84357945SericconfFROM_HEADER		$?x$x <$g>$|$g$.	The format of an internally
84457945Seric					Dq	generated From: address.
84557945SericconfOPERATORS		.:%@!^/[]	Do	Address operator characters.
84664153SericconfSMTP_LOGIN_MSG	$j Sendmail $v/$Z ready at $b
84757945Seric					De	The initial (spontaneous)
84857945Seric						SMTP greeting message.
84959743SericconfSEVEN_BIT_INPUT	False		O7	Force input to seven bits?
85057945SericconfALIAS_WAIT		10		Oa	Wait (in minutes) for alias
85157945Seric						file rebuild.
85258087SericconfMIN_FREE_BLOCKS	4		Ob	Minimum number of free blocks
85358087Seric						on queue filesystem to accept
85458087Seric						SMTP mail.
85557945SericconfBLANK_SUB		.		OB	Blank (space) substitution
85657945Seric						character.
85757945SericconfCON_EXPENSIVE	False		Oc	Connect immediately to
85857945Seric						mailers marked expensive?
85957945SericconfCHECKPOINT_INTERVAL	10		OC	Checkpoint queue files
86057945Seric						every N recipients.
86157945SericconfDELIVERY_MODE	background	Od	Default delivery mode.
86257945SericconfAUTO_REBUILD	False		OD	Automatically rebuild
86357945Seric						alias file if needed.
86457945SericconfERROR_MODE		(undefined)	Oe	Error message mode.
86557945SericconfERROR_MESSAGE	(undefined)	OE	Error message header/file.
86657945SericconfSAVE_FROM_LINES	False		Of	Save extra leading
86757945Seric						From_ lines.
86857945SericconfTEMP_FILE_MODE	0600		OF	Temporary file mode.
86957945SericconfDEF_GROUP_ID	1		Og	Default group id.
87057945SericconfMATCH_GECOS		False		OG	Match GECOS field.
87157945SericconfMAX_HOP		17		Oh	Maximum hop count.
87263582SericconfIGNORE_DOTS		False		Oi *	Ignore dot as terminator
87357945Seric						for incoming messages?
87457945SericconfBIND_OPTS		(empty)		OI	Default options for BIND.
87563582SericconfMIME_FORMAT_ERRORS	True		Oj *	Send error messages as MIME-
87659743Seric						encapsulated messages per
87759743Seric						RFC 1344.
87864153SericconfFORWARD_PATH	(undefined)	OJ	The colon-separated list of
87964153Seric						places to search for .forward
88064153Seric						files.
88157945SericconfMCI_CACHE_SIZE	2		Ok	Size of open connection cache.
88257945SericconfMCI_CACHE_TIMEOUT	5m		OK	Open connection cache timeout.
88363582SericconfUSE_ERRORS_TO	False		Ol *	Use the Errors-To: header to
88463582Seric						deliver error messages.  This
88563582Seric						should not be necessary because
88663582Seric						of general acceptance of the
88763582Seric						envelope/header distinction.
88857945SericconfLOG_LEVEL		9		OL	Log level.
88957945SericconfME_TOO		False		Om	Include sender in group
89057945Seric						expansions.
89157945SericconfCHECK_ALIASES	True		On	Check RHS of aliases when
89257945Seric						running newaliases.
89363582SericconfOLD_STYLE_HEADERS	True		Oo *	Assume that headers without
89457945Seric						special chars are old style.
89558859SericconfDAEMON_OPTIONS	(undefined)	OO	SMTP daemon options.
89658806SericconfPRIVACY_FLAGS	authwarnings	Op	Privacy flags.
89757945SericconfCOPY_ERRORS_TO	(undefined)	OP	Address for additional copies
89857945Seric						of all error messages.
89957945SericconfQUEUE_FACTOR	(undefined)	Oq	Slope of queue-only function
90058116SericconfREAD_TIMEOUT	(undefined)	Or	SMTP read timeouts.
90163582SericconfSAFE_QUEUE		True		Os *	Commit all messages to disk
90257945Seric						before forking.
90358806SericconfMESSAGE_TIMEOUT	5d/4h		OT	Timeout for messages before
90458806Seric						sending error/warning message.
90559317SericconfTIME_ZONE		USE_SYSTEM	Ot	Time zone info -- can be
90657945Seric						USE_SYSTEM to use the system's
90757945Seric						idea, USE_TZ to use the user's
90857945Seric						TZ envariable, or something
90957945Seric						else to force that value.
91057945SericconfDEF_USER_ID		1		Ou	Default user id.
91158718SericconfUSERDB_SPEC		(undefined)	OU	User database specification.
91258859SericconfFALLBACK_MX		(undefined)	OV	Fallback MX host.
91363857SericconfTRY_NULL_MX_LIST	False		Ow	If we are the best MX for a
91463857Seric						host and haven't made other
91563857Seric						arrangements, try connecting
91663857Seric						to the host directly; normally
91763857Seric						this would be a config error.
91857945SericconfQUEUE_LA		8		Ox	Load average at which queue-only
91957945Seric						function kicks in.
92057945SericconfREFUSE_LA		12		OX	Load average at which incoming
92157945Seric						SMTP connections are refused.
92263582SericconfWORK_RECIPIENT_FACTOR
92363582Seric			(undefined)	Oy	Cost of each recipient.
92463582SericconfSEPARATE_PROC	False		OY	Run all deliveries in a
92557945Seric						separate process.
92657945SericconfWORK_CLASS_FACTOR	(undefined)	Oz	Priority multiplier for class.
92757945SericconfWORK_TIME_FACTOR	(undefined)	OZ	Cost of each delivery attempt.
92858408SericconfCW_FILE		/etc/sendmail.cw	Name of file used to get the
92958408Seric					Fw	local additions to the $=w
93058408Seric						class.
93164153SericconfSMTP_MAILER		smtp		-	The mailer name used when
93263972Seric						SMTP connectivity is required.
93363972Seric						Either "smtp" or "esmtp".
93463999SericconfLOCAL_MAILER	local		-	The mailer name used when
93563999Seric						local connectivity is required.
93663999Seric						Almost always "local".
93764028SericconfRELAY_MAILER	relay		-	The default mailer name used
93864028Seric						for relaying any mail (e.g.,
93964028Seric						to a BITNET_RELAY, a
94064028Seric						SMART_HOST, or whatever).
94164028Seric						This can reasonably be "suucp"
94264028Seric						if you are on a UUCP-connected
94364028Seric						site.
94464259SericconfDOMAIN_NAME		(undefined)	Dj	If defined, sets $j.
94557945Seric
94658087Seric
94757246Seric+-----------+
94857246Seric| HIERARCHY |
94957246Seric+-----------+
95057246Seric
95151220SericWithin this directory are several subdirectories, to wit:
95251220Seric
95351220Sericm4		General support routines.  These are typically
95451220Seric		very important and should not be changed without
95557247Seric		very careful consideration.
95651220Seric
95751220Sericcf		The configuration files themselves.  They have
95851220Seric		".mc" suffixes, and must be run through m4 to
95951220Seric		become complete.  The resulting output should
96051220Seric		have a ".cf" suffix.
96151220Seric
96251220Sericostype		Definitions describing a particular operating
96351220Seric		system type.  These should always be referenced
96451220Seric		using the OSTYPE macro in the .mc file.  Examples
96551220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
96651220Seric		"sunos4.1".
96751220Seric
96851220Sericdomain		Definitions describing a particular domain, referenced
96951220Seric		using the DOMAIN macro in the .mc file.  These are
97051220Seric		site dependent; for example, we contribute "cs.exposed.m4"
97151220Seric		and "cs.hidden.m4" which both describe hosts in the
97251220Seric		CS.Berkeley.EDU subdomain; the former displays the local
97351220Seric		hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the
97451220Seric		latter does its best to hide the identity of the local
97551220Seric		workstation inside the CS subdomain.
97651220Seric
97751220Sericmailer		Descriptions of mailers.   These are referenced using
97851220Seric		the MAILER macro in the .mc file.
97951220Seric
98051220Sericsh		Shell files used when building the .cf file from the
98151220Seric		.mc file in the cf subdirectory.
98251220Seric
98351220Sericfeature		These hold special orthogonal features that you might
98451220Seric		want to include.  They should be referenced using
98551220Seric		the FEATURE macro.
98651220Seric
98751220Serichack		Local hacks.  These can be referenced using the HACK
98851220Seric		macro.  They shouldn't be of more than voyeuristic
98951220Seric		interest outside the .Berkeley.EDU domain, but who knows?
99051220Seric		We've all got our own peccadilloes.
99151220Seric
99251268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
99351268Seric		UUCP sites.
99451220Seric
99551268Seric
99657246Seric+------------------------+
99757246Seric| ADMINISTRATIVE DETAILS |
99857246Seric+------------------------+
99951220Seric
100051220SericThe following sections detail usage of certain internal parts of the
100151220Sericsendmail.cf file.  Read them carefully if you are trying to modify
100251220Sericthe current model.  If you find the above descriptions adequate, these
100351220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
100451220Seric
100551220SericRULESETS (* means built in to sendmail)
100651220Seric
100751220Seric   0 *	Parsing
100851220Seric   1 *	Sender rewriting
100951220Seric   2 *	Recipient rewriting
101051220Seric   3 *	Canonicalization
101151220Seric   4 *	Post cleanup
101254839Seric   5 *	Local address rewrite (after aliasing)
101360539Seric  1x	mailer rules (sender qualification)
101460539Seric  2x	mailer rules (recipient qualification)
101564801Seric  3x	mailer rules (sender header qualification)
101664801Seric  4x	mailer rules (recipient header qualification)
101764801Seric  5x	mailer subroutines (general)
101864801Seric  6x	mailer subroutines (general)
101964801Seric  7x	mailer subroutines (general)
102064801Seric  8x	reserved
102160539Seric  90	Mailertable host stripping
102260892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
102360892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
102463857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
102551220Seric
102651220Seric
102751220SericMAILERS
102851220Seric
102951220Seric   0	local, prog	local and program mailers
103051220Seric   1	smtp		SMTP channel
103158087Seric   2	uucp		UNIX-to-UNIX Copy Program
103258087Seric   3	netnews		Network News delivery
103358363Seric   4	fax		Sam Leffler's FlexFAX software
103451220Seric
103551220Seric
103651220SericMACROS
103751220Seric
103851220Seric   A
103951220Seric   B	Bitnet Relay
104051220Seric   C	CSNET Relay
104154839Seric   D	The local domain -- usually not needed
104251220Seric   E
104358363Seric   F	FAX Relay
104451220Seric   G
104557591Seric   H	mail Hub (for mail clusters)
104651220Seric   I
104751220Seric   J
104851220Seric   K
104951220Seric   L
105051220Seric   M	Masquerade (who I claim to be)
105151220Seric   N
105251220Seric   O
105351220Seric   P
105451220Seric   Q
105551220Seric   R	Relay (for unqualified names)
105658071Seric   S	Smart Host
105751220Seric   T
105851309Seric   U	my UUCP name (if I have a UUCP connection)
105951309Seric   V	UUCP Relay (class V hosts)
106051220Seric   W	UUCP Relay (class W hosts)
106151220Seric   X	UUCP Relay (class X hosts)
106251309Seric   Y	UUCP Relay (all other hosts)
106351220Seric   Z	Version number
106451220Seric
106551220Seric
106651220SericCLASSES
106751220Seric
106851220Seric   A
106951220Seric   B
107051220Seric   C
107151220Seric   D
107257246Seric   E	addresses that should not seem to come from $M
107354839Seric   F	hosts we forward for
107451220Seric   G
107551220Seric   H
107651220Seric   I
107751220Seric   J
107851220Seric   K
107951220Seric   L	addresses that should not be forwarded to $R
108051220Seric   M
108151220Seric   N
108251220Seric   O	operators that indicate network operations (cannot be in local names)
108360211Seric   P	top level pseudo-domains: BITNET, FAX, UUCP, etc.
108451220Seric   Q
108551220Seric   R
108651220Seric   S
108751220Seric   T
108851220Seric   U	locally connected UUCP hosts
108951309Seric   V	UUCP hosts connected to relay $V
109051309Seric   W	UUCP hosts connected to relay $W
109151309Seric   X	UUCP hosts connected to relay $X
109251309Seric   Y	locally connected smart UUCP hosts
109364153Seric   Z	locally connected domain-ized UUCP hosts
109454839Seric   .	the class containing only a dot
109551220Seric
109651220Seric
109751220SericM4 DIVERSIONS
109851220Seric
109958071Seric   1	Local host detection and resolution
110058071Seric   2	Local Ruleset 3 additions
110158071Seric   3	Local Ruleset 0 additions
110251268Seric   4	UUCP Ruleset 0 additions
110351309Seric   5	locally interpreted names (overrides $R)
110454839Seric   6	local configuration (at top of file)
110551220Seric   7	mailer definitions
110654839Seric   8	special local name recognition (late in ruleset 3)
110758681Seric   9	special local rulesets (1 and 2)
1108