xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 60211)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*60211Seric		@(#)README	6.26 (Berkeley) 05/21/93
851220Seric
951220Seric
1057246SericThis document describes the sendmail configuration files being used
1157246Sericat Berkeley.  These use features in the new (R6) 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.
3457247SericSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 (which is a
3557247Sericlanguage unto itself) also works, but I don't intend to work so hard
3657247Sericto keep this up in the future.  [Note to GNU folks:  the construct
3757246Seric"define(`FOO')" should work without my having to add a null value.]
3851220Seric
3958284SericIF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
4058284Seric"m4 foo.mc > foo.cf" -- that should be all you need.
4158284Seric
4258284SericTo get started, you may want to look at tcpproto.mc (for TCP-only
4358284Sericsites) and uucpproto.m4 (for UUCP-only sites).  Others are versions
4458284Sericthat we use at Berkeley, although not all are in current use.  For
4558284Sericexample, ucbarpa has gone away, but I've left ucbarpa.mc in because
4658284Sericit demonstrates some interesting techniques.
4758284Seric
4857246SericI'm not pretending that this README describes everything that these
4957246Sericconfiguration files can do; clever people can probably tweak them
5057246Sericto great effect.  But it should get you started.
5157246Seric
5258087Seric
5357246Seric+--------------------------+
5457246Seric| INTRODUCTION AND EXAMPLE |
5557246Seric+--------------------------+
5657246Seric
5757246SericConfiguration files are contained in the subdirectory "cf", with a
5857246Sericsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
5957246Seric
6051220SericLet's examine a typical .mc file (cf/cs-exposed.mc):
6151220Seric
6251220Seric	divert(-1)
6351220Seric	#
6451220Seric	# Copyright (c) 1983 Eric P. Allman
6551220Seric	# Copyright (c) 1988 The Regents of the University of California.
6651220Seric	# All rights reserved.
6751220Seric	#
6851220Seric	# Redistribution and use in source and binary forms are permitted
6951220Seric	# provided that the above copyright notice and this paragraph are
7051220Seric	# duplicated in all such forms and that any documentation,
7151220Seric	# advertising materials, and other materials related to such
7251220Seric	# distribution and use acknowledge that the software was developed
7351220Seric	# by the University of California, Berkeley.  The name of the
7451220Seric	# University may not be used to endorse or promote products derived
7551220Seric	# from this software without specific prior written permission.
7651220Seric	# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
7751220Seric	# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
7851220Seric	# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
7951220Seric	#
8051220Seric
8157246SericThe divert(-1) will delete the crud in the resulting output file.
8257247SericThe copyright notice is what your lawyers require.  Our lawyers require
8357246Sericthe one that I've included in my files. A copyleft is a copyright by
8457246Sericanother name.
8551220Seric
8657246SericThe next line MUST be
8757246Seric
8851220Seric	include(`../m4/cf.m4')
8951220Seric
9057246SericThis will pull in the M4 macros you will need to make sense of
9157246Sericeverything else.  As the saying goes, don't think about it, just
9257246Sericdo it.  If you don't do it, don't bother reading the rest of this
9357246Sericfile.
9451220Seric
9556778Seric	VERSIONID(`<SCCS or RCS version id>')
9651220Seric
9751220SericVERSIONID is a macro that stuffs the version information into the
9851220Sericresulting file.  We use SCCS; you could use RCS, something else, or
9957246Sericomit it completely.  This is not the same as the version id included
10057246Sericin SMTP greeting messages -- this is defined in m4/version.m4.
10151220Seric
10251268Seric	DOMAIN(cs.exposed)
10351220Seric
10451220SericThis example exposes the host inside of the CS subdomain -- that is,
10551220Sericit doesn't try to hide the name of the workstation to the outside
10651220Sericworld.  Changing this to DOMAIN(cs.hidden) would have made outgoing
10751220Sericmessages refer to "<username>@CS.Berkeley.EDU" instead of using the
10857246Sericlocal hostname.  Internaly this is effected by using
10957246Seric"MASQUERADE_AS(CS.Berkeley.EDU)".
11051220Seric
11151268Seric	MAILER(smtp)
11251220Seric
11351309SericThese describe the mailers used at the default CS site site.  The
11451309Sericlocal mailer is always included automatically.
11551220Seric
11658087Seric
11757246Seric+--------+
11857246Seric| OSTYPE |
11957246Seric+--------+
12057246Seric
12151220SericNote that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes
12251220Sericdefault Computer Science Division environment.  There are several
12357247Sericexplicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1,
12457247Sericriscos4.5, sunos3.5, sunos4.1, and ultrix4.1.  These change things
12557247Sericlike the location of the alias file and queue directory.  Some of
12657247Sericthese files are identical to one another.
12751220Seric
12857246SericOperating system definitions are easy to write.  They may define
12957246Sericthe following variables (everything defaults, so an ostype file
13057246Sericmay be empty).
13151220Seric
13257246SericALIAS_FILE		[/etc/aliases] The location of the text version
13359761Seric			of the alias file(s).  It can be a comma-separated
13459761Seric			list of names.
13557246SericHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
13657246Seric			containing information printed in response to
13757246Seric			the SMTP HELP command.
13857246SericQUEUE_DIR		[/var/spool/mqueue] The directory containing
13957246Seric			queue files.
14057246SericSTATUS_FILE		[/etc/sendmail.st] The file containing status
14157246Seric			information.
14258087SericLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
14357246SericLOCAL_MAILER_FLAGS	[rn] The flags used by the local mailer.  The
14457246Seric			flags lsDFMm are always included.
14558087SericLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
14658087SericUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
14758087Seric			used to submit news.
14858087SericUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
14958087SericUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
15058087Seric			usenet mailer.
15159886SericSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.
15259886SericUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.
15357246SericHOSTMAP_SPEC		[dbm -o /etc/hostmap] The value for the builtin
15457246Seric			hostmap key definition.  You can redefine this
15557246Seric			to change the class, flags, and filename of
15657246Seric			the hostmap.  The default flag (-o) makes this
15757246Seric			map optional.
15857246Seric
15957246SericIn addition, the following boolean flags may be defined -- the value
16057246Sericis ignored.
16157246Seric
16257246SericNEED_DOMAIN		If set, the $j macro is defined as $w.$D.
16357246Seric			If not set, $j is defined as $w.  If this is
16457246Seric			set, the domain must be defined using the line
16557246Seric			DD<domainname> (probably in the domain file,
16657246Seric			but possibly in the .mc file).  You will only
16757246Seric			need this if you define your system hostname
16857246Seric			without a domain (type "hostname" -- if it
16958087Seric			has no dots in the output, you qualify) AND
17058087Seric			if you are not running the nameserver AND if
17158087Seric			the first (canonical) name in /etc/hosts for
17258087Seric			your machine has no domain -- OR if you are
17358087Seric			running Ultrix or OSF/1 sendmail.  Either of
17458087Seric			these is probably a mistake.
17557246Seric
17657246Seric+---------+
17757246Seric| DOMAINS |
17857246Seric+---------+
17957246Seric
18057246SericYou will probably want to collect domain-dependent defines into one
18157246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
18257246Sericdomain file includes definitions for several internal distinguished
18357246Serichosts:
18457246Seric
18557246SericUUCP_RELAY	The host that will forward UUCP-addressed email.
18657246Seric		If not defined, all UUCP sites must be directly
18757246Seric		connected.
18857246SericBITNET_RELAY	The host that will forward BITNET-addressed email.
18957246Seric		If not defined, the .BITNET pseudo-domain won't work.
19057246SericCSNET_RELAY	The host that will forward CSNET-addressed email.
19157246Seric		If not defined, the .CSNET pseudo-domain won't work.
19257246SericLOCAL_RELAY	The site that will handle unqualified names -- that
19357246Seric		is, names with out an @domain extension.  If not set,
19457246Seric		they are assumed to belong on this machine.  This
19557246Seric		allows you to have a central site to store a
19657246Seric		company- or department-wide alias database.  This
19757246Seric		only works at small sites, and there are better
19857246Seric		methods.
19957246Seric
20057246SericThe domain file can also be used to define a domain name, if needed
20157982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
20257982Sericat your site masquerade behind one email name, you could also use
20357982SericMASQUERADE_AS here.
20457246Seric
20558408SericYou do not have to define a domain -- in particular, if you are a
20658408Sericsingle machine sitting off somewhere, it is probably more work than
20758408Sericit's worth.  This is just a mechanism for combining "domain dependent
20858408Sericknowledge" into one place.
20958408Seric
21057246Seric+---------+
21157246Seric| MAILERS |
21257246Seric+---------+
21357246Seric
21451220SericThere are fewer mailers supported in this version than the previous
21551220Sericversion, owing mostly to a simpler world.
21651220Seric
21751220Sericlocal		The local and prog mailers.  You will almost always
21851220Seric		need these; the only exception is if you relay ALL
21957247Seric		your mail to another site.  This mailer is included
22057247Seric		automatically.
22151220Seric
22251220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
22351220Seric		not hide hosts behind a gateway or another other
22451220Seric		such hack; it assumes a world where everyone is
22551220Seric		running the name server.
22651220Seric
22751220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
22851220Seric		defines two mailers, "uucp" and "suucp".  The latter
22951220Seric		is for when you know that the UUCP mailer at the other
23051220Seric		end can handle multiple recipients in one transfer.
23157246Seric		When you invoke this, sendmail looks for all names in
23257246Seric		the $=U class and sends them to the uucp mailer; all
23357246Seric		names in the $=Y class are sent to suucp.  Note that
23457246Seric		this is a function of what version of rmail runs on
23557246Seric		the receiving end, and hence may be out of your control.
23651220Seric
23758087Sericusenet		Usenet (network news) delivery.  If this is specified,
23858087Seric		an extra rule is added to ruleset 0 that forwards all
23958087Seric		local email for users named ``group.usenet'' to the
24058087Seric		``inews'' program.  Note that this works for all groups,
24158087Seric		and may be considered a security problem.
24258087Seric
24358363Sericfax		Facsimile transmission.  This is experimental and based
24458363Seric		on Sam Leffler's FlexFAX software.  For more information,
24558363Seric		see below.
24658087Seric
24758363Seric
24857246Seric+----------+
24957246Seric| FEATURES |
25057246Seric+----------+
25151268Seric
25257246SericSpecial features can be requested using the "FEATURE" macro.  For
25357246Sericexample, the .mc line:
25457246Seric
25557246Seric	FEATURE(use_cw_file)
25657246Seric
25757246Serictells sendmail that you want to have it read an /etc/sendmail.cw
25858782Sericfile to get values for class $=w.  The FEATURE may contain a single
25958782Sericoptional parameter -- for example:
26057246Seric
26158782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
26258782Seric
26358782SericAvailable features are:
26458782Seric
26557246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
26657246Seric		names for this host.  This might be used if you were
26757246Seric		on a host that MXed for a dynamic set of other
26857246Seric		hosts.  If the set is static, just including the line
26957246Seric		"Cw<name1> <name2> ..." is probably superior.
27058408Seric		The actual filename can be overridden by redefining
27158408Seric		confCW_FILE.
27258087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
27358087Seric		a ``551 User not local; please try <address>'' message.
27458087Seric		If this is set, you can alias people who have left
27558087Seric		to their new address with ".REDIRECT" appended.
27658284Sericnouucp		Don't do anything special with UUCP addresses at all.
27759080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
27859080Seric		This would generally only be used by sites that only
27959080Seric		act as mail gateways or which have user agents that do
28059080Seric		full canonification themselves.
28158526Sericnotsticky	By default, email sent to "user@local.host" are marked
28258526Seric		as "sticky" -- that is, the local addresses aren't
28358526Seric		matched against UDB and don't go through ruleset 5.
28458526Seric		This features disables this treatment.  It would
28558526Seric		normally be used on network gateway machines.
28658782Sericmailertable	Include a "mailer table" which can be used to override
28758782Seric		routing for particular domains.  The argument of the
28858782Seric		FEATURE may be the key definition.  If none is specified,
28958782Seric		the definition used is:
29058782Seric			hash /etc/mailertable.db -o
29158782Seric		Keys in this database must be of the form:
29258782Seric			mailer:domain
29359034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
29459034Seric		internet addresses.  The table can be built using the
29559034Seric		bitdomain program contributed by John Gardiner Meyers.
29659034Seric		The argument of the FEATURE may be the key definition; if
29759034Seric		none is specified, the definition used is:
29859034Seric			hash /etc/bitdomain.db -o
29959034Seric		Keys are the bitnet hostname; values are the corresponding
30059034Seric		internet hostname.
30159037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
30259037Seric		is:
30359037Seric			hash /etc/uudomain.db -o
30459037Seric		At the moment there is no automagic tool to build this
30559037Seric		database.
30657246Seric
30757246SericOther FEATUREs should be defined, but I was trying to keep these
30857246Sericconfig files fairly lean and mean.
30957246Seric
31058087Seric
31157246Seric+-------+
31257246Seric| HACKS |
31357246Seric+-------+
31457246Seric
31557246SericSome things just can't be called features.  To make this clear,
31657247Sericthey go in the hack subdirectory and are referenced using the HACK
31757246Sericmacro.  These will tend to be site-dependent.  The release
31857246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
31957246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
32057246Sericthis is intended as a short-term aid while we move hosts into
32157246Sericsubdomains.
32257246Seric
32358087Seric
32457246Seric+--------------------+
32557246Seric| SITE CONFIGURATION |
32657246Seric+--------------------+
32757246Seric
32857246SericComplex sites will need more local configuration information, such as
32957246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
33057246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
33157246Seric
33257246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
33357246Sericconfiguration information stored in the siteconfig subdirectory.  For
33457246Sericexample, the line
33557246Seric
33657246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
33757246Seric
33857246Sericreads the file uucp.ucbvax for local connection information.  The
33957246Sericsecond parameter is the local name (in this case just "ucbvax" since
34057246Sericit is locally connected, and hence a UUCP hostname) and the name of
34157246Sericthe class in which to store the host information.  Another SITECONFIG
34257246Sericline reads
34357246Seric
34457246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
34557246Seric
34657246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
34757246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
34857246Sericstore this list.  [The machine ucbarpa is gone now, but I've left
34957246Sericthis out-of-date configuration file around to demonstrate how you
35057246Sericmight do this.]
35157246Seric
35257246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
35357246Sericmore than a sequence of SITE macros describing connectivity.  For
35457246Sericexample:
35557246Seric
35657246Seric	SITE(cnmat)
35757246Seric	SITE(sgi olympus)
35857246Seric
35957246SericThe second example demonstrates that you can use two names on the
36057246Sericsame line; these are usually aliases for the same host (or are at
36157246Sericleast in the same company).
36257246Seric
36358087Seric
36457246Seric+-------------------+
36557246Seric| TWEAKING RULESETS |
36657246Seric+-------------------+
36757246Seric
36851268SericFor more complex configurations, you can define special rules.
36951268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
37051268Sericthe names.  Any modifications made here are reflected in the header.
37151268Seric
37251268SericA common use is to convert old UUCP addreses to SMTP addresses using
37351268Sericthe UUCPSMTP macro.  For example:
37451268Seric
37551268Seric	LOCAL_RULE_3
37651268Seric	UUCPSMTP(decvax,	decvax.dec.com)
37751268Seric	UUCPSMTP(research,	research.att.com)
37851268Seric
37951268Sericwill cause addresses of the form "decvax!user" and "research!user"
38051268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
38151268Sericrespectively.
38251268Seric
38357246SericThis could also be used to look hosts in a database map:
38457246Seric
38557246Seric	LOCAL_RULE_3
38657246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
38757246Seric
38857246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
38957246Seric
39051268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
39151268SericFor example, new rules are needed to parse hostnames that you accept
39251309Sericvia MX records.  For example, you might have:
39351268Seric
39451309Seric	LOCAL_RULE_0
39551309Seric	R$+ < @ cnmat.Berkeley.EDU >	$#uucp $@ cnmat $: $1
39651309Seric
39751309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
39851309Sericpointing at this host; this rule catches the message and forwards it on
39951309Sericusing UUCP.
40051309Seric
40158681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
40258681SericThese rulesets are normally empty.
40358681Seric
40457246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
40557246Sericboilerplate option setting but before rulesets, and can be used to
40657945Sericdeclare local database maps or whatever.  For example:
40751268Seric
40857246Seric	LOCAL_CONFIG
40957246Seric	Khostmap hash /etc/hostmap.db
41057246Seric	Kyplocal nis -m hosts.byname
41151220Seric
41258087Seric
41357246Seric+---------------------------+
41457246Seric| MASQUERADING AND RELAYING |
41557246Seric+---------------------------+
41657246Seric
41757246SericYou can have your host masquerade as another using
41857246Seric
41957246Seric	MASQUERADE_AS(host.domain)
42057246Seric
42157246SericThis causes outgoing SMTP mail to be labelled as coming from the
42257246Sericindicated domain, rather than $j.  One normally masquerades as one
42357246Sericof your own subdomains (for example, it's unlikely that I would
42457246Sericchoose to masquerade as an MIT site).
42557246Seric
42657246Sericthere are always users that need to be "exposed" -- that is, their
42757246Sericinternal site name should be displayed instead of the masquerade name.
42857246SericRoot is an example.  You can add users to this list using
42957246Seric
43057246Seric	EXPOSED_USER(usernames)
43157246Seric
43257246SericThis adds users to class E; you could also use something like
43357246Seric
43457246Seric	FE/etc/sendmail.cE
43557246Seric
43657246SericYou can also arrange to relay all unqualified names (that is, names
43757246Sericwithout @host) to a relay host.  For example, if you have a central
43857246Sericemail server, you might relay to that host so that users don't have
43957246Sericto have .forward files or aliases.  You can do this using
44057246Seric
44158071Seric	define(`LOCAL_RELAY', mailer:hostname)
44257246Seric
44358071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
44458071Seric"smtp".  There are some user names that you don't want relayed, perhaps
44558071Sericbecause of local aliases.  A common example is root, which may be
44658071Sericlocally aliased.  You can add entries to this list using
44757246Seric
44857246Seric	LOCAL_USER(usernames)
44957246Seric
45057246SericThis adds users to class L; you could also use something like
45157246Seric
45257246Seric	FL/etc/sendmail.cL
45357246Seric
45457591SericIf you want all mail sent to a centralized hub, as for a shared
45557591Seric/var/spool/mail scheme, use
45657591Seric
45758071Seric	define(`MAIL_HUB', mailer:hostname)
45857591Seric
45958071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
46058071Sericand MAIL_HUB, unqualified names and names in class L will be sent to
46158071Sericthe LOCAL_RELAY and other local names will be sent to MAIL_HUB.  For
46258071Sericexample, if are on machine mastodon.CS.Berkeley.EDU, the following
46358071Sericcombinations of settings will have the indicated effects:
46457591Seric
46557591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
46657591Seric
46757591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
46857591Sericmail.CS.Berkeley.EDU
46957591Seric
47057591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
47157591Sericmammoth.CS.Berkeley.EDU
47257591Seric
47357591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
47457591SericMAIL_HUB set as above
47557591Seric
47658071Seric
47758071Seric+-------------------------------+
47858071Seric| NON-SMTP BASED CONFIGURATIONS |
47958071Seric+-------------------------------+
48058071Seric
48158071SericThese configuration files are designed primarily for use by SMTP-based
48258071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
48358071SericUUCP-primarily nodes (the latter is defined as a small local net
48458071Sericconnected to the rest of the world via UUCP).  However, there is one
48558071Serichook to handle some special cases.
48658071Seric
48758071SericYou can define a ``smart host'' that understands a richer address syntax
48858071Sericusing:
48958071Seric
49058071Seric	define(`SMART_HOST', mailer:hostname)
49158071Seric
49258071SericIn this case, the ``mailer:'' defaults to "suucp".  Any messages that
49358071Sericcan't be handled using the usual UUCP rules are passed to this host.
49458071Seric
49558071SericIf you are on a local SMTP-based net that connects to the outside
49658071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
49758071SericFor example:
49858071Seric
49958071Seric	define(`SMART_HOST', suucp:uunet)
50058071Seric	LOCAL_NET_CONFIG
50158071Seric	R$* < @ $* .$m > $*	$#smtp $@ $2.$m $: $1 < @ $2.$m > $3
50258071Seric
50358071SericThis will cause all names that end in your domain name ($m) via
50458071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
50558071Seric
50658071Seric
50758363Seric+------------------+
50858363Seric| FlexFAX SOFTWARE |
50958363Seric+------------------+
51058363Seric
51158363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
51258363Sericpublic version out "later this week" [as of 3/1/93].  The following
51358363Sericblurb is direct from Sam:
51458363Seric
51558363Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.7 93/02/08 09:00:55 sam Exp $
51658363Seric
51758363Seric	How To Obtain This Software (in case all you get is this file)
51858363Seric
51958363Seric	The source code is available for public ftp on
52058363Seric	    sgi.com			sgi/fax/v2.1beta.tar.Z
52158363Seric		(192.48.153.1)
52258363Seric
52358363Seric	You can also obtain inst'able images for Silicon Graphics machines from
52458363Seric	    sgi.com			sgi/fax/v2.1beta.inst.tar
52558363Seric		(192.48.153.1)
52658363Seric
52758363Seric	For example,
52858363Seric	    % ftp -n sgi.com
52958363Seric	    ....
53058363Seric	    ftp> user anonymous
53158363Seric	    ... <type in password>
53258363Seric	    ftp> cd sgi/fax
53358363Seric	    ftp> binary
53458363Seric	    ftp> get v2.1beta.tar.Z
53558363Seric
53658363Seric	If you cannot use FTP at all, there is a service called "ftpmail"
53758363Seric	available from gateekeeper.dec.com:  you can send e-mail to this
53858363Seric	machine and it will use FTP to retrieve files for you and send you the
53958363Seric	files back again via e-mail.  To find out more about the ftpmail
54058363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
54158363Seric	consists of the single line "help".
54258363Seric
54358363Seric	Internal to Silicon Graphics there are inst'able images on the host
54458363Seric	flake.asd in the directory /d/dist.  Thus you can do something like:
54558363Seric
54658363Seric	    % inst -f flake.asd.sgi.com:/d/dist/flexfax
54758363Seric
54858363Seric	to install the software on your machine.
54958363Seric
55058363Seric	The external distributions come in a compressed or uncompressed tar
55158363Seric	file.  To extract the source distribution:
55258363Seric
55358363Seric	    % zcat v2.1beta.tar.Z | tar xf -
55458363Seric
55558363Seric	(uncompress and extract individual files in current directory).  To
55658363Seric	unpack and install the client portion of the inst'able distribution:
55758363Seric
55858363Seric	    % mkdir dist
55958363Seric	    % cd dist; tar xf ../v2.1beta.inst.tar; cd ..
56058363Seric	    % inst -f dist/flexfax
56158363Seric	    ...
56258363Seric	    inst> go
56358363Seric
56458363Seric	(Note, the dist subdirectory is because some versions of inst fail if
56558363Seric	the files are in the current directory.) Server binaries is also
56658363Seric	included in the inst'able images as flexfax.server.*.  It is not
56758363Seric	installed by default, so to get it also you need to extract the do:
56858363Seric
56958363Seric	    % inst -f flexfax
57058363Seric	    ...
57158363Seric	    inst> install flexfax.server.*
57258363Seric	    inst> go
57358363Seric
57458363Seric	The SGI binaries were built for Version 4.0.5 of the IRIX operating
57558363Seric	system.  They should work w/o problem on earlier versions of the
57658363Seric	system, but I have not fully tested this.  Also, note that to install a
57758363Seric	server on an SGI machine, you need to have installed the Display
57858363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
57958363Seric	server will not be able to convert PostScript to facsimile for
58058363Seric	transmission.
58158363Seric
58258363Seric	If you are working from the source distribution, look at the file README
58358363Seric	in the top of the source tree.  If you are working from the inst images,
58458363Seric	you need to run faxaddmodem to setup and configure your fax modem.  Do
58558363Seric	man faxaddmodem for more information.
58658363Seric
58758363SericAlso from Sam:
58858363Seric
58958363Seric	A mailing list for users of this software is located on sgi.com.
59058363Seric	If you want to join this mailing list or have a list-related request
59158363Seric	such as getting your name removed from it, send a request to
59258363Seric
59358363Seric	    flexfax-request@sgi.com
59458363Seric
59558363Seric	Submissions (including bug reports) should be directed to:
59658363Seric
59758363Seric	    flexfax@sgi.com
59858363Seric
59958363Seric
60057945Seric+--------------------------------+
60157945Seric| TWEAKING CONFIGURATION OPTIONS |
60257945Seric+--------------------------------+
60357945Seric
60457945SericThere are a large number of configuration options that don't normally
60557945Sericneed to be changed.  However, if you feel you need to tweak them, you
60657945Sericcan define the following M4 variables.  This list is shown in four
60757945Sericcolumns:  the name you define, the default value for that definition,
60857945Sericthe option or macro that is affected (either Ox for an option or Dx
60957945Sericfor a macro), and a brief description.  Greater detail of the semantics
61057945Sericcan be found in the Installation and Operations Guide.
61157945Seric
61257945SericM4 Variable Name	Default		Mac/Opt	Description
61357945SericconfMAILER_NAME		MAILER-DAEMON	Dn	The sender name used for
61457945Seric						internally generated
61557945Seric						outgoing messages.
61658681SericconfFROM_LINE		From $g  $d	Dl	The From_ line used when
61758681Seric						sending to files or programs.
61857945SericconfFROM_HEADER		$?x$x <$g>$|$g$.	The format of an internally
61957945Seric					Dq	generated From: address.
62057945SericconfOPERATORS		.:%@!^/[]	Do	Address operator characters.
62157945SericconfSTMP_LOGIN_MSG	$j Sendmail $v/$Z ready at $b
62257945Seric					De	The initial (spontaneous)
62357945Seric						SMTP greeting message.
62459743SericconfSEVEN_BIT_INPUT	False		O7	Force input to seven bits?
62557945SericconfALIAS_WAIT		10		Oa	Wait (in minutes) for alias
62657945Seric						file rebuild.
62758087SericconfMIN_FREE_BLOCKS	4		Ob	Minimum number of free blocks
62858087Seric						on queue filesystem to accept
62958087Seric						SMTP mail.
63057945SericconfBLANK_SUB		.		OB	Blank (space) substitution
63157945Seric						character.
63257945SericconfCON_EXPENSIVE	False		Oc	Connect immediately to
63357945Seric						mailers marked expensive?
63457945SericconfCHECKPOINT_INTERVAL	10		OC	Checkpoint queue files
63557945Seric						every N recipients.
63657945SericconfDELIVERY_MODE	background	Od	Default delivery mode.
63757945SericconfAUTO_REBUILD	False		OD	Automatically rebuild
63857945Seric						alias file if needed.
63957945SericconfERROR_MODE		(undefined)	Oe	Error message mode.
64057945SericconfERROR_MESSAGE	(undefined)	OE	Error message header/file.
64157945SericconfSAVE_FROM_LINES	False		Of	Save extra leading
64257945Seric						From_ lines.
64357945SericconfTEMP_FILE_MODE	0600		OF	Temporary file mode.
64457945SericconfDEF_GROUP_ID	1		Og	Default group id.
64557945SericconfMATCH_GECOS		False		OG	Match GECOS field.
64657945SericconfMAX_HOP		17		Oh	Maximum hop count.
64757945SericconfIGNORE_DOTS		False		Oi	Ignore dot as terminator
64857945Seric						for incoming messages?
64957945SericconfBIND_OPTS		(empty)		OI	Default options for BIND.
65059743SericconfMIME_FORMAT_ERRORS	True		Oj	Send error messages as MIME-
65159743Seric						encapsulated messages per
65259743Seric						RFC 1344.
65357945SericconfMCI_CACHE_SIZE	2		Ok	Size of open connection cache.
65457945SericconfMCI_CACHE_TIMEOUT	5m		OK	Open connection cache timeout.
65557945SericconfLOG_LEVEL		9		OL	Log level.
65657945SericconfME_TOO		False		Om	Include sender in group
65757945Seric						expansions.
65857945SericconfCHECK_ALIASES	True		On	Check RHS of aliases when
65957945Seric						running newaliases.
66057945SericconfOLD_STYLE_HEADERS	True		Oo	Assume that headers without
66157945Seric						special chars are old style.
66258859SericconfDAEMON_OPTIONS	(undefined)	OO	SMTP daemon options.
66358806SericconfPRIVACY_FLAGS	authwarnings	Op	Privacy flags.
66457945SericconfCOPY_ERRORS_TO	(undefined)	OP	Address for additional copies
66557945Seric						of all error messages.
66657945SericconfQUEUE_FACTOR	(undefined)	Oq	Slope of queue-only function
66758116SericconfREAD_TIMEOUT	(undefined)	Or	SMTP read timeouts.
66857945SericconfSAFE_QUEUE		True		Os	Commit all messages to disk
66957945Seric						before forking.
67058806SericconfMESSAGE_TIMEOUT	5d/4h		OT	Timeout for messages before
67158806Seric						sending error/warning message.
67259317SericconfTIME_ZONE		USE_SYSTEM	Ot	Time zone info -- can be
67357945Seric						USE_SYSTEM to use the system's
67457945Seric						idea, USE_TZ to use the user's
67557945Seric						TZ envariable, or something
67657945Seric						else to force that value.
67757945SericconfDEF_USER_ID		1		Ou	Default user id.
67858718SericconfUSERDB_SPEC		(undefined)	OU	User database specification.
67958859SericconfFALLBACK_MX		(undefined)	OV	Fallback MX host.
68057945SericconfNO_WILDCARD_MX	False		Ow	No wildcard MX records matches
68157945Seric						our domain.
68257945SericconfQUEUE_LA		8		Ox	Load average at which queue-only
68357945Seric						function kicks in.
68457945SericconfREFUSE_LA		12		OX	Load average at which incoming
68557945Seric						SMTP connections are refused.
68657945SericconfSEPARATE_PROC	False		Oy	Run all deliveries in a
68757945Seric						separate process.
68857945SericconfWORK_RECIPIENT_FACTOR
68957945Seric			(undefined)	OY	Cost of each recipient.
69057945SericconfWORK_CLASS_FACTOR	(undefined)	Oz	Priority multiplier for class.
69157945SericconfWORK_TIME_FACTOR	(undefined)	OZ	Cost of each delivery attempt.
69258408SericconfCW_FILE		/etc/sendmail.cw	Name of file used to get the
69358408Seric					Fw	local additions to the $=w
69458408Seric						class.
69557945Seric
69658087Seric
69757246Seric+-----------+
69857246Seric| HIERARCHY |
69957246Seric+-----------+
70057246Seric
70151220SericWithin this directory are several subdirectories, to wit:
70251220Seric
70351220Sericm4		General support routines.  These are typically
70451220Seric		very important and should not be changed without
70557247Seric		very careful consideration.
70651220Seric
70751220Sericcf		The configuration files themselves.  They have
70851220Seric		".mc" suffixes, and must be run through m4 to
70951220Seric		become complete.  The resulting output should
71051220Seric		have a ".cf" suffix.
71151220Seric
71251220Sericostype		Definitions describing a particular operating
71351220Seric		system type.  These should always be referenced
71451220Seric		using the OSTYPE macro in the .mc file.  Examples
71551220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
71651220Seric		"sunos4.1".
71751220Seric
71851220Sericdomain		Definitions describing a particular domain, referenced
71951220Seric		using the DOMAIN macro in the .mc file.  These are
72051220Seric		site dependent; for example, we contribute "cs.exposed.m4"
72151220Seric		and "cs.hidden.m4" which both describe hosts in the
72251220Seric		CS.Berkeley.EDU subdomain; the former displays the local
72351220Seric		hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the
72451220Seric		latter does its best to hide the identity of the local
72551220Seric		workstation inside the CS subdomain.
72651220Seric
72751220Sericmailer		Descriptions of mailers.   These are referenced using
72851220Seric		the MAILER macro in the .mc file.
72951220Seric
73051220Sericsh		Shell files used when building the .cf file from the
73151220Seric		.mc file in the cf subdirectory.
73251220Seric
73351220Sericfeature		These hold special orthogonal features that you might
73451220Seric		want to include.  They should be referenced using
73551220Seric		the FEATURE macro.
73651220Seric
73751220Serichack		Local hacks.  These can be referenced using the HACK
73851220Seric		macro.  They shouldn't be of more than voyeuristic
73951220Seric		interest outside the .Berkeley.EDU domain, but who knows?
74051220Seric		We've all got our own peccadilloes.
74151220Seric
74251268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
74351268Seric		UUCP sites.
74451220Seric
74551268Seric
74657246Seric+------------------------+
74757246Seric| ADMINISTRATIVE DETAILS |
74857246Seric+------------------------+
74951220Seric
75051220SericThe following sections detail usage of certain internal parts of the
75151220Sericsendmail.cf file.  Read them carefully if you are trying to modify
75251220Sericthe current model.  If you find the above descriptions adequate, these
75351220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
75451220Seric
75551220SericRULESETS (* means built in to sendmail)
75651220Seric
75751220Seric   0 *	Parsing
75851220Seric   1 *	Sender rewriting
75951220Seric   2 *	Recipient rewriting
76051220Seric   3 *	Canonicalization
76151220Seric   4 *	Post cleanup
76254839Seric   5 *	Local address rewrite (after aliasing)
76351220Seric   6	Bottom half of Ruleset 3
76457247Seric   7	Hook for recursive ruleset 0 call
76557247Seric   8
76657247Seric   9
76751220Seric
76851220Seric
76951220SericMAILERS
77051220Seric
77151220Seric   0	local, prog	local and program mailers
77251220Seric   1	smtp		SMTP channel
77358087Seric   2	uucp		UNIX-to-UNIX Copy Program
77458087Seric   3	netnews		Network News delivery
77558363Seric   4	fax		Sam Leffler's FlexFAX software
77651220Seric
77751220Seric
77851220SericMACROS
77951220Seric
78051220Seric   A
78151220Seric   B	Bitnet Relay
78251220Seric   C	CSNET Relay
78354839Seric   D	The local domain -- usually not needed
78451220Seric   E
78558363Seric   F	FAX Relay
78651220Seric   G
78757591Seric   H	mail Hub (for mail clusters)
78851220Seric   I
78951220Seric   J
79051220Seric   K
79151220Seric   L
79251220Seric   M	Masquerade (who I claim to be)
79351220Seric   N
79451220Seric   O
79551220Seric   P
79651220Seric   Q
79751220Seric   R	Relay (for unqualified names)
79858071Seric   S	Smart Host
79951220Seric   T
80051309Seric   U	my UUCP name (if I have a UUCP connection)
80151309Seric   V	UUCP Relay (class V hosts)
80251220Seric   W	UUCP Relay (class W hosts)
80351220Seric   X	UUCP Relay (class X hosts)
80451309Seric   Y	UUCP Relay (all other hosts)
80551220Seric   Z	Version number
80651220Seric
80751220Seric
80851220SericCLASSES
80951220Seric
81051220Seric   A
81151220Seric   B
81251220Seric   C
81351220Seric   D
81457246Seric   E	addresses that should not seem to come from $M
81554839Seric   F	hosts we forward for
81651220Seric   G
81751220Seric   H
81851220Seric   I
81951220Seric   J
82051220Seric   K
82151220Seric   L	addresses that should not be forwarded to $R
82251220Seric   M
82351220Seric   N
82451220Seric   O	operators that indicate network operations (cannot be in local names)
825*60211Seric   P	top level pseudo-domains: BITNET, FAX, UUCP, etc.
82651220Seric   Q
82751220Seric   R
82851220Seric   S
82951220Seric   T
83051220Seric   U	locally connected UUCP hosts
83151309Seric   V	UUCP hosts connected to relay $V
83251309Seric   W	UUCP hosts connected to relay $W
83351309Seric   X	UUCP hosts connected to relay $X
83451309Seric   Y	locally connected smart UUCP hosts
83551220Seric   Z
83654839Seric   .	the class containing only a dot
83751220Seric
83851220Seric
83951220SericM4 DIVERSIONS
84051220Seric
84158071Seric   1	Local host detection and resolution
84258071Seric   2	Local Ruleset 3 additions
84358071Seric   3	Local Ruleset 0 additions
84451268Seric   4	UUCP Ruleset 0 additions
84551309Seric   5	locally interpreted names (overrides $R)
84654839Seric   6	local configuration (at top of file)
84751220Seric   7	mailer definitions
84854839Seric   8	special local name recognition (late in ruleset 3)
84958681Seric   9	special local rulesets (1 and 2)
850