xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 69940)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*69940Seric		@(#)README	8.65 (Berkeley) 06/19/95
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
6868845SericLet's examine a typical .mc file (cf/cs-hpux9.mc):
6951220Seric
7051220Seric	divert(-1)
7151220Seric	#
7251220Seric	# Copyright (c) 1983 Eric P. Allman
7368845Seric	# Copyright (c) 1988, 1993
7468845Seric	#	The Regents of the University of California.  All rights reserved.
7551220Seric	#
7668845Seric	# Redistribution and use in source and binary forms, with or without
7768845Seric	# modification, are permitted provided that the following conditions
7868845Seric	# are met:
7968845Seric	# 1. Redistributions of source code must retain the above copyright
8068845Seric	#    notice, this list of conditions and the following disclaimer.
8168845Seric	# 2. Redistributions in binary form must reproduce the above copyright
8268845Seric	#    notice, this list of conditions and the following disclaimer in
8368845Seric	#    the documentation and/or other materials provided with the
8468845Seric	#    distribution.
8568845Seric	# 3. All advertising materials mentioning features or use of this
8668845Seric	#    software #    must display the following acknowledgement:
8768845Seric	#	This product includes software developed by the University of
8868845Seric	#	California, Berkeley and its contributors.
8968845Seric	# 4. Neither the name of the University nor the names of its
9068845Seric	#    contributors may be used to endorse or promote products derived
9168845Seric	#    from this software without specific prior written permission.
9251220Seric	#
9368845Seric	# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
9468845Seric	# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
9568845Seric	# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
9668845Seric	# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
9768845Seric	# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
9868845Seric	# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
9968845Seric	# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
10068845Seric	# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
10168845Seric	# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
10268845Seric	# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
10368845Seric	# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
10468845Seric	#
10551220Seric
10668845Seric	#
10768845Seric	#  This is a Berkeley-specific configuration file for HP-UX 9.x.
10868845Seric	#  It applies only the the Computer Science Division at Berkeley,
10968845Seric	#  and should not be used elsewhere.   It is provided on the sendmail
11068845Seric	#  distribution as a sample only.  To create your own configuration
11168845Seric	#  file, create an appropriate domain file in ../domain, change the
11268845Seric	#  `DOMAIN' macro below to reference that file, and copy the result
11368845Seric	#  to a name of your own choosing.
11468845Seric	#
11568845Seric
11657246SericThe divert(-1) will delete the crud in the resulting output file.
11768845SericThe copyright notice can be replace by whatever your lawyers require;
11868845Sericour lawyers require the one that I've included in my files.  A copyleft
11968845Sericis a copyright by another name.
12051220Seric
12157246SericThe next line MUST be
12257246Seric
12351220Seric	include(`../m4/cf.m4')
12451220Seric
12557246SericThis will pull in the M4 macros you will need to make sense of
12657246Sericeverything else.  As the saying goes, don't think about it, just
12757246Sericdo it.  If you don't do it, don't bother reading the rest of this
12857246Sericfile.
12951220Seric
13056778Seric	VERSIONID(`<SCCS or RCS version id>')
13151220Seric
13251220SericVERSIONID is a macro that stuffs the version information into the
13351220Sericresulting file.  We use SCCS; you could use RCS, something else, or
13457246Sericomit it completely.  This is not the same as the version id included
13557246Sericin SMTP greeting messages -- this is defined in m4/version.m4.
13651220Seric
13768845Seric	OSTYPE(hpux9)dnl
13851220Seric
13968845SericYou must specify an OSTYPE to properly configure things such as the
14068845Sericpathname of the help and status files, the flags needed for the local
14168845Sericmailer, and other important things.  If you omit it, you will get an
14268845Sericerror when you try to build the configuration.  Look at the ostype
14368845Sericdirectory for the list of known operating system types.
14451220Seric
14568845Seric	DOMAIN(CS.Berkeley.EDU)dnl
14668845Seric
14768845SericThis example is specific to the Computer Science Division at Berkeley.
14868845SericYou can use "DOMAIN(generic)" to get a sufficiently bland definition
14968845Sericthat may well work for you, or you can create a customized domain
15068845Sericdefinition appropriate for your environment.
15168845Seric
15268845Seric	MAILER(local)
15351268Seric	MAILER(smtp)
15451220Seric
15551309SericThese describe the mailers used at the default CS site site.  The
15651309Sericlocal mailer is always included automatically.
15751220Seric
15858087Seric
15957246Seric+--------+
16057246Seric| OSTYPE |
16157246Seric+--------+
16257246Seric
16368845SericYou MUST define an operating system environment, or the configuration
16468845Sericfile build will puke.  There are several environments available; look
16568845Sericat the "ostype" directory for the current list.  This macro changes
16668845Sericthings like the location of the alias file and queue directory.  Some
16768845Sericof these files are identical to one another.
16851220Seric
16968845SericOperating system definitions are usually easy to write.  They may define
17068845Sericthe following variables (everything defaults, so an ostype file may be
17168845Sericempty).  Unfortunately, the list of configuration-supported systems is
17268845Sericnot as broad as the list of source-supported systems, since many of
17368845Sericthe source contributors do not include corresponding ostype files.
17451220Seric
17557246SericALIAS_FILE		[/etc/aliases] The location of the text version
17659761Seric			of the alias file(s).  It can be a comma-separated
17766790Seric			list of names (but be sure you quote values with
17868452Seric			commas in them -- for example, use
17966790Seric				define(`ALIAS_FILE', `a,b')
18066790Seric			to get "a" and "b" both listed as alias files;
18166790Seric			otherwise the define() primitive only sees "a").
18257246SericHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
18357246Seric			containing information printed in response to
18457246Seric			the SMTP HELP command.
18557246SericQUEUE_DIR		[/var/spool/mqueue] The directory containing
18657246Seric			queue files.
18757246SericSTATUS_FILE		[/etc/sendmail.st] The file containing status
18857246Seric			information.
18958087SericLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
19064153SericLOCAL_MAILER_FLAGS	[rmn] The flags used by the local mailer.  The
19164153Seric			flags lsDFM are always included.
19263761SericLOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
19363761Seric			mail.
19468340SericLOCAL_MAILER_MAX	[undefined] If defined, the maximum size of local
19568340Seric			mail that you are willing to accept.
19668891SericLOCAL_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
19768891Seric			that ARRIVE from an address that resolves to the
19868891Seric			local mailer and which are converted to MIME will be
19968891Seric			labelled with this character set.
20058087SericLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
20163791SericLOCAL_SHELL_FLAGS	[eu] The flags used by the shell mailer.  The
20263791Seric			flags lsDFM are always included.
20363791SericLOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
20463791Seric			mail.
20567989SericLOCAL_SHELL_DIR		[$z:/] The directory search path in which the
20667989Seric			shell should run.
20758087SericUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
20858087Seric			used to submit news.
20958087SericUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
21058087SericUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
21158087Seric			usenet mailer.
21265911SericUSENET_MAILER_MAX	[100000] The maximum size of messages that will
21365911Seric			be accepted by the usenet mailer.
21463857SericSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
21567915Seric			flags are `mDFMUX' for all SMTP-based mailers; the
21667915Seric			"esmtp" mailer adds `a' and "smtp8" adds `8'.
21765911SericSMTP_MAILER_MAX		[undefined] The maximum size of messages that will
21867915Seric			be transported using the smtp, smtp8, or esmtp
21967915Seric			mailers.
22067915SericSMTP_MAILER_ARGS	[IPC $h] The arguments passed to the smtp mailer.
22167915Seric			About the only reason you would want to change this
22267915Seric			would be to change the default port.
22367915SericESMTP_MAILER_ARGS	[IPC $h] The arguments passed to the esmtp mailer.
22467915SericSMTP8_MAILER_ARGS	[IPC $h] The arguments passed to the smtp8 mailer.
22567915SericRELAY_MAILER_ARGS	[IPC $h] The arguments passed to the relay mailer.
22668891SericSMTP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
22768891Seric			that ARRIVE from an address that resolves to one of
22868891Seric			the SMTP mailers and which are converted to MIME will
22968891Seric			be labelled with this character set.
23063857SericUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
23168694Seric			flags are `DFMhuU' (and `m' for uucp-new mailer,
23268694Seric			minus `U' for uucp-dom mailer).
23368057SericUUCP_MAILER_ARGS	[uux - -r -z -a$g -gC $h!rmail ($u)] The arguments
23463761Seric			passed to the UUCP mailer.
23568891SericUUCP_MAILER_MAX		[100000] The maximum size message accepted for
23663791Seric			transmission by the UUCP mailers.
23768891SericUUCP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
23868891Seric			that ARRIVE from an address that resolves to one of
23968891Seric			the UUCP mailers and which are converted to MIME will
24068891Seric			be labelled with this character set.
24165911SericFAX_MAILER_PATH		[/usr/local/lib/fax/mailfax] The program used to
24265911Seric			submit FAX messages.
24365911SericFAX_MAILER_MAX		[100000] The maximum size message accepted for
24465911Seric			transmission by FAX.
24567934SericPOP_MAILER_PATH		[/usr/lib/mh/spop] The pathname of the POP mailer.
24667934SericPOP_MAILER_FLAGS	[Penu] Flags added to POP mailer.  Flags "lsDFM"
24767934Seric			are always added.
24867934SericPOP_MAILER_ARGS		[pop $u] The arguments passed to the POP mailer.
24967942SericPROCMAIL_MAILER_FLAGS	[Shu] Flags added to Procmail mailer.  Flags
25067942Seric			``DFMmn'' are always set.
25167942SericPROCMAIL_MAILER_ARGS	[procmail -m $h $f $u] The arguments passed to
25267942Seric			the Procmail mailer.
25368340SericPROCMAIL_MAILER_MAX	[undefined] If set, the maximum size message that
25468340Seric			will be accepted by the procmail mailer.
25569628SericMAIL11_MAILER_PATH	[/usr/etc/mail11] The path to the mail11 mailer.
25669628SericMAIL11_MAILER_FLAGS	[nsFx] Flags for the mail11 mailer.
25769628SericMAIL11_MAILER_ARGS	[mail11 $g $x $h $u] Arguments passed to the mail11
25869628Seric			mailer.
25957246Seric
26057246Seric+---------+
26157246Seric| DOMAINS |
26257246Seric+---------+
26357246Seric
26457246SericYou will probably want to collect domain-dependent defines into one
26557246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
26657246Sericdomain file includes definitions for several internal distinguished
26757246Serichosts:
26857246Seric
26969624SericUUCP_RELAY	The host that will accept UUCP-addressed email.
27057246Seric		If not defined, all UUCP sites must be directly
27164028Seric		connected.
27269624SericBITNET_RELAY	The host that will accept BITNET-addressed email.
27357246Seric		If not defined, the .BITNET pseudo-domain won't work.
27469624SericDECNET_RELAY	The host that will accept DECNET-addressed email.
27569624Seric		If not defined, the .DECNET pseudo-domain and addresses
27669624Seric		of the form node::user will not work.
27769624SericFAX_RELAY	The host that will accept mail to the .FAX pseudo-domain.
27869624Seric		The "fax" mailer overrides this value.
27968697SericLOCAL_RELAY	DEPRECATED.  The site that will handle unqualified
28068697Seric		names -- that is, names with out an @domain extension.
28168697Seric		If not set, they are assumed to belong on this machine.
28268697Seric		This allows you to have a central site to store a
28357246Seric		company- or department-wide alias database.  This
28468697Seric		only works at small sites, and only with some user
28568697Seric		agents.
28667915SericLUSER_RELAY	The site that will handle lusers -- that is, apparently
28767915Seric		local names that aren't local accounts or aliases.
28857246Seric
28967915SericAny of these can be either ``mailer:hostname'' (in which case the
29068694Sericmailer is the internal mailer name, such as ``uucp-new'' and the hostname
29164028Sericis the name of the host as appropriate for that mailer) or just a
29264028Seric``hostname'', in which case a default mailer type (usually ``relay'',
29364153Serica variant on SMTP) is used.  WARNING: if you have a wildcard MX
29464153Sericrecord matching your domain, you probably want to define these to
29564153Serichave a trailing dot so that you won't get the mail diverted back
29664153Sericto yourself.
29764028Seric
29857246SericThe domain file can also be used to define a domain name, if needed
29957982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
30057982Sericat your site masquerade behind one email name, you could also use
30157982SericMASQUERADE_AS here.
30257246Seric
30358408SericYou do not have to define a domain -- in particular, if you are a
30458408Sericsingle machine sitting off somewhere, it is probably more work than
30558408Sericit's worth.  This is just a mechanism for combining "domain dependent
30658408Sericknowledge" into one place.
30758408Seric
30857246Seric+---------+
30957246Seric| MAILERS |
31057246Seric+---------+
31157246Seric
31251220SericThere are fewer mailers supported in this version than the previous
31351220Sericversion, owing mostly to a simpler world.
31451220Seric
31551220Sericlocal		The local and prog mailers.  You will almost always
31651220Seric		need these; the only exception is if you relay ALL
31757247Seric		your mail to another site.  This mailer is included
31857247Seric		automatically.
31951220Seric
32051220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
32151220Seric		not hide hosts behind a gateway or another other
32251220Seric		such hack; it assumes a world where everyone is
32363761Seric		running the name server.  This file actually defines
32467915Seric		four mailers: "smtp" for regular (old-style) SMTP to
32563761Seric		other servers, "esmtp" for extended SMTP to other
32667915Seric		servers, "smtp8" to do SMTP to other servers without
32767915Seric		converting 8-bit data to MIME (essentially, this is
32867915Seric		your statement that you know the other end is 8-bit
32967915Seric		clean even if it doesn't say so), and "relay" for
33067915Seric		transmission to our RELAY_HOST, LUSER_RELAY, or
33167915Seric		MAILER_HUB.
33251220Seric
33351220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
33467471Seric		defines two mailers, "uucp-old" (a.k.a. "uucp") and
33567471Seric		"uucp-new" (a.k.a. "suucp").  The latter is for when you
33667471Seric		know that the UUCP mailer at the other end can handle
33767471Seric		multiple recipients in one transfer.  If the smtp mailer
33867471Seric		is also included in your configuration, two other mailers
33968694Seric		("uucp-dom" and "uucp-uudom") are also defined [warning:
34068694Seric		you MUST specify MAILER(smtp) before MAILER(uucp)].  When you
34167471Seric		include the uucp mailer, sendmail looks for all names in
34265218Seric		the $=U class and sends them to the uucp-old mailer; all
34365218Seric		names in the $=Y class are sent to uucp-new; and all
34465218Seric		names in the $=Z class are sent to uucp-uudom.  Note that
34557246Seric		this is a function of what version of rmail runs on
34657246Seric		the receiving end, and hence may be out of your control.
34765218Seric		See the section below describing UUCP mailers in more
34865218Seric		detail.
34951220Seric
35058087Sericusenet		Usenet (network news) delivery.  If this is specified,
35158087Seric		an extra rule is added to ruleset 0 that forwards all
35258087Seric		local email for users named ``group.usenet'' to the
35358087Seric		``inews'' program.  Note that this works for all groups,
35458087Seric		and may be considered a security problem.
35558087Seric
35658363Sericfax		Facsimile transmission.  This is experimental and based
35758363Seric		on Sam Leffler's FlexFAX software.  For more information,
35858363Seric		see below.
35958087Seric
36065148Sericpop		Post Office Protocol.
36158363Seric
36267942Sericprocmail	An interface to procmail (does not come with sendmail).
36367942Seric		This is designed to be used in mailertables.  For example,
36467942Seric		a common question is "how do I forward all mail for a given
36567942Seric		domain to a single person?".  If you have this mailer
36667942Seric		defined, you could set up a mailertable reading:
36767942Seric
36867942Seric			host.com	procmail:/etc/procmailrcs/host.com
36967942Seric
37067942Seric		with the file /etc/procmailrcs/host.com reading:
37167942Seric
37267942Seric			:0	# forward mail for host.com
37367942Seric			! -oi -f $1 person@other.host
37467942Seric
37567942Seric		This would arrange for (anything)@host.com to be sent
37667942Seric		to person@other.host.  Within the procmail script, $1 is
37767942Seric		the name of the sender and $2 is the name of the recipient.
37867942Seric		If you use this with FEATURE(local_procmail), the FEATURE
37967942Seric		should be listed first.
38067942Seric
38169628Sericmail11		The DECnet mail11 mailer, useful only if you have the mail11
38269628Seric		program from gatekeeper.dec.com:/pub/DEC/gwtools (and
38369628Seric		DECnet, of course).
38469628Seric
38567929SericThe local mailer accepts addresses of the form "user+detail", where
38667929Sericthe "+detail" is not used for mailbox matching but is available
38767942Sericto certain local mail programs (in particular, see FEATURE(local_procmail)).
38867929SericFor example, "eric", "eric+sendmail", and "eric+sww" all indicate
38967929Sericthe same user, but additional arguments <null>, "sendmail", and "sww"
39067929Sericmay be provided for use in sorting mail.
39165148Seric
39267929Seric
39357246Seric+----------+
39457246Seric| FEATURES |
39557246Seric+----------+
39651268Seric
39757246SericSpecial features can be requested using the "FEATURE" macro.  For
39857246Sericexample, the .mc line:
39957246Seric
40057246Seric	FEATURE(use_cw_file)
40157246Seric
40257246Serictells sendmail that you want to have it read an /etc/sendmail.cw
40358782Sericfile to get values for class $=w.  The FEATURE may contain a single
40458782Sericoptional parameter -- for example:
40557246Seric
40658782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
40758782Seric
40858782SericAvailable features are:
40958782Seric
41057246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
41157246Seric		names for this host.  This might be used if you were
41257246Seric		on a host that MXed for a dynamic set of other
41357246Seric		hosts.  If the set is static, just including the line
41457246Seric		"Cw<name1> <name2> ..." is probably superior.
41558408Seric		The actual filename can be overridden by redefining
41658408Seric		confCW_FILE.
41764324Seric
41858087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
41958087Seric		a ``551 User not local; please try <address>'' message.
42058087Seric		If this is set, you can alias people who have left
42158087Seric		to their new address with ".REDIRECT" appended.
42264324Seric
42358284Sericnouucp		Don't do anything special with UUCP addresses at all.
42464324Seric
42559080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
42659080Seric		This would generally only be used by sites that only
42759080Seric		act as mail gateways or which have user agents that do
42864028Seric		full canonification themselves.  You may also want to
42964028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
43064028Seric		turn off the usual resolver options that do a similar
43164028Seric		thing.
43264324Seric
43367917Sericstickyhost	If set, email sent to "user@local.host" are marked
43458526Seric		as "sticky" -- that is, the local addresses aren't
43558526Seric		matched against UDB and don't go through ruleset 5.
43667915Seric		This is used if you want a set up where "user" is
43767915Seric		not necessarily the same as "user@local.host", e.g.,
43867915Seric		to make a distinct domain-wide namespace.  Prior to
43967915Seric		8.7 this was the default, and notsticky was used to
44067915Seric		turn this off.
44164324Seric
44258782Sericmailertable	Include a "mailer table" which can be used to override
44358782Seric		routing for particular domains.  The argument of the
44458782Seric		FEATURE may be the key definition.  If none is specified,
44558782Seric		the definition used is:
44664164Seric			hash -o /etc/mailertable
44763761Seric		Keys in this database are fully qualified domain names
44863761Seric		or partial domains preceded by a dot -- for example,
44963761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
45063761Seric		Values must be of the form:
45158782Seric			mailer:domain
45263761Seric		where "mailer" is the internal mailer name, and "domain"
45363761Seric		is where to send the message.  These maps are not
45463761Seric		reflected into the message header.
45564324Seric
45663761Sericdomaintable	Include a "domain table" which can be used to provide
45767451Seric		domain name mapping.  Use of this should really be
45867451Seric		limited to your own domains.  It may be useful if you
45967451Seric		change names (e.g., your company changes names from
46067451Seric		oldname.com to newname.com).  The argument of the
46167451Seric		FEATURE may be the key definition.  If none is specified,
46267451Seric		the definition used is:
46364164Seric			hash -o /etc/domaintable
46467451Seric		The key in this table is the domain name; the value is
46567451Seric		the new (fully qualified) domain.  Anything in the
46663761Seric		domaintable is reflected into headers; that is, this
46763761Seric		is done in ruleset 3.
46864324Seric
46959034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
47059034Seric		internet addresses.  The table can be built using the
47164153Seric		bitdomain program contributed by John Gardiner Myers.
47259034Seric		The argument of the FEATURE may be the key definition; if
47359034Seric		none is specified, the definition used is:
47464164Seric			hash -o /etc/bitdomain.db
47559034Seric		Keys are the bitnet hostname; values are the corresponding
47659034Seric		internet hostname.
47764324Seric
47859037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
47959037Seric		is:
48064164Seric			hash -o /etc/uudomain.db
48159037Seric		At the moment there is no automagic tool to build this
48259037Seric		database.
48364324Seric
48460263Sericalways_add_domain
48560263Seric		Include the local host domain even on locally delivered
48660263Seric		mail.  Normally it is not added unless it is already
48760263Seric		present.
48864324Seric
48963761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
49063761Seric		feature will cause recipient addresses to also masquerade
49163761Seric		as being from the masquerade host.  Normally they get
49263761Seric		the local hostname.  Although this may be right for
49363761Seric		ordinary users, it can break local aliases.  For example,
49463761Seric		if you send to "localalias", the originating sendmail will
49563761Seric		find that alias and send to all members, but send the
49663761Seric		message with "To: localalias@masqueradehost".  Since that
49763761Seric		alias likely does not exist, replies will fail.  Use this
49863761Seric		feature ONLY if you can guarantee that the ENTIRE
49963761Seric		namespace on your masquerade host supersets all the
50063761Seric		local entries.
50164324Seric
50264153Sericnodns		We aren't running DNS at our site (for example,
50364153Seric		we are UUCP-only connected).  It's hard to consider
50464153Seric		this a "feature", but hey, it had to go somewhere.
50557246Seric
50664324Sericnullclient	This is a special case -- it creates a stripped down
50764324Seric		configuration file containing nothing but support for
50864394Seric		forwarding all mail to a central hub via a local
50964394Seric		SMTP-based network.  The argument is the name of that
51064394Seric		hub.
51164394Seric
51264394Seric		The only other feature that should be used in conjunction
51364394Seric		with this one is "nocanonify" (this causes addresses to
51464394Seric		be sent unqualified via the SMTP connection; normally
51564394Seric		they are qualifed with the masquerade name, which
51664394Seric		defaults to the name of the hub machine).  No mailers
51764394Seric		should be defined.  No aliasing or forwarding is done.
51857246Seric
51967942Sericlocal_procmail	Use procmail as the local mailer.  This mailer can
52067929Seric		make use of the "user+indicator@local.host" syntax;
52167929Seric		normally the +indicator is just tossed, but by default
52267929Seric		it is passed as the -a argument to procmail.  The
52367929Seric		argument to this feature is the pathname of procmail,
52467929Seric		which defaults to /usr/local/bin/procmail.
52564324Seric
52668206Sericbestmx_is_local	Accept mail as though locally addressed for any host that
52768206Seric		lists us as the best possible MX record.  This generates
52868206Seric		additional DNS traffic, but should be OK for low to
529*69940Seric		medium traffic hosts.  THIS FEATURE IS FUNDAMENTALLY
530*69940Seric		INCOMPATIBLE WITH WILDCARD MX RECORDS!!!  If you have
531*69940Seric		a wildcard MX record that matches your domain, you
532*69940Seric		cannot use this feature.
53367929Seric
53468216Sericsmrsh		Use the SendMail Restricted SHell (smrsh) provided
53568216Seric		with the distribution instead of /bin/sh for mailing
53668216Seric		to programs.  This improves the ability of the local
53768216Seric		system administrator to control what gets run via
53868216Seric		e-mail.  If an argument is provided it is used as the
53968216Seric		pathname to smrsh; otherwise, /usr/local/etc/smrsh is
54068216Seric		assumed.
54168206Seric
54268216Seric
54357246Seric+-------+
54457246Seric| HACKS |
54557246Seric+-------+
54657246Seric
54757246SericSome things just can't be called features.  To make this clear,
54857247Sericthey go in the hack subdirectory and are referenced using the HACK
54957246Sericmacro.  These will tend to be site-dependent.  The release
55057246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
55157246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
55257246Sericthis is intended as a short-term aid while we move hosts into
55357246Sericsubdomains.
55457246Seric
55558087Seric
55657246Seric+--------------------+
55757246Seric| SITE CONFIGURATION |
55857246Seric+--------------------+
55957246Seric
56068057Seric    *****************************************************
56168057Seric    * This section is really obsolete, and is preserved	*
56268057Seric    * only for back compatibility.  You should plan on	*
56368057Seric    * using mailertables for new installations.	  In	*
56468057Seric    * particular, it doesn't work for the newer forms	*
56568057Seric    * of UUCP mailers, such as uucp-uudom.		*
56668057Seric    *****************************************************
56768057Seric
56857246SericComplex sites will need more local configuration information, such as
56957246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
57057246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
57157246Seric
57266336SericIf your host is known by several different names, you need to augment
57366336Sericthe $=w class.  This is a list of names by which you are known, and
57466336Sericanything sent to an address using a host name in this list will be
57566336Serictreated as local mail.  You can do this in two ways: either create
57666336Sericthe file /etc/sendmail.cw containing a list of your aliases (one per
57766336Sericline), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
57866336Sericline:
57966336Seric
58066336Seric	Cw alias.host.name
58166336Seric
58266336Sericat the end of that file.  See the ``vangogh.mc'' file for an example.
58366336SericBe sure you use the fully-qualified name of the host, rather than a
58466336Sericshort name.
58566336Seric
58657246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
58757246Sericconfiguration information stored in the siteconfig subdirectory.  For
58857246Sericexample, the line
58957246Seric
59057246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
59157246Seric
59257246Sericreads the file uucp.ucbvax for local connection information.  The
59357246Sericsecond parameter is the local name (in this case just "ucbvax" since
59466336Sericit is locally connected, and hence a UUCP hostname).  The third
59566336Sericparameter is the name of both a macro to store the local name (in
59666336Sericthis case, $U) and the name of the class (e.g., $=U) in which to store
59766336Sericthe host information read from the file.  Another SITECONFIG line reads
59857246Seric
59957246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
60057246Seric
60157246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
60257246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
60366336Sericstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
60466336Sericis, the name of the relay to which the hosts listed in uucp.ucbarpa
60566336Sericare connected.  [The machine ucbarpa is gone now, but I've left
60657246Sericthis out-of-date configuration file around to demonstrate how you
60757246Sericmight do this.]
60857246Seric
60966336SericNote that the case of SITECONFIG with a third parameter of ``U'' is
61066336Sericspecial; the second parameter is assumed to be the UUCP name of the
61166336Sericlocal site, rather than the name of a remote site, and the UUCP name
61266336Sericis entered into $=w (the list of local hostnames) as $U.UUCP.
61366336Seric
61457246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
61557246Sericmore than a sequence of SITE macros describing connectivity.  For
61657246Sericexample:
61757246Seric
61857246Seric	SITE(cnmat)
61957246Seric	SITE(sgi olympus)
62057246Seric
62157246SericThe second example demonstrates that you can use two names on the
62257246Sericsame line; these are usually aliases for the same host (or are at
62357246Sericleast in the same company).
62457246Seric
62558087Seric
62665218Seric+--------------------+
62765218Seric| USING UUCP MAILERS |
62865218Seric+--------------------+
62965218Seric
63065218SericIt's hard to get UUCP mailers right because of the extremely ad hoc
63165218Sericnature of UUCP addressing.  These config files are really designed
63265218Sericfor domain-based addressing, even for UUCP sites.
63365218Seric
63465218SericThere are four UUCP mailers available.  The choice of which one to
63565218Sericuse is partly a matter of local preferences and what is running at
63665218Sericthe other end of your UUCP connection.  Unlike good protocols that
63765218Sericdefine what will go over the wire, UUCP uses the policy that you
63865218Sericshould do what is right for the other end; if they change, you have
63965218Sericto change.  This makes it hard to do the right thing, and discourages
64065218Sericpeople from updating their software.  In general, if you can avoid
64165218SericUUCP, please do.
64265218Seric
64365218SericThe major choice is whether to go for a domainized scheme or a
64465218Sericnon-domainized scheme.  This depends entirely on what the other
64565218Sericend will recognize.  If at all possible, you should encourage the
64665218Sericother end to go to a domain-based system -- non-domainized addresses
64765218Sericdon't work entirely properly.
64865218Seric
64965218SericThe four mailers are:
65065218Seric
65165218Seric    uucp-old (obsolete name: "uucp")
65265218Seric	This is the oldest, the worst (but the closest to UUCP) way of
65365218Seric	sending messages accros UUCP connections.  It does bangify
65465218Seric	everything and prepends $U (your UUCP name) to the sender's
65565218Seric	address (which can already be a bang path itself).  It can
65665218Seric	only send to one address at a time, so it spends a lot of
65765218Seric	time copying duplicates of messages.  Avoid this if at all
65865218Seric	possible.
65965218Seric
66065218Seric    uucp-new (obsolete name: "suucp")
66165218Seric	The same as above, except that it assumes that in one rmail
66265218Seric	command you can specify several recipients.  It still has a
66365218Seric	lot of other problems.
66465218Seric
66565218Seric    uucp-dom
66665218Seric	This UUCP mailer keeps everything as domain addresses.
66767471Seric	Basically, it uses the SMTP mailer rewriting rules.  This mailer
66867471Seric	is only included if MAILER(smtp) is also specified.
66965218Seric
67065218Seric	Unfortunately, a lot of UUCP mailer transport agents require
67165218Seric	bangified addresses in the envelope, although you can use
67265218Seric	domain-based addresses in the message header.  (The envelope
67365218Seric	shows up as the From_ line on UNIX mail.)  So....
67465218Seric
67565218Seric    uucp-uudom
67665218Seric	This is a cross between uucp-new (for the envelope addresses)
67765218Seric	and uucp-dom (for the header addresses).  It bangifies the
67865218Seric	envelope sender (From_ line in messages) without adding the
67965218Seric	local hostname, unless there is no host name on the address
68065218Seric	at all (e.g., "wolf") or the host component is a UUCP host name
68165218Seric	instead of a domain name ("somehost!wolf" instead of
68267471Seric	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
68367471Seric	is also specified.
68465218Seric
68565218SericExamples:
68665218Seric
68765218SericWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
68865218Sericfollowing summarizes the sender rewriting for various mailers.
68965218Seric
69065218SericMailer          sender		rewriting in the envelope
69165218Seric------		------		-------------------------
69265218Sericuucp-{old,new}	wolf		grasp!wolf
69365218Sericuucp-dom	wolf		wolf@grasp.insa-lyon.fr
69465218Sericuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
69565218Seric
69665218Sericuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
69765218Sericuucp-dom	wolf@fr.net	wolf@fr.net
69865218Sericuucp-uudom	wolf@fr.net	fr.net!wolf
69965218Seric
70065218Sericuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
70165218Sericuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
70265218Sericuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
70365218Seric
70465218SericIf you are using one of the domainized UUCP mailers, you really want
70565218Sericto convert all UUCP addresses to domain format -- otherwise, it will
70665218Sericdo it for you (and probably not the way you expected).  For example,
70765218Sericif you have the address foo!bar!baz (and you are not sending to foo),
70865218Sericthe heuristics will add the @uucp.relay.name or @local.host.name to
70965218Sericthis address.  However, if you map foo to foo.host.name first, it
71065218Sericwill not add the local hostname.  You can do this using the uucpdomain
71165218Sericfeature.
71265218Seric
71365218Seric
71457246Seric+-------------------+
71557246Seric| TWEAKING RULESETS |
71657246Seric+-------------------+
71757246Seric
71851268SericFor more complex configurations, you can define special rules.
71951268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
72051268Sericthe names.  Any modifications made here are reflected in the header.
72151268Seric
72251268SericA common use is to convert old UUCP addreses to SMTP addresses using
72351268Sericthe UUCPSMTP macro.  For example:
72451268Seric
72551268Seric	LOCAL_RULE_3
72651268Seric	UUCPSMTP(decvax,	decvax.dec.com)
72751268Seric	UUCPSMTP(research,	research.att.com)
72851268Seric
72951268Sericwill cause addresses of the form "decvax!user" and "research!user"
73051268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
73151268Sericrespectively.
73251268Seric
73365957SericThis could also be used to look up hosts in a database map:
73457246Seric
73557246Seric	LOCAL_RULE_3
73657246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
73757246Seric
73857246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
73957246Seric
74051268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
74151268SericFor example, new rules are needed to parse hostnames that you accept
74251309Sericvia MX records.  For example, you might have:
74351268Seric
74451309Seric	LOCAL_RULE_0
74565986Seric	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
74651309Seric
74751309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
74851309Sericpointing at this host; this rule catches the message and forwards it on
74951309Sericusing UUCP.
75051309Seric
75158681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
75258681SericThese rulesets are normally empty.
75358681Seric
75457246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
75557246Sericboilerplate option setting but before rulesets, and can be used to
75657945Sericdeclare local database maps or whatever.  For example:
75751268Seric
75857246Seric	LOCAL_CONFIG
75957246Seric	Khostmap hash /etc/hostmap.db
76057246Seric	Kyplocal nis -m hosts.byname
76151220Seric
76258087Seric
76357246Seric+---------------------------+
76457246Seric| MASQUERADING AND RELAYING |
76557246Seric+---------------------------+
76657246Seric
76757246SericYou can have your host masquerade as another using
76857246Seric
76957246Seric	MASQUERADE_AS(host.domain)
77057246Seric
77165957SericThis causes outgoing SMTP mail to be labeled as coming from the
77257246Sericindicated domain, rather than $j.  One normally masquerades as one
77365957Sericof one's own subdomains (for example, it's unlikely that I would
77457246Sericchoose to masquerade as an MIT site).
77557246Seric
77664153SericThe masquerade name is not normally canonified, so it is important
77764153Sericthat it be your One True Name, that is, fully qualified and not a
77864153SericCNAME.
77964153Seric
78057246Sericthere are always users that need to be "exposed" -- that is, their
78157246Sericinternal site name should be displayed instead of the masquerade name.
78257246SericRoot is an example.  You can add users to this list using
78357246Seric
78457246Seric	EXPOSED_USER(usernames)
78557246Seric
78657246SericThis adds users to class E; you could also use something like
78757246Seric
78857246Seric	FE/etc/sendmail.cE
78957246Seric
79057246SericYou can also arrange to relay all unqualified names (that is, names
79157246Sericwithout @host) to a relay host.  For example, if you have a central
79257246Sericemail server, you might relay to that host so that users don't have
79357246Sericto have .forward files or aliases.  You can do this using
79457246Seric
79558071Seric	define(`LOCAL_RELAY', mailer:hostname)
79657246Seric
79758071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
79858071Seric"smtp".  There are some user names that you don't want relayed, perhaps
79958071Sericbecause of local aliases.  A common example is root, which may be
80058071Sericlocally aliased.  You can add entries to this list using
80157246Seric
80257246Seric	LOCAL_USER(usernames)
80357246Seric
80457246SericThis adds users to class L; you could also use something like
80557246Seric
80657246Seric	FL/etc/sendmail.cL
80757246Seric
80864153SericIf you want all incoming mail sent to a centralized hub, as for a
80964153Sericshared /var/spool/mail scheme, use
81057591Seric
81158071Seric	define(`MAIL_HUB', mailer:hostname)
81257591Seric
81358071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
81468697Sericand MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
81568697Sericbe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
81668697SericNames in $=L will be delivered locally, so you MUST have aliases or
81768697Seric.forward files for them.
81866047Seric
81968697SericFor example, if are on machine mastodon.CS.Berkeley.EDU and you have
82068697SericFEATURE(stickyhost), the following combinations of settings will have the
82168697Sericindicated effects:
82257591Seric
82357591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
82457591Seric
82557591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
82668697Sericmail.CS.Berkeley.EDU	  (no local aliasing)	    (aliasing done)
82757591Seric
82857591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
82968697Sericmammoth.CS.Berkeley.EDU	  (aliasing done)	    (aliasing done)
83057591Seric
83157591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
83268697SericMAIL_HUB set as above	  (no local aliasing)	    (aliasing done)
83357591Seric
83468697SericIf you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
83568697SericMAIL_HUB act identically, with MAIL_HUB taking precedence.
83668697Seric
83764153SericIf you want all outgoing mail to go to a central relay site, define
83864153SericSMART_HOST as well.  Briefly:
83958071Seric
84064153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
84164153Seric	MAIL_HUB applies to names qualified with the name of the
84264153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
84364153Seric	SMART_HOST applies to names qualified with other hosts.
84464153Seric
84569624SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
84669624SericDECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
84769624Sericreally want absolutely everything to go to a single central site you will
84869624Sericneed to unset all the other relays -- or better yet, find or build a
84969624Sericminimal config file that does this.
85064153Seric
85164153Seric
85258071Seric+-------------------------------+
85358071Seric| NON-SMTP BASED CONFIGURATIONS |
85458071Seric+-------------------------------+
85558071Seric
85658071SericThese configuration files are designed primarily for use by SMTP-based
85758071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
85858071SericUUCP-primarily nodes (the latter is defined as a small local net
85958071Sericconnected to the rest of the world via UUCP).  However, there is one
86058071Serichook to handle some special cases.
86158071Seric
86258071SericYou can define a ``smart host'' that understands a richer address syntax
86358071Sericusing:
86458071Seric
86558071Seric	define(`SMART_HOST', mailer:hostname)
86658071Seric
86764028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
86858071Sericcan't be handled using the usual UUCP rules are passed to this host.
86958071Seric
87058071SericIf you are on a local SMTP-based net that connects to the outside
87158071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
87258071SericFor example:
87358071Seric
87458071Seric	define(`SMART_HOST', suucp:uunet)
87558071Seric	LOCAL_NET_CONFIG
87663761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
87758071Seric
87858071SericThis will cause all names that end in your domain name ($m) via
87958071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
88063761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
88163761Sericthe $m.  If you are running a local DNS inside your domain which is
88263761Sericnot otherwise connected to the outside world, you probably want to
88363761Sericuse:
88458071Seric
88563761Seric	define(`SMART_HOST', smtp:fire.wall.com)
88663761Seric	LOCAL_NET_CONFIG
88763761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
88858071Seric
88963761SericThat is, send directly only to things you found in your DNS lookup;
89063761Sericanything else goes through SMART_HOST.
89163761Seric
89264153SericIf you are not running DNS at all, it is important to use
89364153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
89464153Sericfor the name server to come up.
89563761Seric
89664153Seric
89764259Seric+-----------+
89864259Seric| WHO AM I? |
89964259Seric+-----------+
90064259Seric
90164259SericNormally, the $j macro is automatically defined to be your fully
90264259Sericqualified domain name (FQDN).  Sendmail does this by getting your
90364259Serichost name using gethostname and then calling gethostbyname on the
90464259Sericresult.  For example, in some environments gethostname returns
90564259Sericonly the root of the host name (such as "foo"); gethostbyname is
90664259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
90764259Sericcases, gethostbyname may fail to return the FQDN.  In this case
90864259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
90964259Sericname.  This is usually done using:
91064259Seric
91164259Seric	Dmbar.com
91264259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
91364259Seric
91464259Seric
91564028Seric+--------------------+
91664028Seric| USING MAILERTABLES |
91764028Seric+--------------------+
91864028Seric
91964028SericTo use FEATURE(mailertable), you will have to create an external
92064028Sericdatabase containing the routing information for various domains.
92164028SericFor example, a mailertable file in text format might be:
92264028Seric
92364028Seric	.my.domain		xnet:%1.my.domain
92464028Seric	uuhost1.my.domain	suucp:uuhost1
92564028Seric	.bitnet			smtp:relay.bit.net
92664028Seric
92764028SericThis should normally be stored in /etc/mailertable.  The actual
92864028Sericdatabase version of the mailertable is built using:
92964028Seric
93064028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
93164028Seric
93264028SericThe semantics are simple.  Any LHS entry that does not begin with
93364028Serica dot matches the full host name indicated.  LHS entries beginning
93464028Sericwith a dot match anything ending with that domain name -- that is,
93564028Sericthey can be thought of as having a leading "*" wildcard.  Matching
93664028Sericis done in order of most-to-least qualified -- for example, even
93764028Sericthough ".my.domain" is listed first in the above example, an entry
93864028Sericof "uuhost1.my.domain" will match the second entry since it is
93964028Sericmore explicit.
94064028Seric
94164028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
94264028Sericconfiguration name of a mailer (that is, an `M' line in the
94364028Sericsendmail.cf file).  The "host" will be the hostname passed to
94464028Sericthat mailer.  In domain-based matches (that is, those with leading
94564028Sericdots) the "%1" may be used to interpolate the wildcarded part of
94664028Sericthe host name.  For example, the first line above sends everything
94764028Sericaddressed to "anything.my.domain" to that same host name, but using
94864028Sericthe (presumably experimental) xnet mailer.
94964028Seric
95067915SericIn some cases you may want to temporarily turn off MX records,
95167915Sericparticularly on gateways.  For example, you may want to MX
95267915Sericeverything in a domain to one machine that then forwards it
95367915Sericdirectly.  To do this, you might use the DNS configuration:
95464028Seric
95567915Seric	*.domain.	IN	MX	0	relay.machine
95667915Seric
95767915Sericand on relay.machine use the mailertable:
95867915Seric
95967915Seric	.domain		smtp:[gateway.domain]
96067915Seric
96167915SericThe [square brackets] turn off MX records for this host only.
96267915SericIf you didn't do this, the mailertable would use the MX record
96367915Sericagain, which would give you an MX loop.
96467915Seric
96567915Seric
96664153Seric+--------------------------------+
96764153Seric| USING USERDB TO MAP FULL NAMES |
96864153Seric+--------------------------------+
96964153Seric
97064153SericThe user database was not originally intended for mapping full names
97164153Sericto login names (e.g., Eric.Allman => eric), but some people are using
97264153Sericit that way.  (I would recommend that you set up aliases for this
97364153Sericpurpose instead -- since you can specify multiple alias files, this
97464153Sericis fairly easy.)  The intent was to locate the default maildrop at
97564153Serica site, but allow you to override this by sending to a specific host.
97664153Seric
97764153SericIf you decide to set up the user database in this fashion, it is
97867917Sericimperative that you not use FEATURE(stickyhost) -- otherwise,
97964153Serice-mail sent to Full.Name@local.host.name will be rejected.
98064153Seric
98167917SericTo build the internal form of the user database, use:
98264153Seric
98364259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
98464259Seric
98569508SericAs a general rule, I am adamantly opposed to using full names as
98669508Serice-mail addresses, since they are not in any sense unique.  For example,
98769508Sericthe Unix software-development community has two Andy Tannenbaums,
98869508Sericat least two well-known Peter Deutsches, and at one time Bell Labs
98969508Serichad two Stephen R. Bournes with offices along the same hallway.
99069508SericWhich one will be forced to suffer the indignity of being
99169508SericStephen_R_Bourne_2?  The less famous of the two, or the one that
99269508Sericwas hired later?
99364259Seric
99469508SericFinger should handle full names (and be fuzzy).  Mail should use
99569508Serichandles, and not be fuzzy.  [Not that I expect anyone to pay any
99669508Sericattention to my opinions.]
99769508Seric
99869508Seric
99967539Seric+--------------------------------+
100067539Seric| MISCELLANEOUS SPECIAL FEATURES |
100167539Seric+--------------------------------+
100267539Seric
100369540SericPlussed users
100467539Seric	Sometimes it is convenient to merge configuration on a
100567539Seric	centralized mail machine, for example, to forward all
100667539Seric	root mail to a mail server.  In this case it might be
100767539Seric	useful to be able to treat the root addresses as a class
100867539Seric	of addresses with subtle differences.  You can do this
100969540Seric	using plussed users.  For example, a client might include
101067539Seric	the alias:
101167539Seric
101269540Seric		root:  root+client1@server
101367539Seric
101469540Seric	On the server, this will match an alias for "root+client1".
101569540Seric	If that is not found, the alias "root+*" will be tried,
101669540Seric	then "root".
101767539Seric
101867539Seric
101967960Seric+----------------+
102067960Seric| SECURITY NOTES |
102167960Seric+----------------+
102267960Seric
102367960SericA lot of sendmail security comes down to you.  Sendmail 8 is much
102467960Sericmore careful about checking for security problems than previous
102567960Sericversions, but there are some things that you still need to watch
102667960Sericfor.  In particular:
102767960Seric
102867960Seric* Make sure the aliases file isn't writable except by trusted
102967960Seric  system personnel.  This includes both the text and database
103067960Seric  version.
103167960Seric
103267960Seric* Make sure that other files that sendmail reads, such as the
103367960Seric  mailertable, is only writable by trusted system personnel.
103467960Seric
103567960Seric* The queue directory should not be world writable PARTICULARLY
103667960Seric  if your system allows "file giveaways" (that is, if a non-root
103767960Seric  user can chown any file they own to any other user).
103867960Seric
103967960Seric* If your system allows file giveaways, DO NOT create a publically
104067960Seric  writable directory for forward files.  This will allow anyone
104167960Seric  to steal anyone else's e-mail.  Instead, create a script that
104267960Seric  copies the .forward file from users' home directories once a
104367960Seric  night (if you want the non-NFS-mounted forward directory).
104467960Seric
104567960Seric* If your system allows file giveaways, you'll find that
104667960Seric  sendmail is much less trusting of :include: files -- in
104767960Seric  particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
104867960Seric  /etc/shells before they will be trusted (that is, before
104967960Seric  files and programs listed in them will be honored).
105067960Seric
105167960SericIn general, file giveaways are a mistake -- if you can turn them
105267960Sericoff I recommend you do so.
105367960Seric
105467960Seric
105558363Seric+------------------+
105658363Seric| FlexFAX SOFTWARE |
105758363Seric+------------------+
105858363Seric
105958363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
106058363Sericpublic version out "later this week" [as of 3/1/93].  The following
106158363Sericblurb is direct from Sam:
106258363Seric
106364498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
106458363Seric
106558363Seric	How To Obtain This Software (in case all you get is this file)
106664498Seric	--------------------------------------------------------------
106758363Seric	The source code is available for public ftp on
106864498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
106958363Seric		(192.48.153.1)
107058363Seric
107158363Seric	You can also obtain inst'able images for Silicon Graphics machines from
107264498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
107358363Seric		(192.48.153.1)
107458363Seric
107558363Seric	For example,
107658363Seric	    % ftp -n sgi.com
107758363Seric	    ....
107858363Seric	    ftp> user anonymous
107958363Seric	    ... <type in password>
108058363Seric	    ftp> cd sgi/fax
108158363Seric	    ftp> binary
108264498Seric	    ftp> get v2.1.src.tar.Z
108358363Seric
108464498Seric	In general, the latest version of the 2.1 release of the software is
108564498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
108664498Seric	directory.  This file is a link to the appropriate released version (so
108764498Seric	don't waste your time retrieving the linked file as well!) Any files of
108864498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
108964498Seric	versions of the source code.  For example, the file v2.1.0.patch would
109064498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
109164498Seric	different than the naming conventions used during beta testing.) Patch
109264498Seric	files only work to go between consecutive versions, so if you are
109364498Seric	multiple versions behind the latest release, you will need to apply
109464498Seric	each patch file between your current version and the latest.
109564498Seric
109664498Seric
109764498Seric	Obtaining the Software by Electronic Mail
109864498Seric	-----------------------------------------
109964498Seric	Do not send me requests for the software; they will be ignored (without
110064498Seric	response).  If you cannot use FTP at all, there is a service called
110164498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
110264498Seric	this machine and it will use FTP to retrieve files for you and send you
110364498Seric	the files back again via e-mail.  To find out more about the ftpmail
110458363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
110558363Seric	consists of the single line "help".
110658363Seric
110764498Seric
110864498Seric	Obtaining the Software Within Silicon Graphics
110964498Seric	----------------------------------------------
111058363Seric	Internal to Silicon Graphics there are inst'able images on the host
111164498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
111258363Seric
111364498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
111458363Seric
111564498Seric	to install the latest version of the software on your machine.
111658363Seric
111764498Seric
111864498Seric	What to do Once You've Retrieved Stuff
111964498Seric	--------------------------------------
112058363Seric	The external distributions come in a compressed or uncompressed tar
112158363Seric	file.  To extract the source distribution:
112258363Seric
112364498Seric	    % zcat v2.1.src.tar.Z | tar xf -
112458363Seric
112558363Seric	(uncompress and extract individual files in current directory).  To
112658363Seric	unpack and install the client portion of the inst'able distribution:
112758363Seric
112858363Seric	    % mkdir dist
112964498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
113058363Seric	    % inst -f dist/flexfax
113158363Seric	    ...
113258363Seric	    inst> go
113358363Seric
113458363Seric	(Note, the dist subdirectory is because some versions of inst fail if
113564498Seric	the files are in the current directory.) Server binaries are also
113664498Seric	included in the inst'able images as flexfax.server.*.  They are not
113764498Seric	installed by default, so to get them also you need to do:
113858363Seric
113958363Seric	    % inst -f flexfax
114058363Seric	    ...
114158363Seric	    inst> install flexfax.server.*
114258363Seric	    inst> go
114358363Seric
114464498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
114558363Seric	system.  They should work w/o problem on earlier versions of the
114658363Seric	system, but I have not fully tested this.  Also, note that to install a
114758363Seric	server on an SGI machine, you need to have installed the Display
114858363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
114958363Seric	server will not be able to convert PostScript to facsimile for
115058363Seric	transmission.
115158363Seric
115264498Seric	If you are working from the source distribution, look at the file
115364498Seric	README in the top of the source tree.  If you are working from the inst
115464498Seric	images, the subsystem flexfax.man.readme contains the README file and
115564498Seric	other useful pieces of information--the installed files are placed in
115664498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
115764498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
115864498Seric	the README file and the manual page for faxaddmodem for information.
115958363Seric
116058363Seric
116164498Seric	FlexFAX Mail List
116264498Seric	-----------------
116358363Seric	A mailing list for users of this software is located on sgi.com.
116458363Seric	If you want to join this mailing list or have a list-related request
116558363Seric	such as getting your name removed from it, send a request to
116658363Seric
116764498Seric	    majordomo@whizzer.wpd.sgi.com
116858363Seric
116964498Seric	For example, to subscribe, send the line "subscribe flexfax" in
117064498Seric	the body of your message.  The line "help" will return a list of
117164498Seric	the commands understood by the mailing list management software.
117264498Seric
117358363Seric	Submissions (including bug reports) should be directed to:
117458363Seric
117558363Seric	    flexfax@sgi.com
117658363Seric
117764498Seric	When corresponding about this software please always specify what
117864498Seric	version you have, what system you're running on, and, if the problem is
117964498Seric	specific to your modem, identify the modem and firmware revision.
118058363Seric
118164498Seric
118257945Seric+--------------------------------+
118357945Seric| TWEAKING CONFIGURATION OPTIONS |
118457945Seric+--------------------------------+
118557945Seric
118657945SericThere are a large number of configuration options that don't normally
118757945Sericneed to be changed.  However, if you feel you need to tweak them, you
118857945Sericcan define the following M4 variables.  This list is shown in four
118957945Sericcolumns:  the name you define, the default value for that definition,
119057945Sericthe option or macro that is affected (either Ox for an option or Dx
119157945Sericfor a macro), and a brief description.  Greater detail of the semantics
119257945Sericcan be found in the Installation and Operations Guide.
119357945Seric
119463582SericSome options are likely to be deprecated in future versions -- that is,
119563582Sericthe option is only included to provide back-compatibility.  These are
119663582Sericmarked with "*".
119763582Seric
119865002SericRemember that these options are M4 variables, and hence may need to
119965002Sericbe quoted.  In particular, arguments with commas will usually have to
120065002Sericbe ``double quoted, like this phrase'' to avoid having the comma
120165002Sericconfuse things.  This is common for alias file definitions and for
120265002Sericthe read timeout.
120365002Seric
120468694SericM4 Variable Name	Configuration	Description & [Default]
120568694Seric================	=============	=======================
120668694SericconfMAILER_NAME		$n macro	[MAILER-DAEMON] The sender name used
120768694Seric					for internally generated outgoing
120868694Seric					messages.
120968694SericconfFROM_LINE		$l macro	[From $g  $d] The From_ line used
121068694Seric					when sending to files or programs.
121168694SericconfFROM_HEADER		$q macro	[$?x$x <$g>$|$g$.] The format of an
121268694Seric					internally generated From: address.
121368694SericconfOPERATORS		$o macro	[.:%@!^/[]+] Address operator
121468694Seric					characters.
121568767SericconfSMTP_LOGIN_MSG	$e macro	[$j Sendmail $v/$Z; $b]
121668694Seric					The initial (spontaneous) SMTP
121768767Seric					greeting message.  The word "ESMTP"
121868767Seric					will be inserted between the first and
121968767Seric					second words to convince other
122068767Seric					sendmails to try to speak ESMTP.
122168694SericconfDOMAIN_NAME		$j macro	If defined, sets $j.  This should
122268694Seric					only be done if your system cannot
122368694Seric					determine your local domain name,
122468694Seric					and then it should be set to
122568694Seric					$w.Foo.COM, where Foo.COM is your
122668694Seric					domain name.
122769842SericconfCF_VERSION		$Z macro	If defined, this is appended to the
122869842Seric					configuration version name.
122968694SericconfRECEIVED_HEADER	Received:
123068694Seric      [.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b]
123168694Seric					The format of the Received: header
123268694Seric					in messages passed through this host.
123368694Seric					It is unwise to try to change this.
123468694SericconfCW_FILE		Fw class	[/etc/sendmail.cw] Name of file used
123568694Seric					to get the local additions to the $=w
123668694Seric					class.
123768694SericconfSMTP_MAILER		-		[smtp] The mailer name used when
123868694Seric					SMTP connectivity is required.
123968694Seric					One of "smtp", "smtp8", or "esmtp".
124068694SericconfLOCAL_MAILER	-		[local] The mailer name used when
124168694Seric					local connectivity is required.
124268694Seric					Almost always "local".
124368694SericconfRELAY_MAILER	-		[relay] The default mailer name used
124468694Seric					for relaying any mail (e.g., to a
124568694Seric					BITNET_RELAY, a SMART_HOST, or
124668694Seric					whatever).  This can reasonably be
124768694Seric					"uucp-new" if you are on a
124868694Seric					UUCP-connected site.
124968694SericconfSEVEN_BIT_INPUT	SevenBitInput	[False] Force input to seven bits?
125068694SericconfEIGHT_BIT_HANDLING	EightBitMode	[pass8] 8-bit data handling
125168694SericconfALIAS_WAIT		AliasWait	[10m] Time to wait for alias file
125268694Seric					rebuild until you get bored and
125368694Seric					decide that the apparently pending
125468694Seric					rebuild failed.
125568694SericconfMIN_FREE_BLOCKS	MinFreeBlocks	[100] Minimum number of free blocks on
125668694Seric					queue filesystem to accept SMTP mail.
125768749Seric					(Prior to 8.7 this was minfree/maxsize,
125868749Seric					where minfree was the number of free
125968749Seric					blocks and maxsize was the maximum
126068749Seric					message size.  Use confMAX_MESSAGE_SIZE
126168749Seric					for the second value now.)
126268749SericconfMAX_MESSAGE_SIZE	MaxMessageSize	The maximum size of messages that will
126368749Seric					be accepted (in bytes).
126468694SericconfBLANK_SUB		BlankSub	[.] Blank (space) substitution
126568694Seric					character.
126668694SericconfCON_EXPENSIVE	HoldExpensive	[False] Avoid connecting immediately
126768694Seric					to mailers marked expensive?
126868694SericconfCHECKPOINT_INTERVAL	CheckpointInterval
126968694Seric					Checkpoint queue files every N
127068694Seric					recipients.
127168694SericconfDELIVERY_MODE	DeliveryMode	[background] Default delivery mode.
127268694SericconfAUTO_REBUILD	AutoRebuildAliases
127368694Seric					Automatically rebuild alias
127468694Seric					file if needed.
127568694SericconfERROR_MODE		ErrorMode	Error message mode.
127668694SericconfERROR_MESSAGE	ErrorHeader	Error message header/file.
127768694SericconfSAVE_FROM_LINES	SafeFromLine	Save extra leading From_ lines.
127868694SericconfTEMP_FILE_MODE	TempFileMode	[0600] Temporary file mode.
127968694SericconfMATCH_GECOS		MatchGECOS	Match GECOS field.
128068694SericconfMAX_HOP		MaxHopCount	Maximum hop count.
128168694SericconfIGNORE_DOTS*	IgnoreDots	Ignore dot as terminator for incoming
128268694Seric					messages?
128368694SericconfBIND_OPTS		ResolverOptions	Default options for DNS resolver.
128468694SericconfMIME_FORMAT_ERRORS*	SendMimeErrors	[True] Send error messages as MIME-
128568694Seric					encapsulated messages per RFC 1344.
128668694SericconfFORWARD_PATH	ForwardPath	[$z/.forward.$w:$z/.forward]
128768694Seric					The colon-separated list of places to
128868694Seric					search for .forward files.  N.B.: see
128968694Seric					the Security Notes section.
129068694SericconfMCI_CACHE_SIZE	ConnectionCacheSize
129168694Seric					[2] Size of open connection cache.
129268694SericconfMCI_CACHE_TIMEOUT	ConnectionCacheTimeout
129368694Seric					[5m] Open connection cache timeout.
129468694SericconfUSE_ERRORS_TO*	UserErrorsTo	[False] Use the Errors-To: header to deliver
129568694Seric					error messages.  This should not be
129668694Seric					necessary because of general acceptance
129768694Seric					of the envelope/header distinction.
129868694SericconfLOG_LEVEL		LogLevel	[9] Log level.
129968694SericconfME_TOO		MeToo		Include sender in group expansions.
130069657SericconfCHECK_ALIASES	CheckAliases	[False] Check RHS of aliases when
130169657Seric					running newaliases.  Since this does
130269657Seric					DNS lookups on every address, it can
130369657Seric					slow down the alias rebuild process
130469657Seric					considerably on large alias files.
130568694SericconfOLD_STYLE_HEADERS*	OldStyleHeaders	[True] Assume that headers without
130668694Seric					special chars are old style.
130768694SericconfDAEMON_OPTIONS	DaemonPortOptions
130868694Seric					SMTP daemon options.
130968694SericconfPRIVACY_FLAGS	PrivacyOptions	[authwarnings] Privacy flags.
131068694SericconfCOPY_ERRORS_TO	PostmasterCopy	Address for additional copies of all
131168694Seric					error messages.
131268694SericconfQUEUE_FACTOR	QueueFactor	Slope of queue-only function.
131368694SericconfDONT_PRUNE_ROUTES	DontPruneRoutes	Don't prune down route-addr syntax
131468694Seric					addresses to the minimum possible.
131568694SericconfSAFE_QUEUE*		SuperSafe	[True] Commit all messages to disk
131668694Seric					before forking.
131768694SericconfTIME_ZONE		TimeZoneSpec	[USE_SYSTEM] Time zone info -- can be
131868694Seric					USE_SYSTEM to use the system's idea,
131968694Seric					USE_TZ to use the user's TZ envariable,
132068694Seric					or something else to force that value.
132168694SericconfDEF_USER_ID		DefaultUser	[1:1] Default user id.
132268694SericconfUSERDB_SPEC		UserDatabaseSpec
132368694Seric					User database specification.
132468694SericconfFALLBACK_MX		FallbackMXhost	Fallback MX host.
132568694SericconfTRY_NULL_MX_LIST	TryNullMXList	If we are the best MX for a host and
132668694Seric					haven't made other arrangements, try
132768694Seric					connecting to the host directly;
132868694Seric					normally this would be a config error.
132968694SericconfQUEUE_LA		QueueLA		Load average at which queue-only
133068694Seric					function kicks in.
133168694SericconfREFUSE_LA		RefuseLA	Load average at which incoming
133268694Seric					SMTP connections are refused.
133363582SericconfWORK_RECIPIENT_FACTOR
133468694Seric			RecipientFactor	Cost of each recipient.
133568694SericconfSEPARATE_PROC	ForkEachJob	Run all deliveries in a separate
133668694Seric					process.
133768694SericconfWORK_CLASS_FACTOR	ClassFactor	Priority multiplier for class.
133868694SericconfWORK_TIME_FACTOR	RetryFactor	Cost of each delivery attempt.
133968694SericconfQUEUE_SORT_ORDER	QueueSortOrder	Queue sort algorithm: Priority or Host.
134068694SericconfMIN_QUEUE_AGE	MinQueueAge	The minimum amount of time a job
134168694Seric					must sit in the queue between queue
134268694Seric					runs.  This allows you to set the
134368694Seric					queue run interval low for better
134468694Seric					resposiveness without trying all
134568694Seric					jobs in each run.
134668694SericconfDEF_CHAR_SET	DefaultCharSet	When converting unlabelled 8 bit
134768694Seric					input to MIME, the character set to
134868694Seric					use by default.
134968694SericconfSERVICE_SWITCH_FILE	ServiceSwitchFile
135068694Seric					The file to use for the service switch
135168694Seric					on systems that do not have a system-
135268694Seric					defined switch.
135368694SericconfDIAL_DELAY		DialDelay	If a connection fails, wait this long
135468694Seric					and try again.  This is to allow
135568694Seric					"dial on demand" connections to have
135668694Seric					enough time to complete a connection.
135768694SericconfNO_RCPT_ACTION	NoRecipientAction
135868694Seric					What to do if there are no legal
135968694Seric					recipient fields (To:, Cc: or Bcc:)
136068694Seric					in the message.  Legal values can
136168694Seric					be "none" to just leave the
136268694Seric					nonconforming message as is, "add-to"
136368694Seric					to add a To: header with all the
136468694Seric					known recipients (which may expose
136568694Seric					blind recipients), "add-apparently-to"
136668694Seric					to do the same but use Apparently-To:
136768694Seric					instead of To:, "add-bcc" to add an
136868694Seric					empty Bcc: header, or
136968694Seric					"add-to-undisclosed" to add the header
137068694Seric					``To: undisclosed-recipients:;''.
137168694Seric					Default is "none".
137268694SericconfSAFE_FILE_ENV	SafeFileEnvironment
137368694Seric					If set, sendmail will do a chroot()
137468694Seric					into this directory before writing
137568694Seric					files.
137668807SericconfCOLON_OK_IN_ADDR	ColonOkInAddr	If set, colons are treated as a regular
137768807Seric					character in addresses.  If not set,
137868807Seric					they are treated as the introducer to
137968807Seric					the RFC 822 "group" syntax.  Colons are
138068807Seric					handled properly in route-addrs.  This
138168807Seric					option defaults on for V5 and lower
138268807Seric					configuration files.
138369735SericconfMAX_QUEUE_RUN_SIZE	MaxQueueRunSize	If set, limit the maximum size of any
138469735Seric					given queue run to this number of
138569735Seric					entries.  Essentially, this will stop
138669735Seric					reading the queue directory after this
138769735Seric					number of entries are reached; it does
138869735Seric					_not_ pick the highest priority jobs,
138969735Seric					so this should be as large as your
139069735Seric					system can tolerate.  If not set, there
139169735Seric					is no limit.
139269854SericconfDONT_EXPAND_CNAMES	DontExpandCnames
139369854Seric					If set, $[ ... $] lookups that do DNS
139469854Seric					based lookups do not expand CNAME
139569854Seric					records.  This currently violates the
139669854Seric					published standards, but the IETF
139769854Seric					seems to be moving toward legalizing
139869854Seric					this.  For example, if "FTP.Foo.ORG"
139969854Seric					is a CNAME for "Cruft.Foo.ORG", then
140069854Seric					with this option set a lookup of
140169854Seric					"FTP" will return "FTP.Foo.ORG"; if
140269854Seric					clear it returns "Cruft.FOO.ORG".  N.B.
140369854Seric					you may not see any effect until your
140469854Seric					downstream neighbors stop doing CNAME
140569854Seric					lookups as well.
140657945Seric
140758087Seric
140857246Seric+-----------+
140957246Seric| HIERARCHY |
141057246Seric+-----------+
141157246Seric
141251220SericWithin this directory are several subdirectories, to wit:
141351220Seric
141451220Sericm4		General support routines.  These are typically
141551220Seric		very important and should not be changed without
141657247Seric		very careful consideration.
141751220Seric
141851220Sericcf		The configuration files themselves.  They have
141951220Seric		".mc" suffixes, and must be run through m4 to
142051220Seric		become complete.  The resulting output should
142151220Seric		have a ".cf" suffix.
142251220Seric
142351220Sericostype		Definitions describing a particular operating
142451220Seric		system type.  These should always be referenced
142551220Seric		using the OSTYPE macro in the .mc file.  Examples
142651220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
142751220Seric		"sunos4.1".
142851220Seric
142951220Sericdomain		Definitions describing a particular domain, referenced
143051220Seric		using the DOMAIN macro in the .mc file.  These are
143168845Seric		site dependent; for example, "CS.Berkeley.EDU.m4"
143268845Seric		describes hosts in the CS.Berkeley.EDU subdomain.
143351220Seric
143451220Sericmailer		Descriptions of mailers.   These are referenced using
143551220Seric		the MAILER macro in the .mc file.
143651220Seric
143751220Sericsh		Shell files used when building the .cf file from the
143851220Seric		.mc file in the cf subdirectory.
143951220Seric
144051220Sericfeature		These hold special orthogonal features that you might
144151220Seric		want to include.  They should be referenced using
144251220Seric		the FEATURE macro.
144351220Seric
144451220Serichack		Local hacks.  These can be referenced using the HACK
144551220Seric		macro.  They shouldn't be of more than voyeuristic
144651220Seric		interest outside the .Berkeley.EDU domain, but who knows?
144765957Seric		We've all got our own peccadillos.
144851220Seric
144951268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
145051268Seric		UUCP sites.
145151220Seric
145251268Seric
145357246Seric+------------------------+
145457246Seric| ADMINISTRATIVE DETAILS |
145557246Seric+------------------------+
145651220Seric
145751220SericThe following sections detail usage of certain internal parts of the
145851220Sericsendmail.cf file.  Read them carefully if you are trying to modify
145951220Sericthe current model.  If you find the above descriptions adequate, these
146051220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
146151220Seric
146251220SericRULESETS (* means built in to sendmail)
146351220Seric
146451220Seric   0 *	Parsing
146551220Seric   1 *	Sender rewriting
146651220Seric   2 *	Recipient rewriting
146751220Seric   3 *	Canonicalization
146851220Seric   4 *	Post cleanup
146954839Seric   5 *	Local address rewrite (after aliasing)
147060539Seric  1x	mailer rules (sender qualification)
147160539Seric  2x	mailer rules (recipient qualification)
147264801Seric  3x	mailer rules (sender header qualification)
147364801Seric  4x	mailer rules (recipient header qualification)
147464801Seric  5x	mailer subroutines (general)
147564801Seric  6x	mailer subroutines (general)
147664801Seric  7x	mailer subroutines (general)
147764801Seric  8x	reserved
147860539Seric  90	Mailertable host stripping
147960892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
148060892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
148163857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
148269728Seric  99	Guaranteed null (for debugging)
148351220Seric
148451220Seric
148551220SericMAILERS
148651220Seric
148751220Seric   0	local, prog	local and program mailers
148865218Seric   1	[e]smtp, relay	SMTP channel
148965218Seric   2	uucp-*		UNIX-to-UNIX Copy Program
149058087Seric   3	netnews		Network News delivery
149158363Seric   4	fax		Sam Leffler's FlexFAX software
149269628Seric   5	mail11		DECnet mailer
149351220Seric
149451220Seric
149551220SericMACROS
149651220Seric
149751220Seric   A
149851220Seric   B	Bitnet Relay
149969624Seric   C	DECnet Relay
150054839Seric   D	The local domain -- usually not needed
150151220Seric   E
150258363Seric   F	FAX Relay
150351220Seric   G
150457591Seric   H	mail Hub (for mail clusters)
150551220Seric   I
150651220Seric   J
150751220Seric   K
150867915Seric   L	Luser Relay
150951220Seric   M	Masquerade (who I claim to be)
151051220Seric   N
151151220Seric   O
151251220Seric   P
151351220Seric   Q
151451220Seric   R	Relay (for unqualified names)
151558071Seric   S	Smart Host
151651220Seric   T
151751309Seric   U	my UUCP name (if I have a UUCP connection)
151851309Seric   V	UUCP Relay (class V hosts)
151951220Seric   W	UUCP Relay (class W hosts)
152051220Seric   X	UUCP Relay (class X hosts)
152151309Seric   Y	UUCP Relay (all other hosts)
152251220Seric   Z	Version number
152351220Seric
152451220Seric
152551220SericCLASSES
152651220Seric
152751220Seric   A
152851220Seric   B
152951220Seric   C
153069540Seric   D
153157246Seric   E	addresses that should not seem to come from $M
153254839Seric   F	hosts we forward for
153351220Seric   G
153451220Seric   H
153551220Seric   I
153651220Seric   J
153751220Seric   K
153851220Seric   L	addresses that should not be forwarded to $R
153951220Seric   M
154051220Seric   N
154151220Seric   O	operators that indicate network operations (cannot be in local names)
154269624Seric   P	top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc.
154351220Seric   Q
154451220Seric   R
154551220Seric   S
154651220Seric   T
154751220Seric   U	locally connected UUCP hosts
154851309Seric   V	UUCP hosts connected to relay $V
154951309Seric   W	UUCP hosts connected to relay $W
155051309Seric   X	UUCP hosts connected to relay $X
155151309Seric   Y	locally connected smart UUCP hosts
155264153Seric   Z	locally connected domain-ized UUCP hosts
155354839Seric   .	the class containing only a dot
155451220Seric
155551220Seric
155651220SericM4 DIVERSIONS
155751220Seric
155858071Seric   1	Local host detection and resolution
155958071Seric   2	Local Ruleset 3 additions
156058071Seric   3	Local Ruleset 0 additions
156151268Seric   4	UUCP Ruleset 0 additions
156251309Seric   5	locally interpreted names (overrides $R)
156354839Seric   6	local configuration (at top of file)
156451220Seric   7	mailer definitions
156566099Seric   8
156658681Seric   9	special local rulesets (1 and 2)
1567