xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 67811)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*67811Seric		@(#)README	8.34 (Berkeley) 10/15/94
851220Seric
951220Seric
1057246SericThis document describes the sendmail configuration files being used
1167469Sericat Berkeley.  These use features in the new (R8) sendmail; they will
1267469Sericnot work on other versions.
1351220Seric
1457246SericThese configuration files are probably not as general as previous
1565957Sericversions, and don't handle as many of the weird cases automagically.
1657246SericI was able to simplify by them for two reasons.  First, the network
1757246Serichas become more consistent -- for example, at this point, everyone
1857246Sericon the internet is supposed to be running a name server, so hacks to
1957246Serichandle NIC-registered hosts can go away.  Second, I assumed that a
2057246Sericsubdomain would be running SMTP internally -- UUCP is presumed to be
2157246Serica long-haul protocol.  I realize that this is not universal, but it
2257246Sericdoes describe the vast majority of sites with which I am familiar,
2357246Sericincluding those outside the US.
2451220Seric
2565957SericOf course, the downside of this is that if you do live in a weird
2665957Sericworld, things are going to get weirder for you.  I'm sorry about that,
2757246Sericbut at the time we at Berkeley had a problem, and it seemed like the
2857246Sericright thing to do.
2951220Seric
3057247SericThis package requires a post-V7 version of m4; if you are running the
3157247Seric4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with
3257247Serica newer version.  You can m4-expand on their system, then run locally.
3365002SericSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
3465002Sericalso works.  Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't
3565002Sericwork -- you'll have to use a Net/2 or GNU version.
3651220Seric
3758284SericIF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
3864371Seric"m4 foo.mc > foo.cf" -- that should be all you need.  There is also
3964371Serica fairly crude (but functional) Makefile.dist that works on the
4064371Sericold version of make.
4158284Seric
4258284SericTo get started, you may want to look at tcpproto.mc (for TCP-only
4364324Sericsites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for
4464324Sericclusters of clients using a single mail host).  Others are versions
4558284Sericthat we use at Berkeley, although not all are in current use.  For
4658284Sericexample, ucbarpa has gone away, but I've left ucbarpa.mc in because
4758284Sericit demonstrates some interesting techniques.
4858284Seric
4957246SericI'm not pretending that this README describes everything that these
5057246Sericconfiguration files can do; clever people can probably tweak them
5157246Sericto great effect.  But it should get you started.
5257246Seric
5365509Seric*******************************************************************
5465509Seric***  BE SURE YOU CUSTOMIZE THESE FILES!  They have some		***
5565509Seric***  Berkeley-specific assumptions built in, such as the name	***
5665509Seric***  of our UUCP-relay.  You'll want to create your own domain	***
5765509Seric***  description, and use that in place of domain/Berkeley.m4.	***
5865509Seric*******************************************************************
5958087Seric
6065509Seric
6157246Seric+--------------------------+
6257246Seric| INTRODUCTION AND EXAMPLE |
6357246Seric+--------------------------+
6457246Seric
6557246SericConfiguration files are contained in the subdirectory "cf", with a
6657246Sericsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
6757246Seric
6851220SericLet's examine a typical .mc file (cf/cs-exposed.mc):
6951220Seric
7051220Seric	divert(-1)
7151220Seric	#
7251220Seric	# Copyright (c) 1983 Eric P. Allman
7351220Seric	# Copyright (c) 1988 The Regents of the University of California.
7451220Seric	# All rights reserved.
7551220Seric	#
7651220Seric	# Redistribution and use in source and binary forms are permitted
7751220Seric	# provided that the above copyright notice and this paragraph are
7851220Seric	# duplicated in all such forms and that any documentation,
7951220Seric	# advertising materials, and other materials related to such
8051220Seric	# distribution and use acknowledge that the software was developed
8151220Seric	# by the University of California, Berkeley.  The name of the
8251220Seric	# University may not be used to endorse or promote products derived
8351220Seric	# from this software without specific prior written permission.
8451220Seric	# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
8551220Seric	# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
8651220Seric	# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
8751220Seric	#
8851220Seric
8957246SericThe divert(-1) will delete the crud in the resulting output file.
9057247SericThe copyright notice is what your lawyers require.  Our lawyers require
9157246Sericthe one that I've included in my files. A copyleft is a copyright by
9257246Sericanother name.
9351220Seric
9457246SericThe next line MUST be
9557246Seric
9651220Seric	include(`../m4/cf.m4')
9751220Seric
9857246SericThis will pull in the M4 macros you will need to make sense of
9957246Sericeverything else.  As the saying goes, don't think about it, just
10057246Sericdo it.  If you don't do it, don't bother reading the rest of this
10157246Sericfile.
10251220Seric
10356778Seric	VERSIONID(`<SCCS or RCS version id>')
10451220Seric
10551220SericVERSIONID is a macro that stuffs the version information into the
10651220Sericresulting file.  We use SCCS; you could use RCS, something else, or
10757246Sericomit it completely.  This is not the same as the version id included
10857246Sericin SMTP greeting messages -- this is defined in m4/version.m4.
10951220Seric
11051268Seric	DOMAIN(cs.exposed)
11151220Seric
11251220SericThis example exposes the host inside of the CS subdomain -- that is,
11351220Sericit doesn't try to hide the name of the workstation to the outside
11451220Sericworld.  Changing this to DOMAIN(cs.hidden) would have made outgoing
11551220Sericmessages refer to "<username>@CS.Berkeley.EDU" instead of using the
11663857Sericlocal hostname.  Internally this is effected by using
11757246Seric"MASQUERADE_AS(CS.Berkeley.EDU)".
11851220Seric
11951268Seric	MAILER(smtp)
12051220Seric
12151309SericThese describe the mailers used at the default CS site site.  The
12251309Sericlocal mailer is always included automatically.
12351220Seric
12458087Seric
12557246Seric+--------+
12657246Seric| OSTYPE |
12757246Seric+--------+
12857246Seric
12951220SericNote that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes
13051220Sericdefault Computer Science Division environment.  There are several
13157247Sericexplicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1,
13257247Sericriscos4.5, sunos3.5, sunos4.1, and ultrix4.1.  These change things
13357247Sericlike the location of the alias file and queue directory.  Some of
13457247Sericthese files are identical to one another.
13551220Seric
13657246SericOperating system definitions are easy to write.  They may define
13757246Sericthe following variables (everything defaults, so an ostype file
13857246Sericmay be empty).
13951220Seric
14057246SericALIAS_FILE		[/etc/aliases] The location of the text version
14159761Seric			of the alias file(s).  It can be a comma-separated
14266790Seric			list of names (but be sure you quote values with
14366790Seric			comments in them -- for example, use
14466790Seric				define(`ALIAS_FILE', `a,b')
14566790Seric			to get "a" and "b" both listed as alias files;
14666790Seric			otherwise the define() primitive only sees "a").
14757246SericHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
14857246Seric			containing information printed in response to
14957246Seric			the SMTP HELP command.
15057246SericQUEUE_DIR		[/var/spool/mqueue] The directory containing
15157246Seric			queue files.
15257246SericSTATUS_FILE		[/etc/sendmail.st] The file containing status
15357246Seric			information.
15458087SericLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
15564153SericLOCAL_MAILER_FLAGS	[rmn] The flags used by the local mailer.  The
15664153Seric			flags lsDFM are always included.
15763761SericLOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
15863761Seric			mail.
15958087SericLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
16063791SericLOCAL_SHELL_FLAGS	[eu] The flags used by the shell mailer.  The
16163791Seric			flags lsDFM are always included.
16263791SericLOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
16363791Seric			mail.
16458087SericUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
16558087Seric			used to submit news.
16658087SericUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
16758087SericUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
16858087Seric			usenet mailer.
16965911SericUSENET_MAILER_MAX	[100000] The maximum size of messages that will
17065911Seric			be accepted by the usenet mailer.
17163857SericSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
17263857Seric			flags are `mDFMUX' (and `a' for esmtp mailer).
17365911SericSMTP_MAILER_MAX		[undefined] The maximum size of messages that will
17465911Seric			be transported using the smtp or esmtp mailers.
17563857SericUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
17663857Seric			flags are `DFMhuU' (and `m' for suucp mailer, minus
17763857Seric			`U' for uucp-dom mailer).
17863761SericUUCP_MAILER_ARGS	[uux - -r -z -a$f -gC $h!rmail ($u)] The arguments
17963761Seric			passed to the UUCP mailer.
18063791SericUUCP_MAX_SIZE		[100000] The maximum size message accepted for
18163791Seric			transmission by the UUCP mailers.
18265911SericFAX_MAILER_PATH		[/usr/local/lib/fax/mailfax] The program used to
18365911Seric			submit FAX messages.
18465911SericFAX_MAILER_MAX		[100000] The maximum size message accepted for
18565911Seric			transmission by FAX.
18657246Seric
18757246Seric+---------+
18857246Seric| DOMAINS |
18957246Seric+---------+
19057246Seric
19157246SericYou will probably want to collect domain-dependent defines into one
19257246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
19357246Sericdomain file includes definitions for several internal distinguished
19457246Serichosts:
19557246Seric
19657246SericUUCP_RELAY	The host that will forward UUCP-addressed email.
19757246Seric		If not defined, all UUCP sites must be directly
19864028Seric		connected.
19957246SericBITNET_RELAY	The host that will forward BITNET-addressed email.
20057246Seric		If not defined, the .BITNET pseudo-domain won't work.
20157246SericLOCAL_RELAY	The site that will handle unqualified names -- that
20257246Seric		is, names with out an @domain extension.  If not set,
20357246Seric		they are assumed to belong on this machine.  This
20457246Seric		allows you to have a central site to store a
20557246Seric		company- or department-wide alias database.  This
20657246Seric		only works at small sites, and there are better
20764028Seric		methods.
20857246Seric
20964028SericEach of these can be either ``mailer:hostname'' (in which case the
21064028Sericmailer is the internal mailer name, such as ``suucp'' and the hostname
21164028Sericis the name of the host as appropriate for that mailer) or just a
21264028Seric``hostname'', in which case a default mailer type (usually ``relay'',
21364153Serica variant on SMTP) is used.  WARNING: if you have a wildcard MX
21464153Sericrecord matching your domain, you probably want to define these to
21564153Serichave a trailing dot so that you won't get the mail diverted back
21664153Sericto yourself.
21764028Seric
21857246SericThe domain file can also be used to define a domain name, if needed
21957982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
22057982Sericat your site masquerade behind one email name, you could also use
22157982SericMASQUERADE_AS here.
22257246Seric
22358408SericYou do not have to define a domain -- in particular, if you are a
22458408Sericsingle machine sitting off somewhere, it is probably more work than
22558408Sericit's worth.  This is just a mechanism for combining "domain dependent
22658408Sericknowledge" into one place.
22758408Seric
22857246Seric+---------+
22957246Seric| MAILERS |
23057246Seric+---------+
23157246Seric
23251220SericThere are fewer mailers supported in this version than the previous
23351220Sericversion, owing mostly to a simpler world.
23451220Seric
23551220Sericlocal		The local and prog mailers.  You will almost always
23651220Seric		need these; the only exception is if you relay ALL
23757247Seric		your mail to another site.  This mailer is included
23857247Seric		automatically.
23951220Seric
24051220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
24151220Seric		not hide hosts behind a gateway or another other
24251220Seric		such hack; it assumes a world where everyone is
24363761Seric		running the name server.  This file actually defines
24463761Seric		three mailers: "smtp" for regular (old-style) SMTP to
24563761Seric		other servers, "esmtp" for extended SMTP to other
24663761Seric		servers, and "relay" for transmission to our
24763761Seric		RELAY_HOST or MAILER_HUB.
24851220Seric
24951220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
25067471Seric		defines two mailers, "uucp-old" (a.k.a. "uucp") and
25167471Seric		"uucp-new" (a.k.a. "suucp").  The latter is for when you
25267471Seric		know that the UUCP mailer at the other end can handle
25367471Seric		multiple recipients in one transfer.  If the smtp mailer
25467471Seric		is also included in your configuration, two other mailers
25567471Seric		("uucp-dom" and "uucp-uudom") are also defined.  When you
25667471Seric		include the uucp mailer, sendmail looks for all names in
25765218Seric		the $=U class and sends them to the uucp-old mailer; all
25865218Seric		names in the $=Y class are sent to uucp-new; and all
25965218Seric		names in the $=Z class are sent to uucp-uudom.  Note that
26057246Seric		this is a function of what version of rmail runs on
26157246Seric		the receiving end, and hence may be out of your control.
26265218Seric		See the section below describing UUCP mailers in more
26365218Seric		detail.
26451220Seric
26558087Sericusenet		Usenet (network news) delivery.  If this is specified,
26658087Seric		an extra rule is added to ruleset 0 that forwards all
26758087Seric		local email for users named ``group.usenet'' to the
26858087Seric		``inews'' program.  Note that this works for all groups,
26958087Seric		and may be considered a security problem.
27058087Seric
27158363Sericfax		Facsimile transmission.  This is experimental and based
27258363Seric		on Sam Leffler's FlexFAX software.  For more information,
27358363Seric		see below.
27458087Seric
27565148Sericpop		Post Office Protocol.
27658363Seric
27765148Seric
27857246Seric+----------+
27957246Seric| FEATURES |
28057246Seric+----------+
28151268Seric
28257246SericSpecial features can be requested using the "FEATURE" macro.  For
28357246Sericexample, the .mc line:
28457246Seric
28557246Seric	FEATURE(use_cw_file)
28657246Seric
28757246Serictells sendmail that you want to have it read an /etc/sendmail.cw
28858782Sericfile to get values for class $=w.  The FEATURE may contain a single
28958782Sericoptional parameter -- for example:
29057246Seric
29158782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
29258782Seric
29358782SericAvailable features are:
29458782Seric
29557246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
29657246Seric		names for this host.  This might be used if you were
29757246Seric		on a host that MXed for a dynamic set of other
29857246Seric		hosts.  If the set is static, just including the line
29957246Seric		"Cw<name1> <name2> ..." is probably superior.
30058408Seric		The actual filename can be overridden by redefining
30158408Seric		confCW_FILE.
30264324Seric
30358087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
30458087Seric		a ``551 User not local; please try <address>'' message.
30558087Seric		If this is set, you can alias people who have left
30658087Seric		to their new address with ".REDIRECT" appended.
30764324Seric
30858284Sericnouucp		Don't do anything special with UUCP addresses at all.
30964324Seric
31059080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
31159080Seric		This would generally only be used by sites that only
31259080Seric		act as mail gateways or which have user agents that do
31364028Seric		full canonification themselves.  You may also want to
31464028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
31564028Seric		turn off the usual resolver options that do a similar
31664028Seric		thing.
31764324Seric
31858526Sericnotsticky	By default, email sent to "user@local.host" are marked
31958526Seric		as "sticky" -- that is, the local addresses aren't
32058526Seric		matched against UDB and don't go through ruleset 5.
32158526Seric		This features disables this treatment.  It would
32258526Seric		normally be used on network gateway machines.
32364324Seric
32458782Sericmailertable	Include a "mailer table" which can be used to override
32558782Seric		routing for particular domains.  The argument of the
32658782Seric		FEATURE may be the key definition.  If none is specified,
32758782Seric		the definition used is:
32864164Seric			hash -o /etc/mailertable
32963761Seric		Keys in this database are fully qualified domain names
33063761Seric		or partial domains preceded by a dot -- for example,
33163761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
33263761Seric		Values must be of the form:
33358782Seric			mailer:domain
33463761Seric		where "mailer" is the internal mailer name, and "domain"
33563761Seric		is where to send the message.  These maps are not
33663761Seric		reflected into the message header.
33764324Seric
33863761Sericdomaintable	Include a "domain table" which can be used to provide
33967451Seric		domain name mapping.  Use of this should really be
34067451Seric		limited to your own domains.  It may be useful if you
34167451Seric		change names (e.g., your company changes names from
34267451Seric		oldname.com to newname.com).  The argument of the
34367451Seric		FEATURE may be the key definition.  If none is specified,
34467451Seric		the definition used is:
34564164Seric			hash -o /etc/domaintable
34667451Seric		The key in this table is the domain name; the value is
34767451Seric		the new (fully qualified) domain.  Anything in the
34863761Seric		domaintable is reflected into headers; that is, this
34963761Seric		is done in ruleset 3.
35064324Seric
35159034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
35259034Seric		internet addresses.  The table can be built using the
35364153Seric		bitdomain program contributed by John Gardiner Myers.
35459034Seric		The argument of the FEATURE may be the key definition; if
35559034Seric		none is specified, the definition used is:
35664164Seric			hash -o /etc/bitdomain.db
35759034Seric		Keys are the bitnet hostname; values are the corresponding
35859034Seric		internet hostname.
35964324Seric
36059037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
36159037Seric		is:
36264164Seric			hash -o /etc/uudomain.db
36359037Seric		At the moment there is no automagic tool to build this
36459037Seric		database.
36564324Seric
36660263Sericalways_add_domain
36760263Seric		Include the local host domain even on locally delivered
36860263Seric		mail.  Normally it is not added unless it is already
36960263Seric		present.
37064324Seric
37163761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
37263761Seric		feature will cause recipient addresses to also masquerade
37363761Seric		as being from the masquerade host.  Normally they get
37463761Seric		the local hostname.  Although this may be right for
37563761Seric		ordinary users, it can break local aliases.  For example,
37663761Seric		if you send to "localalias", the originating sendmail will
37763761Seric		find that alias and send to all members, but send the
37863761Seric		message with "To: localalias@masqueradehost".  Since that
37963761Seric		alias likely does not exist, replies will fail.  Use this
38063761Seric		feature ONLY if you can guarantee that the ENTIRE
38163761Seric		namespace on your masquerade host supersets all the
38263761Seric		local entries.
38364324Seric
38464153Sericnodns		We aren't running DNS at our site (for example,
38564153Seric		we are UUCP-only connected).  It's hard to consider
38664153Seric		this a "feature", but hey, it had to go somewhere.
38757246Seric
38864324Sericnullclient	This is a special case -- it creates a stripped down
38964324Seric		configuration file containing nothing but support for
39064394Seric		forwarding all mail to a central hub via a local
39164394Seric		SMTP-based network.  The argument is the name of that
39264394Seric		hub.
39364394Seric
39464394Seric		The only other feature that should be used in conjunction
39564394Seric		with this one is "nocanonify" (this causes addresses to
39664394Seric		be sent unqualified via the SMTP connection; normally
39764394Seric		they are qualifed with the masquerade name, which
39864394Seric		defaults to the name of the hub machine).  No mailers
39964394Seric		should be defined.  No aliasing or forwarding is done.
40057246Seric
40164324Seric
40257246Seric+-------+
40357246Seric| HACKS |
40457246Seric+-------+
40557246Seric
40657246SericSome things just can't be called features.  To make this clear,
40757247Sericthey go in the hack subdirectory and are referenced using the HACK
40857246Sericmacro.  These will tend to be site-dependent.  The release
40957246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
41057246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
41157246Sericthis is intended as a short-term aid while we move hosts into
41257246Sericsubdomains.
41357246Seric
41458087Seric
41557246Seric+--------------------+
41657246Seric| SITE CONFIGURATION |
41757246Seric+--------------------+
41857246Seric
41957246SericComplex sites will need more local configuration information, such as
42057246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
42157246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
42257246Seric
42366336SericIf your host is known by several different names, you need to augment
42466336Sericthe $=w class.  This is a list of names by which you are known, and
42566336Sericanything sent to an address using a host name in this list will be
42666336Serictreated as local mail.  You can do this in two ways: either create
42766336Sericthe file /etc/sendmail.cw containing a list of your aliases (one per
42866336Sericline), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
42966336Sericline:
43066336Seric
43166336Seric	Cw alias.host.name
43266336Seric
43366336Sericat the end of that file.  See the ``vangogh.mc'' file for an example.
43466336SericBe sure you use the fully-qualified name of the host, rather than a
43566336Sericshort name.
43666336Seric
43757246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
43857246Sericconfiguration information stored in the siteconfig subdirectory.  For
43957246Sericexample, the line
44057246Seric
44157246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
44257246Seric
44357246Sericreads the file uucp.ucbvax for local connection information.  The
44457246Sericsecond parameter is the local name (in this case just "ucbvax" since
44566336Sericit is locally connected, and hence a UUCP hostname).  The third
44666336Sericparameter is the name of both a macro to store the local name (in
44766336Sericthis case, $U) and the name of the class (e.g., $=U) in which to store
44866336Sericthe host information read from the file.  Another SITECONFIG line reads
44957246Seric
45057246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
45157246Seric
45257246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
45357246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
45466336Sericstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
45566336Sericis, the name of the relay to which the hosts listed in uucp.ucbarpa
45666336Sericare connected.  [The machine ucbarpa is gone now, but I've left
45757246Sericthis out-of-date configuration file around to demonstrate how you
45857246Sericmight do this.]
45957246Seric
46066336SericNote that the case of SITECONFIG with a third parameter of ``U'' is
46166336Sericspecial; the second parameter is assumed to be the UUCP name of the
46266336Sericlocal site, rather than the name of a remote site, and the UUCP name
46366336Sericis entered into $=w (the list of local hostnames) as $U.UUCP.
46466336Seric
46557246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
46657246Sericmore than a sequence of SITE macros describing connectivity.  For
46757246Sericexample:
46857246Seric
46957246Seric	SITE(cnmat)
47057246Seric	SITE(sgi olympus)
47157246Seric
47257246SericThe second example demonstrates that you can use two names on the
47357246Sericsame line; these are usually aliases for the same host (or are at
47457246Sericleast in the same company).
47557246Seric
47658087Seric
47765218Seric+--------------------+
47865218Seric| USING UUCP MAILERS |
47965218Seric+--------------------+
48065218Seric
48165218SericIt's hard to get UUCP mailers right because of the extremely ad hoc
48265218Sericnature of UUCP addressing.  These config files are really designed
48365218Sericfor domain-based addressing, even for UUCP sites.
48465218Seric
48565218SericThere are four UUCP mailers available.  The choice of which one to
48665218Sericuse is partly a matter of local preferences and what is running at
48765218Sericthe other end of your UUCP connection.  Unlike good protocols that
48865218Sericdefine what will go over the wire, UUCP uses the policy that you
48965218Sericshould do what is right for the other end; if they change, you have
49065218Sericto change.  This makes it hard to do the right thing, and discourages
49165218Sericpeople from updating their software.  In general, if you can avoid
49265218SericUUCP, please do.
49365218Seric
49465218SericThe major choice is whether to go for a domainized scheme or a
49565218Sericnon-domainized scheme.  This depends entirely on what the other
49665218Sericend will recognize.  If at all possible, you should encourage the
49765218Sericother end to go to a domain-based system -- non-domainized addresses
49865218Sericdon't work entirely properly.
49965218Seric
50065218SericThe four mailers are:
50165218Seric
50265218Seric    uucp-old (obsolete name: "uucp")
50365218Seric	This is the oldest, the worst (but the closest to UUCP) way of
50465218Seric	sending messages accros UUCP connections.  It does bangify
50565218Seric	everything and prepends $U (your UUCP name) to the sender's
50665218Seric	address (which can already be a bang path itself).  It can
50765218Seric	only send to one address at a time, so it spends a lot of
50865218Seric	time copying duplicates of messages.  Avoid this if at all
50965218Seric	possible.
51065218Seric
51165218Seric    uucp-new (obsolete name: "suucp")
51265218Seric	The same as above, except that it assumes that in one rmail
51365218Seric	command you can specify several recipients.  It still has a
51465218Seric	lot of other problems.
51565218Seric
51665218Seric    uucp-dom
51765218Seric	This UUCP mailer keeps everything as domain addresses.
51867471Seric	Basically, it uses the SMTP mailer rewriting rules.  This mailer
51967471Seric	is only included if MAILER(smtp) is also specified.
52065218Seric
52165218Seric	Unfortunately, a lot of UUCP mailer transport agents require
52265218Seric	bangified addresses in the envelope, although you can use
52365218Seric	domain-based addresses in the message header.  (The envelope
52465218Seric	shows up as the From_ line on UNIX mail.)  So....
52565218Seric
52665218Seric    uucp-uudom
52765218Seric	This is a cross between uucp-new (for the envelope addresses)
52865218Seric	and uucp-dom (for the header addresses).  It bangifies the
52965218Seric	envelope sender (From_ line in messages) without adding the
53065218Seric	local hostname, unless there is no host name on the address
53165218Seric	at all (e.g., "wolf") or the host component is a UUCP host name
53265218Seric	instead of a domain name ("somehost!wolf" instead of
53367471Seric	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
53467471Seric	is also specified.
53565218Seric
53665218SericExamples:
53765218Seric
53865218SericWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
53965218Sericfollowing summarizes the sender rewriting for various mailers.
54065218Seric
54165218SericMailer          sender		rewriting in the envelope
54265218Seric------		------		-------------------------
54365218Sericuucp-{old,new}	wolf		grasp!wolf
54465218Sericuucp-dom	wolf		wolf@grasp.insa-lyon.fr
54565218Sericuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
54665218Seric
54765218Sericuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
54865218Sericuucp-dom	wolf@fr.net	wolf@fr.net
54965218Sericuucp-uudom	wolf@fr.net	fr.net!wolf
55065218Seric
55165218Sericuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
55265218Sericuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
55365218Sericuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
55465218Seric
55565218SericIf you are using one of the domainized UUCP mailers, you really want
55665218Sericto convert all UUCP addresses to domain format -- otherwise, it will
55765218Sericdo it for you (and probably not the way you expected).  For example,
55865218Sericif you have the address foo!bar!baz (and you are not sending to foo),
55965218Sericthe heuristics will add the @uucp.relay.name or @local.host.name to
56065218Sericthis address.  However, if you map foo to foo.host.name first, it
56165218Sericwill not add the local hostname.  You can do this using the uucpdomain
56265218Sericfeature.
56365218Seric
56465218Seric
56557246Seric+-------------------+
56657246Seric| TWEAKING RULESETS |
56757246Seric+-------------------+
56857246Seric
56951268SericFor more complex configurations, you can define special rules.
57051268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
57151268Sericthe names.  Any modifications made here are reflected in the header.
57251268Seric
57351268SericA common use is to convert old UUCP addreses to SMTP addresses using
57451268Sericthe UUCPSMTP macro.  For example:
57551268Seric
57651268Seric	LOCAL_RULE_3
57751268Seric	UUCPSMTP(decvax,	decvax.dec.com)
57851268Seric	UUCPSMTP(research,	research.att.com)
57951268Seric
58051268Sericwill cause addresses of the form "decvax!user" and "research!user"
58151268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
58251268Sericrespectively.
58351268Seric
58465957SericThis could also be used to look up hosts in a database map:
58557246Seric
58657246Seric	LOCAL_RULE_3
58757246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
58857246Seric
58957246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
59057246Seric
59151268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
59251268SericFor example, new rules are needed to parse hostnames that you accept
59351309Sericvia MX records.  For example, you might have:
59451268Seric
59551309Seric	LOCAL_RULE_0
59665986Seric	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
59751309Seric
59851309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
59951309Sericpointing at this host; this rule catches the message and forwards it on
60051309Sericusing UUCP.
60151309Seric
60258681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
60358681SericThese rulesets are normally empty.
60458681Seric
60557246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
60657246Sericboilerplate option setting but before rulesets, and can be used to
60757945Sericdeclare local database maps or whatever.  For example:
60851268Seric
60957246Seric	LOCAL_CONFIG
61057246Seric	Khostmap hash /etc/hostmap.db
61157246Seric	Kyplocal nis -m hosts.byname
61251220Seric
61358087Seric
61457246Seric+---------------------------+
61557246Seric| MASQUERADING AND RELAYING |
61657246Seric+---------------------------+
61757246Seric
61857246SericYou can have your host masquerade as another using
61957246Seric
62057246Seric	MASQUERADE_AS(host.domain)
62157246Seric
62265957SericThis causes outgoing SMTP mail to be labeled as coming from the
62357246Sericindicated domain, rather than $j.  One normally masquerades as one
62465957Sericof one's own subdomains (for example, it's unlikely that I would
62557246Sericchoose to masquerade as an MIT site).
62657246Seric
62764153SericThe masquerade name is not normally canonified, so it is important
62864153Sericthat it be your One True Name, that is, fully qualified and not a
62964153SericCNAME.
63064153Seric
63157246Sericthere are always users that need to be "exposed" -- that is, their
63257246Sericinternal site name should be displayed instead of the masquerade name.
63357246SericRoot is an example.  You can add users to this list using
63457246Seric
63557246Seric	EXPOSED_USER(usernames)
63657246Seric
63757246SericThis adds users to class E; you could also use something like
63857246Seric
63957246Seric	FE/etc/sendmail.cE
64057246Seric
64157246SericYou can also arrange to relay all unqualified names (that is, names
64257246Sericwithout @host) to a relay host.  For example, if you have a central
64357246Sericemail server, you might relay to that host so that users don't have
64457246Sericto have .forward files or aliases.  You can do this using
64557246Seric
64658071Seric	define(`LOCAL_RELAY', mailer:hostname)
64757246Seric
64858071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
64958071Seric"smtp".  There are some user names that you don't want relayed, perhaps
65058071Sericbecause of local aliases.  A common example is root, which may be
65158071Sericlocally aliased.  You can add entries to this list using
65257246Seric
65357246Seric	LOCAL_USER(usernames)
65457246Seric
65557246SericThis adds users to class L; you could also use something like
65657246Seric
65757246Seric	FL/etc/sendmail.cL
65857246Seric
65964153SericIf you want all incoming mail sent to a centralized hub, as for a
66064153Sericshared /var/spool/mail scheme, use
66157591Seric
66258071Seric	define(`MAIL_HUB', mailer:hostname)
66357591Seric
66458071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
66566047Sericand MAIL_HUB, unqualified names will be sent to the LOCAL_RELAY and
66666047Sericother local names will be sent to MAIL_HUB.  Names in $=L will be
66766047Sericdelivered locally, so you MUST have aliases or .forward files for them.
66866047Seric
66966047SericFor example, if are on machine mastodon.CS.Berkeley.EDU, the following
67058071Sericcombinations of settings will have the indicated effects:
67157591Seric
67257591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
67357591Seric
67457591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
67557591Sericmail.CS.Berkeley.EDU
67657591Seric
67757591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
67857591Sericmammoth.CS.Berkeley.EDU
67957591Seric
68057591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
68157591SericMAIL_HUB set as above
68257591Seric
68364153SericIf you want all outgoing mail to go to a central relay site, define
68464153SericSMART_HOST as well.  Briefly:
68558071Seric
68664153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
68764153Seric	MAIL_HUB applies to names qualified with the name of the
68864153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
68964153Seric	SMART_HOST applies to names qualified with other hosts.
69064153Seric
69164153SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and
69264153SericFAX_RELAY) take precedence over SMART_HOST, so if you really want
69364153Sericabsolutely everything to go to a single central site you will need to
69464153Sericunset all the other relays -- or better yet, find or build a minimal
69564153Sericconfig file that does this.
69664153Seric
69764153Seric
69858071Seric+-------------------------------+
69958071Seric| NON-SMTP BASED CONFIGURATIONS |
70058071Seric+-------------------------------+
70158071Seric
70258071SericThese configuration files are designed primarily for use by SMTP-based
70358071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
70458071SericUUCP-primarily nodes (the latter is defined as a small local net
70558071Sericconnected to the rest of the world via UUCP).  However, there is one
70658071Serichook to handle some special cases.
70758071Seric
70858071SericYou can define a ``smart host'' that understands a richer address syntax
70958071Sericusing:
71058071Seric
71158071Seric	define(`SMART_HOST', mailer:hostname)
71258071Seric
71364028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
71458071Sericcan't be handled using the usual UUCP rules are passed to this host.
71558071Seric
71658071SericIf you are on a local SMTP-based net that connects to the outside
71758071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
71858071SericFor example:
71958071Seric
72058071Seric	define(`SMART_HOST', suucp:uunet)
72158071Seric	LOCAL_NET_CONFIG
72263761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
72358071Seric
72458071SericThis will cause all names that end in your domain name ($m) via
72558071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
72663761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
72763761Sericthe $m.  If you are running a local DNS inside your domain which is
72863761Sericnot otherwise connected to the outside world, you probably want to
72963761Sericuse:
73058071Seric
73163761Seric	define(`SMART_HOST', smtp:fire.wall.com)
73263761Seric	LOCAL_NET_CONFIG
73363761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
73458071Seric
73563761SericThat is, send directly only to things you found in your DNS lookup;
73663761Sericanything else goes through SMART_HOST.
73763761Seric
73864153SericIf you are not running DNS at all, it is important to use
73964153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
74064153Sericfor the name server to come up.
74163761Seric
74264153Seric
74364259Seric+-----------+
74464259Seric| WHO AM I? |
74564259Seric+-----------+
74664259Seric
74764259SericNormally, the $j macro is automatically defined to be your fully
74864259Sericqualified domain name (FQDN).  Sendmail does this by getting your
74964259Serichost name using gethostname and then calling gethostbyname on the
75064259Sericresult.  For example, in some environments gethostname returns
75164259Sericonly the root of the host name (such as "foo"); gethostbyname is
75264259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
75364259Sericcases, gethostbyname may fail to return the FQDN.  In this case
75464259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
75564259Sericname.  This is usually done using:
75664259Seric
75764259Seric	Dmbar.com
75864259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
75964259Seric
76064259Seric
76164028Seric+--------------------+
76264028Seric| USING MAILERTABLES |
76364028Seric+--------------------+
76464028Seric
76564028SericTo use FEATURE(mailertable), you will have to create an external
76664028Sericdatabase containing the routing information for various domains.
76764028SericFor example, a mailertable file in text format might be:
76864028Seric
76964028Seric	.my.domain		xnet:%1.my.domain
77064028Seric	uuhost1.my.domain	suucp:uuhost1
77164028Seric	.bitnet			smtp:relay.bit.net
77264028Seric
77364028SericThis should normally be stored in /etc/mailertable.  The actual
77464028Sericdatabase version of the mailertable is built using:
77564028Seric
77664028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
77764028Seric
77864028SericThe semantics are simple.  Any LHS entry that does not begin with
77964028Serica dot matches the full host name indicated.  LHS entries beginning
78064028Sericwith a dot match anything ending with that domain name -- that is,
78164028Sericthey can be thought of as having a leading "*" wildcard.  Matching
78264028Sericis done in order of most-to-least qualified -- for example, even
78364028Sericthough ".my.domain" is listed first in the above example, an entry
78464028Sericof "uuhost1.my.domain" will match the second entry since it is
78564028Sericmore explicit.
78664028Seric
78764028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
78864028Sericconfiguration name of a mailer (that is, an `M' line in the
78964028Sericsendmail.cf file).  The "host" will be the hostname passed to
79064028Sericthat mailer.  In domain-based matches (that is, those with leading
79164028Sericdots) the "%1" may be used to interpolate the wildcarded part of
79264028Sericthe host name.  For example, the first line above sends everything
79364028Sericaddressed to "anything.my.domain" to that same host name, but using
79464028Sericthe (presumably experimental) xnet mailer.
79564028Seric
79664028Seric
79764153Seric+--------------------------------+
79864153Seric| USING USERDB TO MAP FULL NAMES |
79964153Seric+--------------------------------+
80064153Seric
80164153SericThe user database was not originally intended for mapping full names
80264153Sericto login names (e.g., Eric.Allman => eric), but some people are using
80364153Sericit that way.  (I would recommend that you set up aliases for this
80464153Sericpurpose instead -- since you can specify multiple alias files, this
80564153Sericis fairly easy.)  The intent was to locate the default maildrop at
80664153Serica site, but allow you to override this by sending to a specific host.
80764153Seric
80864153SericIf you decide to set up the user database in this fashion, it is
80964153Sericimperative that you also specify FEATURE(notsticky) -- otherwise,
81064153Serice-mail sent to Full.Name@local.host.name will be rejected.
81164153Seric
81264259SericTo build the internal form of the user databae, use:
81364153Seric
81464259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
81564259Seric
81664259Seric
81767539Seric+--------------------------------+
81867539Seric| MISCELLANEOUS SPECIAL FEATURES |
81967539Seric+--------------------------------+
82067539Seric
82167539SericDOTTED_USER(name)
82267539Seric	Sometimes it is convenient to merge configuration on a
82367539Seric	centralized mail machine, for example, to forward all
82467539Seric	root mail to a mail server.  In this case it might be
82567539Seric	useful to be able to treat the root addresses as a class
82667539Seric	of addresses with subtle differences.  You can do this
82767539Seric	using dotted users.  For example, a client might include
82867539Seric	the alias:
82967539Seric
83067539Seric		root:  root.client1@server
83167539Seric
83267539Seric	On the server, the mail configuration would include:
83367539Seric
83467539Seric		DOTTED_USER(root)
83567539Seric
83667539Seric	Aliases on the server that would match this address would
83767539Seric	be "root.client", "root.*", and "root", tried in that
83867539Seric	order.  You can specify multiple addresses either by
83967539Seric	joining them in one DOTTTED_USER macro or by having
84067539Seric	multiple macros:
84167539Seric
84267539Seric		DOTTED_USER(root)
84367539Seric		DOTTED_USER(postmaster mailer-daemon)
84467539Seric
84567539Seric	defines three dotted users.
84667539Seric
84767539Seric
84858363Seric+------------------+
84958363Seric| FlexFAX SOFTWARE |
85058363Seric+------------------+
85158363Seric
85258363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
85358363Sericpublic version out "later this week" [as of 3/1/93].  The following
85458363Sericblurb is direct from Sam:
85558363Seric
85664498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
85758363Seric
85858363Seric	How To Obtain This Software (in case all you get is this file)
85964498Seric	--------------------------------------------------------------
86058363Seric	The source code is available for public ftp on
86164498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
86258363Seric		(192.48.153.1)
86358363Seric
86458363Seric	You can also obtain inst'able images for Silicon Graphics machines from
86564498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
86658363Seric		(192.48.153.1)
86758363Seric
86858363Seric	For example,
86958363Seric	    % ftp -n sgi.com
87058363Seric	    ....
87158363Seric	    ftp> user anonymous
87258363Seric	    ... <type in password>
87358363Seric	    ftp> cd sgi/fax
87458363Seric	    ftp> binary
87564498Seric	    ftp> get v2.1.src.tar.Z
87658363Seric
87764498Seric	In general, the latest version of the 2.1 release of the software is
87864498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
87964498Seric	directory.  This file is a link to the appropriate released version (so
88064498Seric	don't waste your time retrieving the linked file as well!) Any files of
88164498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
88264498Seric	versions of the source code.  For example, the file v2.1.0.patch would
88364498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
88464498Seric	different than the naming conventions used during beta testing.) Patch
88564498Seric	files only work to go between consecutive versions, so if you are
88664498Seric	multiple versions behind the latest release, you will need to apply
88764498Seric	each patch file between your current version and the latest.
88864498Seric
88964498Seric
89064498Seric	Obtaining the Software by Electronic Mail
89164498Seric	-----------------------------------------
89264498Seric	Do not send me requests for the software; they will be ignored (without
89364498Seric	response).  If you cannot use FTP at all, there is a service called
89464498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
89564498Seric	this machine and it will use FTP to retrieve files for you and send you
89664498Seric	the files back again via e-mail.  To find out more about the ftpmail
89758363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
89858363Seric	consists of the single line "help".
89958363Seric
90064498Seric
90164498Seric	Obtaining the Software Within Silicon Graphics
90264498Seric	----------------------------------------------
90358363Seric	Internal to Silicon Graphics there are inst'able images on the host
90464498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
90558363Seric
90664498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
90758363Seric
90864498Seric	to install the latest version of the software on your machine.
90958363Seric
91064498Seric
91164498Seric	What to do Once You've Retrieved Stuff
91264498Seric	--------------------------------------
91358363Seric	The external distributions come in a compressed or uncompressed tar
91458363Seric	file.  To extract the source distribution:
91558363Seric
91664498Seric	    % zcat v2.1.src.tar.Z | tar xf -
91758363Seric
91858363Seric	(uncompress and extract individual files in current directory).  To
91958363Seric	unpack and install the client portion of the inst'able distribution:
92058363Seric
92158363Seric	    % mkdir dist
92264498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
92358363Seric	    % inst -f dist/flexfax
92458363Seric	    ...
92558363Seric	    inst> go
92658363Seric
92758363Seric	(Note, the dist subdirectory is because some versions of inst fail if
92864498Seric	the files are in the current directory.) Server binaries are also
92964498Seric	included in the inst'able images as flexfax.server.*.  They are not
93064498Seric	installed by default, so to get them also you need to do:
93158363Seric
93258363Seric	    % inst -f flexfax
93358363Seric	    ...
93458363Seric	    inst> install flexfax.server.*
93558363Seric	    inst> go
93658363Seric
93764498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
93858363Seric	system.  They should work w/o problem on earlier versions of the
93958363Seric	system, but I have not fully tested this.  Also, note that to install a
94058363Seric	server on an SGI machine, you need to have installed the Display
94158363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
94258363Seric	server will not be able to convert PostScript to facsimile for
94358363Seric	transmission.
94458363Seric
94564498Seric	If you are working from the source distribution, look at the file
94664498Seric	README in the top of the source tree.  If you are working from the inst
94764498Seric	images, the subsystem flexfax.man.readme contains the README file and
94864498Seric	other useful pieces of information--the installed files are placed in
94964498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
95064498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
95164498Seric	the README file and the manual page for faxaddmodem for information.
95258363Seric
95358363Seric
95464498Seric	FlexFAX Mail List
95564498Seric	-----------------
95658363Seric	A mailing list for users of this software is located on sgi.com.
95758363Seric	If you want to join this mailing list or have a list-related request
95858363Seric	such as getting your name removed from it, send a request to
95958363Seric
96064498Seric	    majordomo@whizzer.wpd.sgi.com
96158363Seric
96264498Seric	For example, to subscribe, send the line "subscribe flexfax" in
96364498Seric	the body of your message.  The line "help" will return a list of
96464498Seric	the commands understood by the mailing list management software.
96564498Seric
96658363Seric	Submissions (including bug reports) should be directed to:
96758363Seric
96858363Seric	    flexfax@sgi.com
96958363Seric
97064498Seric	When corresponding about this software please always specify what
97164498Seric	version you have, what system you're running on, and, if the problem is
97264498Seric	specific to your modem, identify the modem and firmware revision.
97358363Seric
97464498Seric
97557945Seric+--------------------------------+
97657945Seric| TWEAKING CONFIGURATION OPTIONS |
97757945Seric+--------------------------------+
97857945Seric
97957945SericThere are a large number of configuration options that don't normally
98057945Sericneed to be changed.  However, if you feel you need to tweak them, you
98157945Sericcan define the following M4 variables.  This list is shown in four
98257945Sericcolumns:  the name you define, the default value for that definition,
98357945Sericthe option or macro that is affected (either Ox for an option or Dx
98457945Sericfor a macro), and a brief description.  Greater detail of the semantics
98557945Sericcan be found in the Installation and Operations Guide.
98657945Seric
98763582SericSome options are likely to be deprecated in future versions -- that is,
98863582Sericthe option is only included to provide back-compatibility.  These are
98963582Sericmarked with "*".
99063582Seric
99165002SericRemember that these options are M4 variables, and hence may need to
99265002Sericbe quoted.  In particular, arguments with commas will usually have to
99365002Sericbe ``double quoted, like this phrase'' to avoid having the comma
99465002Sericconfuse things.  This is common for alias file definitions and for
99565002Sericthe read timeout.
99665002Seric
99757945SericM4 Variable Name	Default		Mac/Opt	Description
99865002Seric================	=======		=======	===========
99957945SericconfMAILER_NAME		MAILER-DAEMON	Dn	The sender name used for
100057945Seric						internally generated
100157945Seric						outgoing messages.
100258681SericconfFROM_LINE		From $g  $d	Dl	The From_ line used when
100358681Seric						sending to files or programs.
100457945SericconfFROM_HEADER		$?x$x <$g>$|$g$.	The format of an internally
100557945Seric					Dq	generated From: address.
100657945SericconfOPERATORS		.:%@!^/[]	Do	Address operator characters.
100764153SericconfSMTP_LOGIN_MSG	$j Sendmail $v/$Z ready at $b
100857945Seric					De	The initial (spontaneous)
100957945Seric						SMTP greeting message.
101059743SericconfSEVEN_BIT_INPUT	False		O7	Force input to seven bits?
101167551SericconfEIGHT_BIT_HANDLING	pass8		O8	8-bit data handling
101257945SericconfALIAS_WAIT		10		Oa	Wait (in minutes) for alias
101357945Seric						file rebuild.
101458087SericconfMIN_FREE_BLOCKS	4		Ob	Minimum number of free blocks
101558087Seric						on queue filesystem to accept
101658087Seric						SMTP mail.
101757945SericconfBLANK_SUB		.		OB	Blank (space) substitution
101857945Seric						character.
101965619SericconfCON_EXPENSIVE	False		Oc	Avoid connecting immediately
102065619Seric						to mailers marked expensive?
102157945SericconfCHECKPOINT_INTERVAL	10		OC	Checkpoint queue files
102257945Seric						every N recipients.
102357945SericconfDELIVERY_MODE	background	Od	Default delivery mode.
102457945SericconfAUTO_REBUILD	False		OD	Automatically rebuild
102557945Seric						alias file if needed.
102657945SericconfERROR_MODE		(undefined)	Oe	Error message mode.
102757945SericconfERROR_MESSAGE	(undefined)	OE	Error message header/file.
102857945SericconfSAVE_FROM_LINES	False		Of	Save extra leading
102957945Seric						From_ lines.
103057945SericconfTEMP_FILE_MODE	0600		OF	Temporary file mode.
103157945SericconfDEF_GROUP_ID	1		Og	Default group id.
103257945SericconfMATCH_GECOS		False		OG	Match GECOS field.
103357945SericconfMAX_HOP		17		Oh	Maximum hop count.
103463582SericconfIGNORE_DOTS		False		Oi *	Ignore dot as terminator
103557945Seric						for incoming messages?
103657945SericconfBIND_OPTS		(empty)		OI	Default options for BIND.
103763582SericconfMIME_FORMAT_ERRORS	True		Oj *	Send error messages as MIME-
103859743Seric						encapsulated messages per
103959743Seric						RFC 1344.
104064153SericconfFORWARD_PATH	(undefined)	OJ	The colon-separated list of
104164153Seric						places to search for .forward
104264153Seric						files.
104357945SericconfMCI_CACHE_SIZE	2		Ok	Size of open connection cache.
104457945SericconfMCI_CACHE_TIMEOUT	5m		OK	Open connection cache timeout.
104563582SericconfUSE_ERRORS_TO	False		Ol *	Use the Errors-To: header to
104663582Seric						deliver error messages.  This
104763582Seric						should not be necessary because
104863582Seric						of general acceptance of the
104963582Seric						envelope/header distinction.
105057945SericconfLOG_LEVEL		9		OL	Log level.
105157945SericconfME_TOO		False		Om	Include sender in group
105257945Seric						expansions.
105357945SericconfCHECK_ALIASES	True		On	Check RHS of aliases when
105457945Seric						running newaliases.
105563582SericconfOLD_STYLE_HEADERS	True		Oo *	Assume that headers without
105657945Seric						special chars are old style.
105758859SericconfDAEMON_OPTIONS	(undefined)	OO	SMTP daemon options.
105858806SericconfPRIVACY_FLAGS	authwarnings	Op	Privacy flags.
105957945SericconfCOPY_ERRORS_TO	(undefined)	OP	Address for additional copies
106057945Seric						of all error messages.
106157945SericconfQUEUE_FACTOR	(undefined)	Oq	Slope of queue-only function
106258116SericconfREAD_TIMEOUT	(undefined)	Or	SMTP read timeouts.
1063*67811SericconfDONT_PRUNE_ROUTES	False		OR	Don't prune down route-addr
1064*67811Seric						syntax addresses to the
1065*67811Seric						minimum possible.
106663582SericconfSAFE_QUEUE		True		Os *	Commit all messages to disk
106757945Seric						before forking.
106858806SericconfMESSAGE_TIMEOUT	5d/4h		OT	Timeout for messages before
106958806Seric						sending error/warning message.
107059317SericconfTIME_ZONE		USE_SYSTEM	Ot	Time zone info -- can be
107157945Seric						USE_SYSTEM to use the system's
107257945Seric						idea, USE_TZ to use the user's
107357945Seric						TZ envariable, or something
107457945Seric						else to force that value.
107557945SericconfDEF_USER_ID		1		Ou	Default user id.
107658718SericconfUSERDB_SPEC		(undefined)	OU	User database specification.
107758859SericconfFALLBACK_MX		(undefined)	OV	Fallback MX host.
107863857SericconfTRY_NULL_MX_LIST	False		Ow	If we are the best MX for a
107963857Seric						host and haven't made other
108063857Seric						arrangements, try connecting
108163857Seric						to the host directly; normally
108263857Seric						this would be a config error.
108357945SericconfQUEUE_LA		8		Ox	Load average at which queue-only
108457945Seric						function kicks in.
108557945SericconfREFUSE_LA		12		OX	Load average at which incoming
108657945Seric						SMTP connections are refused.
108763582SericconfWORK_RECIPIENT_FACTOR
108863582Seric			(undefined)	Oy	Cost of each recipient.
108963582SericconfSEPARATE_PROC	False		OY	Run all deliveries in a
109057945Seric						separate process.
109157945SericconfWORK_CLASS_FACTOR	(undefined)	Oz	Priority multiplier for class.
109257945SericconfWORK_TIME_FACTOR	(undefined)	OZ	Cost of each delivery attempt.
109358408SericconfCW_FILE		/etc/sendmail.cw	Name of file used to get the
109458408Seric					Fw	local additions to the $=w
109558408Seric						class.
109664153SericconfSMTP_MAILER		smtp		-	The mailer name used when
109763972Seric						SMTP connectivity is required.
109863972Seric						Either "smtp" or "esmtp".
109963999SericconfLOCAL_MAILER	local		-	The mailer name used when
110063999Seric						local connectivity is required.
110163999Seric						Almost always "local".
110264028SericconfRELAY_MAILER	relay		-	The default mailer name used
110364028Seric						for relaying any mail (e.g.,
110464028Seric						to a BITNET_RELAY, a
110564028Seric						SMART_HOST, or whatever).
110664028Seric						This can reasonably be "suucp"
110764028Seric						if you are on a UUCP-connected
110864028Seric						site.
110964259SericconfDOMAIN_NAME		(undefined)	Dj	If defined, sets $j.
111057945Seric
111158087Seric
111257246Seric+-----------+
111357246Seric| HIERARCHY |
111457246Seric+-----------+
111557246Seric
111651220SericWithin this directory are several subdirectories, to wit:
111751220Seric
111851220Sericm4		General support routines.  These are typically
111951220Seric		very important and should not be changed without
112057247Seric		very careful consideration.
112151220Seric
112251220Sericcf		The configuration files themselves.  They have
112351220Seric		".mc" suffixes, and must be run through m4 to
112451220Seric		become complete.  The resulting output should
112551220Seric		have a ".cf" suffix.
112651220Seric
112751220Sericostype		Definitions describing a particular operating
112851220Seric		system type.  These should always be referenced
112951220Seric		using the OSTYPE macro in the .mc file.  Examples
113051220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
113151220Seric		"sunos4.1".
113251220Seric
113351220Sericdomain		Definitions describing a particular domain, referenced
113451220Seric		using the DOMAIN macro in the .mc file.  These are
113551220Seric		site dependent; for example, we contribute "cs.exposed.m4"
113651220Seric		and "cs.hidden.m4" which both describe hosts in the
113751220Seric		CS.Berkeley.EDU subdomain; the former displays the local
113851220Seric		hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the
113951220Seric		latter does its best to hide the identity of the local
114051220Seric		workstation inside the CS subdomain.
114151220Seric
114251220Sericmailer		Descriptions of mailers.   These are referenced using
114351220Seric		the MAILER macro in the .mc file.
114451220Seric
114551220Sericsh		Shell files used when building the .cf file from the
114651220Seric		.mc file in the cf subdirectory.
114751220Seric
114851220Sericfeature		These hold special orthogonal features that you might
114951220Seric		want to include.  They should be referenced using
115051220Seric		the FEATURE macro.
115151220Seric
115251220Serichack		Local hacks.  These can be referenced using the HACK
115351220Seric		macro.  They shouldn't be of more than voyeuristic
115451220Seric		interest outside the .Berkeley.EDU domain, but who knows?
115565957Seric		We've all got our own peccadillos.
115651220Seric
115751268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
115851268Seric		UUCP sites.
115951220Seric
116051268Seric
116157246Seric+------------------------+
116257246Seric| ADMINISTRATIVE DETAILS |
116357246Seric+------------------------+
116451220Seric
116551220SericThe following sections detail usage of certain internal parts of the
116651220Sericsendmail.cf file.  Read them carefully if you are trying to modify
116751220Sericthe current model.  If you find the above descriptions adequate, these
116851220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
116951220Seric
117051220SericRULESETS (* means built in to sendmail)
117151220Seric
117251220Seric   0 *	Parsing
117351220Seric   1 *	Sender rewriting
117451220Seric   2 *	Recipient rewriting
117551220Seric   3 *	Canonicalization
117651220Seric   4 *	Post cleanup
117754839Seric   5 *	Local address rewrite (after aliasing)
117860539Seric  1x	mailer rules (sender qualification)
117960539Seric  2x	mailer rules (recipient qualification)
118064801Seric  3x	mailer rules (sender header qualification)
118164801Seric  4x	mailer rules (recipient header qualification)
118264801Seric  5x	mailer subroutines (general)
118364801Seric  6x	mailer subroutines (general)
118464801Seric  7x	mailer subroutines (general)
118564801Seric  8x	reserved
118660539Seric  90	Mailertable host stripping
118760892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
118860892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
118963857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
119051220Seric
119151220Seric
119251220SericMAILERS
119351220Seric
119451220Seric   0	local, prog	local and program mailers
119565218Seric   1	[e]smtp, relay	SMTP channel
119665218Seric   2	uucp-*		UNIX-to-UNIX Copy Program
119758087Seric   3	netnews		Network News delivery
119858363Seric   4	fax		Sam Leffler's FlexFAX software
119951220Seric
120051220Seric
120151220SericMACROS
120251220Seric
120351220Seric   A
120451220Seric   B	Bitnet Relay
120565182Seric   C
120654839Seric   D	The local domain -- usually not needed
120751220Seric   E
120858363Seric   F	FAX Relay
120951220Seric   G
121057591Seric   H	mail Hub (for mail clusters)
121151220Seric   I
121251220Seric   J
121351220Seric   K
121451220Seric   L
121551220Seric   M	Masquerade (who I claim to be)
121651220Seric   N
121751220Seric   O
121851220Seric   P
121951220Seric   Q
122051220Seric   R	Relay (for unqualified names)
122158071Seric   S	Smart Host
122251220Seric   T
122351309Seric   U	my UUCP name (if I have a UUCP connection)
122451309Seric   V	UUCP Relay (class V hosts)
122551220Seric   W	UUCP Relay (class W hosts)
122651220Seric   X	UUCP Relay (class X hosts)
122751309Seric   Y	UUCP Relay (all other hosts)
122851220Seric   Z	Version number
122951220Seric
123051220Seric
123151220SericCLASSES
123251220Seric
123351220Seric   A
123451220Seric   B
123551220Seric   C
123667539Seric   D	"dotted" users
123757246Seric   E	addresses that should not seem to come from $M
123854839Seric   F	hosts we forward for
123951220Seric   G
124051220Seric   H
124151220Seric   I
124251220Seric   J
124351220Seric   K
124451220Seric   L	addresses that should not be forwarded to $R
124551220Seric   M
124651220Seric   N
124751220Seric   O	operators that indicate network operations (cannot be in local names)
124860211Seric   P	top level pseudo-domains: BITNET, FAX, UUCP, etc.
124951220Seric   Q
125051220Seric   R
125151220Seric   S
125251220Seric   T
125351220Seric   U	locally connected UUCP hosts
125451309Seric   V	UUCP hosts connected to relay $V
125551309Seric   W	UUCP hosts connected to relay $W
125651309Seric   X	UUCP hosts connected to relay $X
125751309Seric   Y	locally connected smart UUCP hosts
125864153Seric   Z	locally connected domain-ized UUCP hosts
125954839Seric   .	the class containing only a dot
126051220Seric
126151220Seric
126251220SericM4 DIVERSIONS
126351220Seric
126458071Seric   1	Local host detection and resolution
126558071Seric   2	Local Ruleset 3 additions
126658071Seric   3	Local Ruleset 0 additions
126751268Seric   4	UUCP Ruleset 0 additions
126851309Seric   5	locally interpreted names (overrides $R)
126954839Seric   6	local configuration (at top of file)
127051220Seric   7	mailer definitions
127166099Seric   8
127258681Seric   9	special local rulesets (1 and 2)
1273