xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 66047)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*66047Seric		@(#)README	8.25 (Berkeley) 02/10/94
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
1665957Sericversions, and don't handle as many of the weird 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
2665957SericOf course, the downside of this is that if you do live in a weird
2765957Sericworld, things are going to get weirder 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
5465509Seric*******************************************************************
5565509Seric***  BE SURE YOU CUSTOMIZE THESE FILES!  They have some		***
5665509Seric***  Berkeley-specific assumptions built in, such as the name	***
5765509Seric***  of our UUCP-relay.  You'll want to create your own domain	***
5865509Seric***  description, and use that in place of domain/Berkeley.m4.	***
5965509Seric*******************************************************************
6058087Seric
6165509Seric
6257246Seric+--------------------------+
6357246Seric| INTRODUCTION AND EXAMPLE |
6457246Seric+--------------------------+
6557246Seric
6657246SericConfiguration files are contained in the subdirectory "cf", with a
6757246Sericsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
6857246Seric
6951220SericLet's examine a typical .mc file (cf/cs-exposed.mc):
7051220Seric
7151220Seric	divert(-1)
7251220Seric	#
7351220Seric	# Copyright (c) 1983 Eric P. Allman
7451220Seric	# Copyright (c) 1988 The Regents of the University of California.
7551220Seric	# All rights reserved.
7651220Seric	#
7751220Seric	# Redistribution and use in source and binary forms are permitted
7851220Seric	# provided that the above copyright notice and this paragraph are
7951220Seric	# duplicated in all such forms and that any documentation,
8051220Seric	# advertising materials, and other materials related to such
8151220Seric	# distribution and use acknowledge that the software was developed
8251220Seric	# by the University of California, Berkeley.  The name of the
8351220Seric	# University may not be used to endorse or promote products derived
8451220Seric	# from this software without specific prior written permission.
8551220Seric	# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
8651220Seric	# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
8751220Seric	# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
8851220Seric	#
8951220Seric
9057246SericThe divert(-1) will delete the crud in the resulting output file.
9157247SericThe copyright notice is what your lawyers require.  Our lawyers require
9257246Sericthe one that I've included in my files. A copyleft is a copyright by
9357246Sericanother name.
9451220Seric
9557246SericThe next line MUST be
9657246Seric
9751220Seric	include(`../m4/cf.m4')
9851220Seric
9957246SericThis will pull in the M4 macros you will need to make sense of
10057246Sericeverything else.  As the saying goes, don't think about it, just
10157246Sericdo it.  If you don't do it, don't bother reading the rest of this
10257246Sericfile.
10351220Seric
10456778Seric	VERSIONID(`<SCCS or RCS version id>')
10551220Seric
10651220SericVERSIONID is a macro that stuffs the version information into the
10751220Sericresulting file.  We use SCCS; you could use RCS, something else, or
10857246Sericomit it completely.  This is not the same as the version id included
10957246Sericin SMTP greeting messages -- this is defined in m4/version.m4.
11051220Seric
11151268Seric	DOMAIN(cs.exposed)
11251220Seric
11351220SericThis example exposes the host inside of the CS subdomain -- that is,
11451220Sericit doesn't try to hide the name of the workstation to the outside
11551220Sericworld.  Changing this to DOMAIN(cs.hidden) would have made outgoing
11651220Sericmessages refer to "<username>@CS.Berkeley.EDU" instead of using the
11763857Sericlocal hostname.  Internally this is effected by using
11857246Seric"MASQUERADE_AS(CS.Berkeley.EDU)".
11951220Seric
12051268Seric	MAILER(smtp)
12151220Seric
12251309SericThese describe the mailers used at the default CS site site.  The
12351309Sericlocal mailer is always included automatically.
12451220Seric
12558087Seric
12657246Seric+--------+
12757246Seric| OSTYPE |
12857246Seric+--------+
12957246Seric
13051220SericNote that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes
13151220Sericdefault Computer Science Division environment.  There are several
13257247Sericexplicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1,
13357247Sericriscos4.5, sunos3.5, sunos4.1, and ultrix4.1.  These change things
13457247Sericlike the location of the alias file and queue directory.  Some of
13557247Sericthese files are identical to one another.
13651220Seric
13757246SericOperating system definitions are easy to write.  They may define
13857246Sericthe following variables (everything defaults, so an ostype file
13957246Sericmay be empty).
14051220Seric
14157246SericALIAS_FILE		[/etc/aliases] The location of the text version
14259761Seric			of the alias file(s).  It can be a comma-separated
14359761Seric			list of names.
14457246SericHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
14557246Seric			containing information printed in response to
14657246Seric			the SMTP HELP command.
14757246SericQUEUE_DIR		[/var/spool/mqueue] The directory containing
14857246Seric			queue files.
14957246SericSTATUS_FILE		[/etc/sendmail.st] The file containing status
15057246Seric			information.
15158087SericLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
15264153SericLOCAL_MAILER_FLAGS	[rmn] The flags used by the local mailer.  The
15364153Seric			flags lsDFM are always included.
15463761SericLOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
15563761Seric			mail.
15658087SericLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
15763791SericLOCAL_SHELL_FLAGS	[eu] The flags used by the shell mailer.  The
15863791Seric			flags lsDFM are always included.
15963791SericLOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
16063791Seric			mail.
16158087SericUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
16258087Seric			used to submit news.
16358087SericUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
16458087SericUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
16558087Seric			usenet mailer.
16665911SericUSENET_MAILER_MAX	[100000] The maximum size of messages that will
16765911Seric			be accepted by the usenet mailer.
16863857SericSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
16963857Seric			flags are `mDFMUX' (and `a' for esmtp mailer).
17065911SericSMTP_MAILER_MAX		[undefined] The maximum size of messages that will
17165911Seric			be transported using the smtp or esmtp mailers.
17263857SericUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
17363857Seric			flags are `DFMhuU' (and `m' for suucp mailer, minus
17463857Seric			`U' for uucp-dom mailer).
17563761SericUUCP_MAILER_ARGS	[uux - -r -z -a$f -gC $h!rmail ($u)] The arguments
17663761Seric			passed to the UUCP mailer.
17763791SericUUCP_MAX_SIZE		[100000] The maximum size message accepted for
17863791Seric			transmission by the UUCP mailers.
17965911SericFAX_MAILER_PATH		[/usr/local/lib/fax/mailfax] The program used to
18065911Seric			submit FAX messages.
18165911SericFAX_MAILER_MAX		[100000] The maximum size message accepted for
18265911Seric			transmission by FAX.
18357246Seric
18457246Seric+---------+
18557246Seric| DOMAINS |
18657246Seric+---------+
18757246Seric
18857246SericYou will probably want to collect domain-dependent defines into one
18957246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
19057246Sericdomain file includes definitions for several internal distinguished
19157246Serichosts:
19257246Seric
19357246SericUUCP_RELAY	The host that will forward UUCP-addressed email.
19457246Seric		If not defined, all UUCP sites must be directly
19564028Seric		connected.
19657246SericBITNET_RELAY	The host that will forward BITNET-addressed email.
19757246Seric		If not defined, the .BITNET pseudo-domain won't work.
19857246SericLOCAL_RELAY	The site that will handle unqualified names -- that
19957246Seric		is, names with out an @domain extension.  If not set,
20057246Seric		they are assumed to belong on this machine.  This
20157246Seric		allows you to have a central site to store a
20257246Seric		company- or department-wide alias database.  This
20357246Seric		only works at small sites, and there are better
20464028Seric		methods.
20557246Seric
20664028SericEach of these can be either ``mailer:hostname'' (in which case the
20764028Sericmailer is the internal mailer name, such as ``suucp'' and the hostname
20864028Sericis the name of the host as appropriate for that mailer) or just a
20964028Seric``hostname'', in which case a default mailer type (usually ``relay'',
21064153Serica variant on SMTP) is used.  WARNING: if you have a wildcard MX
21164153Sericrecord matching your domain, you probably want to define these to
21264153Serichave a trailing dot so that you won't get the mail diverted back
21364153Sericto yourself.
21464028Seric
21557246SericThe domain file can also be used to define a domain name, if needed
21657982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
21757982Sericat your site masquerade behind one email name, you could also use
21857982SericMASQUERADE_AS here.
21957246Seric
22058408SericYou do not have to define a domain -- in particular, if you are a
22158408Sericsingle machine sitting off somewhere, it is probably more work than
22258408Sericit's worth.  This is just a mechanism for combining "domain dependent
22358408Sericknowledge" into one place.
22458408Seric
22557246Seric+---------+
22657246Seric| MAILERS |
22757246Seric+---------+
22857246Seric
22951220SericThere are fewer mailers supported in this version than the previous
23051220Sericversion, owing mostly to a simpler world.
23151220Seric
23251220Sericlocal		The local and prog mailers.  You will almost always
23351220Seric		need these; the only exception is if you relay ALL
23457247Seric		your mail to another site.  This mailer is included
23557247Seric		automatically.
23651220Seric
23751220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
23851220Seric		not hide hosts behind a gateway or another other
23951220Seric		such hack; it assumes a world where everyone is
24063761Seric		running the name server.  This file actually defines
24163761Seric		three mailers: "smtp" for regular (old-style) SMTP to
24263761Seric		other servers, "esmtp" for extended SMTP to other
24363761Seric		servers, and "relay" for transmission to our
24463761Seric		RELAY_HOST or MAILER_HUB.
24551220Seric
24651220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
24751220Seric		defines two mailers, "uucp" and "suucp".  The latter
24851220Seric		is for when you know that the UUCP mailer at the other
24951220Seric		end can handle multiple recipients in one transfer.
25057246Seric		When you invoke this, sendmail looks for all names in
25165218Seric		the $=U class and sends them to the uucp-old mailer; all
25265218Seric		names in the $=Y class are sent to uucp-new; and all
25365218Seric		names in the $=Z class are sent to uucp-uudom.  Note that
25457246Seric		this is a function of what version of rmail runs on
25557246Seric		the receiving end, and hence may be out of your control.
25665218Seric		If smtp is defined, it also defines "uucp-dom" and
25765218Seric		"uucp-uudom" mailers that use domain-style rewriting.
25865218Seric		See the section below describing UUCP mailers in more
25965218Seric		detail.
26051220Seric
26158087Sericusenet		Usenet (network news) delivery.  If this is specified,
26258087Seric		an extra rule is added to ruleset 0 that forwards all
26358087Seric		local email for users named ``group.usenet'' to the
26458087Seric		``inews'' program.  Note that this works for all groups,
26558087Seric		and may be considered a security problem.
26658087Seric
26758363Sericfax		Facsimile transmission.  This is experimental and based
26858363Seric		on Sam Leffler's FlexFAX software.  For more information,
26958363Seric		see below.
27058087Seric
27165148Sericpop		Post Office Protocol.
27258363Seric
27365148Seric
27457246Seric+----------+
27557246Seric| FEATURES |
27657246Seric+----------+
27751268Seric
27857246SericSpecial features can be requested using the "FEATURE" macro.  For
27957246Sericexample, the .mc line:
28057246Seric
28157246Seric	FEATURE(use_cw_file)
28257246Seric
28357246Serictells sendmail that you want to have it read an /etc/sendmail.cw
28458782Sericfile to get values for class $=w.  The FEATURE may contain a single
28558782Sericoptional parameter -- for example:
28657246Seric
28758782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
28858782Seric
28958782SericAvailable features are:
29058782Seric
29157246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
29257246Seric		names for this host.  This might be used if you were
29357246Seric		on a host that MXed for a dynamic set of other
29457246Seric		hosts.  If the set is static, just including the line
29557246Seric		"Cw<name1> <name2> ..." is probably superior.
29658408Seric		The actual filename can be overridden by redefining
29758408Seric		confCW_FILE.
29864324Seric
29958087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
30058087Seric		a ``551 User not local; please try <address>'' message.
30158087Seric		If this is set, you can alias people who have left
30258087Seric		to their new address with ".REDIRECT" appended.
30364324Seric
30458284Sericnouucp		Don't do anything special with UUCP addresses at all.
30564324Seric
30659080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
30759080Seric		This would generally only be used by sites that only
30859080Seric		act as mail gateways or which have user agents that do
30964028Seric		full canonification themselves.  You may also want to
31064028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
31164028Seric		turn off the usual resolver options that do a similar
31264028Seric		thing.
31364324Seric
31458526Sericnotsticky	By default, email sent to "user@local.host" are marked
31558526Seric		as "sticky" -- that is, the local addresses aren't
31658526Seric		matched against UDB and don't go through ruleset 5.
31758526Seric		This features disables this treatment.  It would
31858526Seric		normally be used on network gateway machines.
31964324Seric
32058782Sericmailertable	Include a "mailer table" which can be used to override
32158782Seric		routing for particular domains.  The argument of the
32258782Seric		FEATURE may be the key definition.  If none is specified,
32358782Seric		the definition used is:
32464164Seric			hash -o /etc/mailertable
32563761Seric		Keys in this database are fully qualified domain names
32663761Seric		or partial domains preceded by a dot -- for example,
32763761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
32863761Seric		Values must be of the form:
32958782Seric			mailer:domain
33063761Seric		where "mailer" is the internal mailer name, and "domain"
33163761Seric		is where to send the message.  These maps are not
33263761Seric		reflected into the message header.
33364324Seric
33463761Sericdomaintable	Include a "domain table" which can be used to provide
33563761Seric		full domains on unqualified (single word) hosts.  The
33663761Seric		argument of the FEATURE may be the key definition.  If
33763761Seric		none is specified, the definition used is:
33864164Seric			hash -o /etc/domaintable
33963761Seric		The key in this table is the unqualified host name; the
34063761Seric		value is the fully qualified domain.  Anything in the
34163761Seric		domaintable is reflected into headers; that is, this
34263761Seric		is done in ruleset 3.
34364324Seric
34459034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
34559034Seric		internet addresses.  The table can be built using the
34664153Seric		bitdomain program contributed by John Gardiner Myers.
34759034Seric		The argument of the FEATURE may be the key definition; if
34859034Seric		none is specified, the definition used is:
34964164Seric			hash -o /etc/bitdomain.db
35059034Seric		Keys are the bitnet hostname; values are the corresponding
35159034Seric		internet hostname.
35264324Seric
35359037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
35459037Seric		is:
35564164Seric			hash -o /etc/uudomain.db
35659037Seric		At the moment there is no automagic tool to build this
35759037Seric		database.
35864324Seric
35960263Sericalways_add_domain
36060263Seric		Include the local host domain even on locally delivered
36160263Seric		mail.  Normally it is not added unless it is already
36260263Seric		present.
36364324Seric
36463761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
36563761Seric		feature will cause recipient addresses to also masquerade
36663761Seric		as being from the masquerade host.  Normally they get
36763761Seric		the local hostname.  Although this may be right for
36863761Seric		ordinary users, it can break local aliases.  For example,
36963761Seric		if you send to "localalias", the originating sendmail will
37063761Seric		find that alias and send to all members, but send the
37163761Seric		message with "To: localalias@masqueradehost".  Since that
37263761Seric		alias likely does not exist, replies will fail.  Use this
37363761Seric		feature ONLY if you can guarantee that the ENTIRE
37463761Seric		namespace on your masquerade host supersets all the
37563761Seric		local entries.
37664324Seric
37764153Sericnodns		We aren't running DNS at our site (for example,
37864153Seric		we are UUCP-only connected).  It's hard to consider
37964153Seric		this a "feature", but hey, it had to go somewhere.
38057246Seric
38164324Sericnullclient	This is a special case -- it creates a stripped down
38264324Seric		configuration file containing nothing but support for
38364394Seric		forwarding all mail to a central hub via a local
38464394Seric		SMTP-based network.  The argument is the name of that
38564394Seric		hub.
38664394Seric
38764394Seric		The only other feature that should be used in conjunction
38864394Seric		with this one is "nocanonify" (this causes addresses to
38964394Seric		be sent unqualified via the SMTP connection; normally
39064394Seric		they are qualifed with the masquerade name, which
39164394Seric		defaults to the name of the hub machine).  No mailers
39264394Seric		should be defined.  No aliasing or forwarding is done.
39357246Seric
39464324Seric
39557246Seric+-------+
39657246Seric| HACKS |
39757246Seric+-------+
39857246Seric
39957246SericSome things just can't be called features.  To make this clear,
40057247Sericthey go in the hack subdirectory and are referenced using the HACK
40157246Sericmacro.  These will tend to be site-dependent.  The release
40257246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
40357246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
40457246Sericthis is intended as a short-term aid while we move hosts into
40557246Sericsubdomains.
40657246Seric
40758087Seric
40857246Seric+--------------------+
40957246Seric| SITE CONFIGURATION |
41057246Seric+--------------------+
41157246Seric
41257246SericComplex sites will need more local configuration information, such as
41357246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
41457246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
41557246Seric
41657246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
41757246Sericconfiguration information stored in the siteconfig subdirectory.  For
41857246Sericexample, the line
41957246Seric
42057246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
42157246Seric
42257246Sericreads the file uucp.ucbvax for local connection information.  The
42357246Sericsecond parameter is the local name (in this case just "ucbvax" since
42457246Sericit is locally connected, and hence a UUCP hostname) and the name of
42557246Sericthe class in which to store the host information.  Another SITECONFIG
42657246Sericline reads
42757246Seric
42857246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
42957246Seric
43057246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
43157246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
43257246Sericstore this list.  [The machine ucbarpa is gone now, but I've left
43357246Sericthis out-of-date configuration file around to demonstrate how you
43457246Sericmight do this.]
43557246Seric
43657246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
43757246Sericmore than a sequence of SITE macros describing connectivity.  For
43857246Sericexample:
43957246Seric
44057246Seric	SITE(cnmat)
44157246Seric	SITE(sgi olympus)
44257246Seric
44357246SericThe second example demonstrates that you can use two names on the
44457246Sericsame line; these are usually aliases for the same host (or are at
44557246Sericleast in the same company).
44657246Seric
44758087Seric
44865218Seric+--------------------+
44965218Seric| USING UUCP MAILERS |
45065218Seric+--------------------+
45165218Seric
45265218SericIt's hard to get UUCP mailers right because of the extremely ad hoc
45365218Sericnature of UUCP addressing.  These config files are really designed
45465218Sericfor domain-based addressing, even for UUCP sites.
45565218Seric
45665218SericThere are four UUCP mailers available.  The choice of which one to
45765218Sericuse is partly a matter of local preferences and what is running at
45865218Sericthe other end of your UUCP connection.  Unlike good protocols that
45965218Sericdefine what will go over the wire, UUCP uses the policy that you
46065218Sericshould do what is right for the other end; if they change, you have
46165218Sericto change.  This makes it hard to do the right thing, and discourages
46265218Sericpeople from updating their software.  In general, if you can avoid
46365218SericUUCP, please do.
46465218Seric
46565218SericThe major choice is whether to go for a domainized scheme or a
46665218Sericnon-domainized scheme.  This depends entirely on what the other
46765218Sericend will recognize.  If at all possible, you should encourage the
46865218Sericother end to go to a domain-based system -- non-domainized addresses
46965218Sericdon't work entirely properly.
47065218Seric
47165218SericThe four mailers are:
47265218Seric
47365218Seric    uucp-old (obsolete name: "uucp")
47465218Seric	This is the oldest, the worst (but the closest to UUCP) way of
47565218Seric	sending messages accros UUCP connections.  It does bangify
47665218Seric	everything and prepends $U (your UUCP name) to the sender's
47765218Seric	address (which can already be a bang path itself).  It can
47865218Seric	only send to one address at a time, so it spends a lot of
47965218Seric	time copying duplicates of messages.  Avoid this if at all
48065218Seric	possible.
48165218Seric
48265218Seric    uucp-new (obsolete name: "suucp")
48365218Seric	The same as above, except that it assumes that in one rmail
48465218Seric	command you can specify several recipients.  It still has a
48565218Seric	lot of other problems.
48665218Seric
48765218Seric    uucp-dom
48865218Seric	This UUCP mailer keeps everything as domain addresses.
48965218Seric	Basically, it uses the SMTP mailer rewriting rules.
49065218Seric
49165218Seric	Unfortunately, a lot of UUCP mailer transport agents require
49265218Seric	bangified addresses in the envelope, although you can use
49365218Seric	domain-based addresses in the message header.  (The envelope
49465218Seric	shows up as the From_ line on UNIX mail.)  So....
49565218Seric
49665218Seric    uucp-uudom
49765218Seric	This is a cross between uucp-new (for the envelope addresses)
49865218Seric	and uucp-dom (for the header addresses).  It bangifies the
49965218Seric	envelope sender (From_ line in messages) without adding the
50065218Seric	local hostname, unless there is no host name on the address
50165218Seric	at all (e.g., "wolf") or the host component is a UUCP host name
50265218Seric	instead of a domain name ("somehost!wolf" instead of
50365218Seric	"some.dom.ain!wolf").
50465218Seric
50565218SericExamples:
50665218Seric
50765218SericWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
50865218Sericfollowing summarizes the sender rewriting for various mailers.
50965218Seric
51065218SericMailer          sender		rewriting in the envelope
51165218Seric------		------		-------------------------
51265218Sericuucp-{old,new}	wolf		grasp!wolf
51365218Sericuucp-dom	wolf		wolf@grasp.insa-lyon.fr
51465218Sericuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
51565218Seric
51665218Sericuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
51765218Sericuucp-dom	wolf@fr.net	wolf@fr.net
51865218Sericuucp-uudom	wolf@fr.net	fr.net!wolf
51965218Seric
52065218Sericuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
52165218Sericuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
52265218Sericuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
52365218Seric
52465218SericIf you are using one of the domainized UUCP mailers, you really want
52565218Sericto convert all UUCP addresses to domain format -- otherwise, it will
52665218Sericdo it for you (and probably not the way you expected).  For example,
52765218Sericif you have the address foo!bar!baz (and you are not sending to foo),
52865218Sericthe heuristics will add the @uucp.relay.name or @local.host.name to
52965218Sericthis address.  However, if you map foo to foo.host.name first, it
53065218Sericwill not add the local hostname.  You can do this using the uucpdomain
53165218Sericfeature.
53265218Seric
53365218Seric
53457246Seric+-------------------+
53557246Seric| TWEAKING RULESETS |
53657246Seric+-------------------+
53757246Seric
53851268SericFor more complex configurations, you can define special rules.
53951268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
54051268Sericthe names.  Any modifications made here are reflected in the header.
54151268Seric
54251268SericA common use is to convert old UUCP addreses to SMTP addresses using
54351268Sericthe UUCPSMTP macro.  For example:
54451268Seric
54551268Seric	LOCAL_RULE_3
54651268Seric	UUCPSMTP(decvax,	decvax.dec.com)
54751268Seric	UUCPSMTP(research,	research.att.com)
54851268Seric
54951268Sericwill cause addresses of the form "decvax!user" and "research!user"
55051268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
55151268Sericrespectively.
55251268Seric
55365957SericThis could also be used to look up hosts in a database map:
55457246Seric
55557246Seric	LOCAL_RULE_3
55657246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
55757246Seric
55857246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
55957246Seric
56051268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
56151268SericFor example, new rules are needed to parse hostnames that you accept
56251309Sericvia MX records.  For example, you might have:
56351268Seric
56451309Seric	LOCAL_RULE_0
56565986Seric	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
56651309Seric
56751309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
56851309Sericpointing at this host; this rule catches the message and forwards it on
56951309Sericusing UUCP.
57051309Seric
57158681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
57258681SericThese rulesets are normally empty.
57358681Seric
57457246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
57557246Sericboilerplate option setting but before rulesets, and can be used to
57657945Sericdeclare local database maps or whatever.  For example:
57751268Seric
57857246Seric	LOCAL_CONFIG
57957246Seric	Khostmap hash /etc/hostmap.db
58057246Seric	Kyplocal nis -m hosts.byname
58151220Seric
58258087Seric
58357246Seric+---------------------------+
58457246Seric| MASQUERADING AND RELAYING |
58557246Seric+---------------------------+
58657246Seric
58757246SericYou can have your host masquerade as another using
58857246Seric
58957246Seric	MASQUERADE_AS(host.domain)
59057246Seric
59165957SericThis causes outgoing SMTP mail to be labeled as coming from the
59257246Sericindicated domain, rather than $j.  One normally masquerades as one
59365957Sericof one's own subdomains (for example, it's unlikely that I would
59457246Sericchoose to masquerade as an MIT site).
59557246Seric
59664153SericThe masquerade name is not normally canonified, so it is important
59764153Sericthat it be your One True Name, that is, fully qualified and not a
59864153SericCNAME.
59964153Seric
60057246Sericthere are always users that need to be "exposed" -- that is, their
60157246Sericinternal site name should be displayed instead of the masquerade name.
60257246SericRoot is an example.  You can add users to this list using
60357246Seric
60457246Seric	EXPOSED_USER(usernames)
60557246Seric
60657246SericThis adds users to class E; you could also use something like
60757246Seric
60857246Seric	FE/etc/sendmail.cE
60957246Seric
61057246SericYou can also arrange to relay all unqualified names (that is, names
61157246Sericwithout @host) to a relay host.  For example, if you have a central
61257246Sericemail server, you might relay to that host so that users don't have
61357246Sericto have .forward files or aliases.  You can do this using
61457246Seric
61558071Seric	define(`LOCAL_RELAY', mailer:hostname)
61657246Seric
61758071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
61858071Seric"smtp".  There are some user names that you don't want relayed, perhaps
61958071Sericbecause of local aliases.  A common example is root, which may be
62058071Sericlocally aliased.  You can add entries to this list using
62157246Seric
62257246Seric	LOCAL_USER(usernames)
62357246Seric
62457246SericThis adds users to class L; you could also use something like
62557246Seric
62657246Seric	FL/etc/sendmail.cL
62757246Seric
62864153SericIf you want all incoming mail sent to a centralized hub, as for a
62964153Sericshared /var/spool/mail scheme, use
63057591Seric
63158071Seric	define(`MAIL_HUB', mailer:hostname)
63257591Seric
63358071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
634*66047Sericand MAIL_HUB, unqualified names will be sent to the LOCAL_RELAY and
635*66047Sericother local names will be sent to MAIL_HUB.  Names in $=L will be
636*66047Sericdelivered locally, so you MUST have aliases or .forward files for them.
637*66047Seric
638*66047SericFor example, if are on machine mastodon.CS.Berkeley.EDU, the following
63958071Sericcombinations of settings will have the indicated effects:
64057591Seric
64157591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
64257591Seric
64357591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
64457591Sericmail.CS.Berkeley.EDU
64557591Seric
64657591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
64757591Sericmammoth.CS.Berkeley.EDU
64857591Seric
64957591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
65057591SericMAIL_HUB set as above
65157591Seric
65264153SericIf you want all outgoing mail to go to a central relay site, define
65364153SericSMART_HOST as well.  Briefly:
65458071Seric
65564153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
65664153Seric	MAIL_HUB applies to names qualified with the name of the
65764153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
65864153Seric	SMART_HOST applies to names qualified with other hosts.
65964153Seric
66064153SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and
66164153SericFAX_RELAY) take precedence over SMART_HOST, so if you really want
66264153Sericabsolutely everything to go to a single central site you will need to
66364153Sericunset all the other relays -- or better yet, find or build a minimal
66464153Sericconfig file that does this.
66564153Seric
66664153Seric
66758071Seric+-------------------------------+
66858071Seric| NON-SMTP BASED CONFIGURATIONS |
66958071Seric+-------------------------------+
67058071Seric
67158071SericThese configuration files are designed primarily for use by SMTP-based
67258071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
67358071SericUUCP-primarily nodes (the latter is defined as a small local net
67458071Sericconnected to the rest of the world via UUCP).  However, there is one
67558071Serichook to handle some special cases.
67658071Seric
67758071SericYou can define a ``smart host'' that understands a richer address syntax
67858071Sericusing:
67958071Seric
68058071Seric	define(`SMART_HOST', mailer:hostname)
68158071Seric
68264028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
68358071Sericcan't be handled using the usual UUCP rules are passed to this host.
68458071Seric
68558071SericIf you are on a local SMTP-based net that connects to the outside
68658071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
68758071SericFor example:
68858071Seric
68958071Seric	define(`SMART_HOST', suucp:uunet)
69058071Seric	LOCAL_NET_CONFIG
69163761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
69258071Seric
69358071SericThis will cause all names that end in your domain name ($m) via
69458071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
69563761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
69663761Sericthe $m.  If you are running a local DNS inside your domain which is
69763761Sericnot otherwise connected to the outside world, you probably want to
69863761Sericuse:
69958071Seric
70063761Seric	define(`SMART_HOST', smtp:fire.wall.com)
70163761Seric	LOCAL_NET_CONFIG
70263761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
70358071Seric
70463761SericThat is, send directly only to things you found in your DNS lookup;
70563761Sericanything else goes through SMART_HOST.
70663761Seric
70764153SericIf you are not running DNS at all, it is important to use
70864153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
70964153Sericfor the name server to come up.
71063761Seric
71164153Seric
71264259Seric+-----------+
71364259Seric| WHO AM I? |
71464259Seric+-----------+
71564259Seric
71664259SericNormally, the $j macro is automatically defined to be your fully
71764259Sericqualified domain name (FQDN).  Sendmail does this by getting your
71864259Serichost name using gethostname and then calling gethostbyname on the
71964259Sericresult.  For example, in some environments gethostname returns
72064259Sericonly the root of the host name (such as "foo"); gethostbyname is
72164259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
72264259Sericcases, gethostbyname may fail to return the FQDN.  In this case
72364259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
72464259Sericname.  This is usually done using:
72564259Seric
72664259Seric	Dmbar.com
72764259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
72864259Seric
72964259Seric
73064028Seric+--------------------+
73164028Seric| USING MAILERTABLES |
73264028Seric+--------------------+
73364028Seric
73464028SericTo use FEATURE(mailertable), you will have to create an external
73564028Sericdatabase containing the routing information for various domains.
73664028SericFor example, a mailertable file in text format might be:
73764028Seric
73864028Seric	.my.domain		xnet:%1.my.domain
73964028Seric	uuhost1.my.domain	suucp:uuhost1
74064028Seric	.bitnet			smtp:relay.bit.net
74164028Seric
74264028SericThis should normally be stored in /etc/mailertable.  The actual
74364028Sericdatabase version of the mailertable is built using:
74464028Seric
74564028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
74664028Seric
74764028SericThe semantics are simple.  Any LHS entry that does not begin with
74864028Serica dot matches the full host name indicated.  LHS entries beginning
74964028Sericwith a dot match anything ending with that domain name -- that is,
75064028Sericthey can be thought of as having a leading "*" wildcard.  Matching
75164028Sericis done in order of most-to-least qualified -- for example, even
75264028Sericthough ".my.domain" is listed first in the above example, an entry
75364028Sericof "uuhost1.my.domain" will match the second entry since it is
75464028Sericmore explicit.
75564028Seric
75664028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
75764028Sericconfiguration name of a mailer (that is, an `M' line in the
75864028Sericsendmail.cf file).  The "host" will be the hostname passed to
75964028Sericthat mailer.  In domain-based matches (that is, those with leading
76064028Sericdots) the "%1" may be used to interpolate the wildcarded part of
76164028Sericthe host name.  For example, the first line above sends everything
76264028Sericaddressed to "anything.my.domain" to that same host name, but using
76364028Sericthe (presumably experimental) xnet mailer.
76464028Seric
76564028Seric
76664153Seric+--------------------------------+
76764153Seric| USING USERDB TO MAP FULL NAMES |
76864153Seric+--------------------------------+
76964153Seric
77064153SericThe user database was not originally intended for mapping full names
77164153Sericto login names (e.g., Eric.Allman => eric), but some people are using
77264153Sericit that way.  (I would recommend that you set up aliases for this
77364153Sericpurpose instead -- since you can specify multiple alias files, this
77464153Sericis fairly easy.)  The intent was to locate the default maildrop at
77564153Serica site, but allow you to override this by sending to a specific host.
77664153Seric
77764153SericIf you decide to set up the user database in this fashion, it is
77864153Sericimperative that you also specify FEATURE(notsticky) -- otherwise,
77964153Serice-mail sent to Full.Name@local.host.name will be rejected.
78064153Seric
78164259SericTo build the internal form of the user databae, use:
78264153Seric
78364259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
78464259Seric
78564259Seric
78658363Seric+------------------+
78758363Seric| FlexFAX SOFTWARE |
78858363Seric+------------------+
78958363Seric
79058363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
79158363Sericpublic version out "later this week" [as of 3/1/93].  The following
79258363Sericblurb is direct from Sam:
79358363Seric
79464498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
79558363Seric
79658363Seric	How To Obtain This Software (in case all you get is this file)
79764498Seric	--------------------------------------------------------------
79858363Seric	The source code is available for public ftp on
79964498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
80058363Seric		(192.48.153.1)
80158363Seric
80258363Seric	You can also obtain inst'able images for Silicon Graphics machines from
80364498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
80458363Seric		(192.48.153.1)
80558363Seric
80658363Seric	For example,
80758363Seric	    % ftp -n sgi.com
80858363Seric	    ....
80958363Seric	    ftp> user anonymous
81058363Seric	    ... <type in password>
81158363Seric	    ftp> cd sgi/fax
81258363Seric	    ftp> binary
81364498Seric	    ftp> get v2.1.src.tar.Z
81458363Seric
81564498Seric	In general, the latest version of the 2.1 release of the software is
81664498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
81764498Seric	directory.  This file is a link to the appropriate released version (so
81864498Seric	don't waste your time retrieving the linked file as well!) Any files of
81964498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
82064498Seric	versions of the source code.  For example, the file v2.1.0.patch would
82164498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
82264498Seric	different than the naming conventions used during beta testing.) Patch
82364498Seric	files only work to go between consecutive versions, so if you are
82464498Seric	multiple versions behind the latest release, you will need to apply
82564498Seric	each patch file between your current version and the latest.
82664498Seric
82764498Seric
82864498Seric	Obtaining the Software by Electronic Mail
82964498Seric	-----------------------------------------
83064498Seric	Do not send me requests for the software; they will be ignored (without
83164498Seric	response).  If you cannot use FTP at all, there is a service called
83264498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
83364498Seric	this machine and it will use FTP to retrieve files for you and send you
83464498Seric	the files back again via e-mail.  To find out more about the ftpmail
83558363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
83658363Seric	consists of the single line "help".
83758363Seric
83864498Seric
83964498Seric	Obtaining the Software Within Silicon Graphics
84064498Seric	----------------------------------------------
84158363Seric	Internal to Silicon Graphics there are inst'able images on the host
84264498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
84358363Seric
84464498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
84558363Seric
84664498Seric	to install the latest version of the software on your machine.
84758363Seric
84864498Seric
84964498Seric	What to do Once You've Retrieved Stuff
85064498Seric	--------------------------------------
85158363Seric	The external distributions come in a compressed or uncompressed tar
85258363Seric	file.  To extract the source distribution:
85358363Seric
85464498Seric	    % zcat v2.1.src.tar.Z | tar xf -
85558363Seric
85658363Seric	(uncompress and extract individual files in current directory).  To
85758363Seric	unpack and install the client portion of the inst'able distribution:
85858363Seric
85958363Seric	    % mkdir dist
86064498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
86158363Seric	    % inst -f dist/flexfax
86258363Seric	    ...
86358363Seric	    inst> go
86458363Seric
86558363Seric	(Note, the dist subdirectory is because some versions of inst fail if
86664498Seric	the files are in the current directory.) Server binaries are also
86764498Seric	included in the inst'able images as flexfax.server.*.  They are not
86864498Seric	installed by default, so to get them also you need to do:
86958363Seric
87058363Seric	    % inst -f flexfax
87158363Seric	    ...
87258363Seric	    inst> install flexfax.server.*
87358363Seric	    inst> go
87458363Seric
87564498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
87658363Seric	system.  They should work w/o problem on earlier versions of the
87758363Seric	system, but I have not fully tested this.  Also, note that to install a
87858363Seric	server on an SGI machine, you need to have installed the Display
87958363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
88058363Seric	server will not be able to convert PostScript to facsimile for
88158363Seric	transmission.
88258363Seric
88364498Seric	If you are working from the source distribution, look at the file
88464498Seric	README in the top of the source tree.  If you are working from the inst
88564498Seric	images, the subsystem flexfax.man.readme contains the README file and
88664498Seric	other useful pieces of information--the installed files are placed in
88764498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
88864498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
88964498Seric	the README file and the manual page for faxaddmodem for information.
89058363Seric
89158363Seric
89264498Seric	FlexFAX Mail List
89364498Seric	-----------------
89458363Seric	A mailing list for users of this software is located on sgi.com.
89558363Seric	If you want to join this mailing list or have a list-related request
89658363Seric	such as getting your name removed from it, send a request to
89758363Seric
89864498Seric	    majordomo@whizzer.wpd.sgi.com
89958363Seric
90064498Seric	For example, to subscribe, send the line "subscribe flexfax" in
90164498Seric	the body of your message.  The line "help" will return a list of
90264498Seric	the commands understood by the mailing list management software.
90364498Seric
90458363Seric	Submissions (including bug reports) should be directed to:
90558363Seric
90658363Seric	    flexfax@sgi.com
90758363Seric
90864498Seric	When corresponding about this software please always specify what
90964498Seric	version you have, what system you're running on, and, if the problem is
91064498Seric	specific to your modem, identify the modem and firmware revision.
91158363Seric
91264498Seric
91357945Seric+--------------------------------+
91457945Seric| TWEAKING CONFIGURATION OPTIONS |
91557945Seric+--------------------------------+
91657945Seric
91757945SericThere are a large number of configuration options that don't normally
91857945Sericneed to be changed.  However, if you feel you need to tweak them, you
91957945Sericcan define the following M4 variables.  This list is shown in four
92057945Sericcolumns:  the name you define, the default value for that definition,
92157945Sericthe option or macro that is affected (either Ox for an option or Dx
92257945Sericfor a macro), and a brief description.  Greater detail of the semantics
92357945Sericcan be found in the Installation and Operations Guide.
92457945Seric
92563582SericSome options are likely to be deprecated in future versions -- that is,
92663582Sericthe option is only included to provide back-compatibility.  These are
92763582Sericmarked with "*".
92863582Seric
92965002SericRemember that these options are M4 variables, and hence may need to
93065002Sericbe quoted.  In particular, arguments with commas will usually have to
93165002Sericbe ``double quoted, like this phrase'' to avoid having the comma
93265002Sericconfuse things.  This is common for alias file definitions and for
93365002Sericthe read timeout.
93465002Seric
93557945SericM4 Variable Name	Default		Mac/Opt	Description
93665002Seric================	=======		=======	===========
93757945SericconfMAILER_NAME		MAILER-DAEMON	Dn	The sender name used for
93857945Seric						internally generated
93957945Seric						outgoing messages.
94058681SericconfFROM_LINE		From $g  $d	Dl	The From_ line used when
94158681Seric						sending to files or programs.
94257945SericconfFROM_HEADER		$?x$x <$g>$|$g$.	The format of an internally
94357945Seric					Dq	generated From: address.
94457945SericconfOPERATORS		.:%@!^/[]	Do	Address operator characters.
94564153SericconfSMTP_LOGIN_MSG	$j Sendmail $v/$Z ready at $b
94657945Seric					De	The initial (spontaneous)
94757945Seric						SMTP greeting message.
94859743SericconfSEVEN_BIT_INPUT	False		O7	Force input to seven bits?
94957945SericconfALIAS_WAIT		10		Oa	Wait (in minutes) for alias
95057945Seric						file rebuild.
95158087SericconfMIN_FREE_BLOCKS	4		Ob	Minimum number of free blocks
95258087Seric						on queue filesystem to accept
95358087Seric						SMTP mail.
95457945SericconfBLANK_SUB		.		OB	Blank (space) substitution
95557945Seric						character.
95665619SericconfCON_EXPENSIVE	False		Oc	Avoid connecting immediately
95765619Seric						to mailers marked expensive?
95857945SericconfCHECKPOINT_INTERVAL	10		OC	Checkpoint queue files
95957945Seric						every N recipients.
96057945SericconfDELIVERY_MODE	background	Od	Default delivery mode.
96157945SericconfAUTO_REBUILD	False		OD	Automatically rebuild
96257945Seric						alias file if needed.
96357945SericconfERROR_MODE		(undefined)	Oe	Error message mode.
96457945SericconfERROR_MESSAGE	(undefined)	OE	Error message header/file.
96557945SericconfSAVE_FROM_LINES	False		Of	Save extra leading
96657945Seric						From_ lines.
96757945SericconfTEMP_FILE_MODE	0600		OF	Temporary file mode.
96857945SericconfDEF_GROUP_ID	1		Og	Default group id.
96957945SericconfMATCH_GECOS		False		OG	Match GECOS field.
97057945SericconfMAX_HOP		17		Oh	Maximum hop count.
97163582SericconfIGNORE_DOTS		False		Oi *	Ignore dot as terminator
97257945Seric						for incoming messages?
97357945SericconfBIND_OPTS		(empty)		OI	Default options for BIND.
97463582SericconfMIME_FORMAT_ERRORS	True		Oj *	Send error messages as MIME-
97559743Seric						encapsulated messages per
97659743Seric						RFC 1344.
97764153SericconfFORWARD_PATH	(undefined)	OJ	The colon-separated list of
97864153Seric						places to search for .forward
97964153Seric						files.
98057945SericconfMCI_CACHE_SIZE	2		Ok	Size of open connection cache.
98157945SericconfMCI_CACHE_TIMEOUT	5m		OK	Open connection cache timeout.
98263582SericconfUSE_ERRORS_TO	False		Ol *	Use the Errors-To: header to
98363582Seric						deliver error messages.  This
98463582Seric						should not be necessary because
98563582Seric						of general acceptance of the
98663582Seric						envelope/header distinction.
98757945SericconfLOG_LEVEL		9		OL	Log level.
98857945SericconfME_TOO		False		Om	Include sender in group
98957945Seric						expansions.
99057945SericconfCHECK_ALIASES	True		On	Check RHS of aliases when
99157945Seric						running newaliases.
99263582SericconfOLD_STYLE_HEADERS	True		Oo *	Assume that headers without
99357945Seric						special chars are old style.
99458859SericconfDAEMON_OPTIONS	(undefined)	OO	SMTP daemon options.
99558806SericconfPRIVACY_FLAGS	authwarnings	Op	Privacy flags.
99657945SericconfCOPY_ERRORS_TO	(undefined)	OP	Address for additional copies
99757945Seric						of all error messages.
99857945SericconfQUEUE_FACTOR	(undefined)	Oq	Slope of queue-only function
99958116SericconfREAD_TIMEOUT	(undefined)	Or	SMTP read timeouts.
100063582SericconfSAFE_QUEUE		True		Os *	Commit all messages to disk
100157945Seric						before forking.
100258806SericconfMESSAGE_TIMEOUT	5d/4h		OT	Timeout for messages before
100358806Seric						sending error/warning message.
100459317SericconfTIME_ZONE		USE_SYSTEM	Ot	Time zone info -- can be
100557945Seric						USE_SYSTEM to use the system's
100657945Seric						idea, USE_TZ to use the user's
100757945Seric						TZ envariable, or something
100857945Seric						else to force that value.
100957945SericconfDEF_USER_ID		1		Ou	Default user id.
101058718SericconfUSERDB_SPEC		(undefined)	OU	User database specification.
101158859SericconfFALLBACK_MX		(undefined)	OV	Fallback MX host.
101263857SericconfTRY_NULL_MX_LIST	False		Ow	If we are the best MX for a
101363857Seric						host and haven't made other
101463857Seric						arrangements, try connecting
101563857Seric						to the host directly; normally
101663857Seric						this would be a config error.
101757945SericconfQUEUE_LA		8		Ox	Load average at which queue-only
101857945Seric						function kicks in.
101957945SericconfREFUSE_LA		12		OX	Load average at which incoming
102057945Seric						SMTP connections are refused.
102163582SericconfWORK_RECIPIENT_FACTOR
102263582Seric			(undefined)	Oy	Cost of each recipient.
102363582SericconfSEPARATE_PROC	False		OY	Run all deliveries in a
102457945Seric						separate process.
102557945SericconfWORK_CLASS_FACTOR	(undefined)	Oz	Priority multiplier for class.
102657945SericconfWORK_TIME_FACTOR	(undefined)	OZ	Cost of each delivery attempt.
102758408SericconfCW_FILE		/etc/sendmail.cw	Name of file used to get the
102858408Seric					Fw	local additions to the $=w
102958408Seric						class.
103064153SericconfSMTP_MAILER		smtp		-	The mailer name used when
103163972Seric						SMTP connectivity is required.
103263972Seric						Either "smtp" or "esmtp".
103363999SericconfLOCAL_MAILER	local		-	The mailer name used when
103463999Seric						local connectivity is required.
103563999Seric						Almost always "local".
103664028SericconfRELAY_MAILER	relay		-	The default mailer name used
103764028Seric						for relaying any mail (e.g.,
103864028Seric						to a BITNET_RELAY, a
103964028Seric						SMART_HOST, or whatever).
104064028Seric						This can reasonably be "suucp"
104164028Seric						if you are on a UUCP-connected
104264028Seric						site.
104364259SericconfDOMAIN_NAME		(undefined)	Dj	If defined, sets $j.
104457945Seric
104558087Seric
104657246Seric+-----------+
104757246Seric| HIERARCHY |
104857246Seric+-----------+
104957246Seric
105051220SericWithin this directory are several subdirectories, to wit:
105151220Seric
105251220Sericm4		General support routines.  These are typically
105351220Seric		very important and should not be changed without
105457247Seric		very careful consideration.
105551220Seric
105651220Sericcf		The configuration files themselves.  They have
105751220Seric		".mc" suffixes, and must be run through m4 to
105851220Seric		become complete.  The resulting output should
105951220Seric		have a ".cf" suffix.
106051220Seric
106151220Sericostype		Definitions describing a particular operating
106251220Seric		system type.  These should always be referenced
106351220Seric		using the OSTYPE macro in the .mc file.  Examples
106451220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
106551220Seric		"sunos4.1".
106651220Seric
106751220Sericdomain		Definitions describing a particular domain, referenced
106851220Seric		using the DOMAIN macro in the .mc file.  These are
106951220Seric		site dependent; for example, we contribute "cs.exposed.m4"
107051220Seric		and "cs.hidden.m4" which both describe hosts in the
107151220Seric		CS.Berkeley.EDU subdomain; the former displays the local
107251220Seric		hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the
107351220Seric		latter does its best to hide the identity of the local
107451220Seric		workstation inside the CS subdomain.
107551220Seric
107651220Sericmailer		Descriptions of mailers.   These are referenced using
107751220Seric		the MAILER macro in the .mc file.
107851220Seric
107951220Sericsh		Shell files used when building the .cf file from the
108051220Seric		.mc file in the cf subdirectory.
108151220Seric
108251220Sericfeature		These hold special orthogonal features that you might
108351220Seric		want to include.  They should be referenced using
108451220Seric		the FEATURE macro.
108551220Seric
108651220Serichack		Local hacks.  These can be referenced using the HACK
108751220Seric		macro.  They shouldn't be of more than voyeuristic
108851220Seric		interest outside the .Berkeley.EDU domain, but who knows?
108965957Seric		We've all got our own peccadillos.
109051220Seric
109151268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
109251268Seric		UUCP sites.
109351220Seric
109451268Seric
109557246Seric+------------------------+
109657246Seric| ADMINISTRATIVE DETAILS |
109757246Seric+------------------------+
109851220Seric
109951220SericThe following sections detail usage of certain internal parts of the
110051220Sericsendmail.cf file.  Read them carefully if you are trying to modify
110151220Sericthe current model.  If you find the above descriptions adequate, these
110251220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
110351220Seric
110451220SericRULESETS (* means built in to sendmail)
110551220Seric
110651220Seric   0 *	Parsing
110751220Seric   1 *	Sender rewriting
110851220Seric   2 *	Recipient rewriting
110951220Seric   3 *	Canonicalization
111051220Seric   4 *	Post cleanup
111154839Seric   5 *	Local address rewrite (after aliasing)
111260539Seric  1x	mailer rules (sender qualification)
111360539Seric  2x	mailer rules (recipient qualification)
111464801Seric  3x	mailer rules (sender header qualification)
111564801Seric  4x	mailer rules (recipient header qualification)
111664801Seric  5x	mailer subroutines (general)
111764801Seric  6x	mailer subroutines (general)
111864801Seric  7x	mailer subroutines (general)
111964801Seric  8x	reserved
112060539Seric  90	Mailertable host stripping
112160892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
112260892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
112363857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
112451220Seric
112551220Seric
112651220SericMAILERS
112751220Seric
112851220Seric   0	local, prog	local and program mailers
112965218Seric   1	[e]smtp, relay	SMTP channel
113065218Seric   2	uucp-*		UNIX-to-UNIX Copy Program
113158087Seric   3	netnews		Network News delivery
113258363Seric   4	fax		Sam Leffler's FlexFAX software
113351220Seric
113451220Seric
113551220SericMACROS
113651220Seric
113751220Seric   A
113851220Seric   B	Bitnet Relay
113965182Seric   C
114054839Seric   D	The local domain -- usually not needed
114151220Seric   E
114258363Seric   F	FAX Relay
114351220Seric   G
114457591Seric   H	mail Hub (for mail clusters)
114551220Seric   I
114651220Seric   J
114751220Seric   K
114851220Seric   L
114951220Seric   M	Masquerade (who I claim to be)
115051220Seric   N
115151220Seric   O
115251220Seric   P
115351220Seric   Q
115451220Seric   R	Relay (for unqualified names)
115558071Seric   S	Smart Host
115651220Seric   T
115751309Seric   U	my UUCP name (if I have a UUCP connection)
115851309Seric   V	UUCP Relay (class V hosts)
115951220Seric   W	UUCP Relay (class W hosts)
116051220Seric   X	UUCP Relay (class X hosts)
116151309Seric   Y	UUCP Relay (all other hosts)
116251220Seric   Z	Version number
116351220Seric
116451220Seric
116551220SericCLASSES
116651220Seric
116751220Seric   A
116851220Seric   B
116951220Seric   C
117051220Seric   D
117157246Seric   E	addresses that should not seem to come from $M
117254839Seric   F	hosts we forward for
117351220Seric   G
117451220Seric   H
117551220Seric   I
117651220Seric   J
117751220Seric   K
117851220Seric   L	addresses that should not be forwarded to $R
117951220Seric   M
118051220Seric   N
118151220Seric   O	operators that indicate network operations (cannot be in local names)
118260211Seric   P	top level pseudo-domains: BITNET, FAX, UUCP, etc.
118351220Seric   Q
118451220Seric   R
118551220Seric   S
118651220Seric   T
118751220Seric   U	locally connected UUCP hosts
118851309Seric   V	UUCP hosts connected to relay $V
118951309Seric   W	UUCP hosts connected to relay $W
119051309Seric   X	UUCP hosts connected to relay $X
119151309Seric   Y	locally connected smart UUCP hosts
119264153Seric   Z	locally connected domain-ized UUCP hosts
119354839Seric   .	the class containing only a dot
119451220Seric
119551220Seric
119651220SericM4 DIVERSIONS
119751220Seric
119858071Seric   1	Local host detection and resolution
119958071Seric   2	Local Ruleset 3 additions
120058071Seric   3	Local Ruleset 0 additions
120151268Seric   4	UUCP Ruleset 0 additions
120251309Seric   5	locally interpreted names (overrides $R)
120354839Seric   6	local configuration (at top of file)
120451220Seric   7	mailer definitions
120554839Seric   8	special local name recognition (late in ruleset 3)
120658681Seric   9	special local rulesets (1 and 2)
1207