xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 69624)
151220Seric
251220Seric
357246Seric		NEW SENDMAIL CONFIGURATION FILES
451220Seric
557246Seric		Eric Allman <eric@CS.Berkeley.EDU>
651220Seric
7*69624Seric		@(#)README	8.58 (Berkeley) 05/23/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.
25557246Seric
25657246Seric+---------+
25757246Seric| DOMAINS |
25857246Seric+---------+
25957246Seric
26057246SericYou will probably want to collect domain-dependent defines into one
26157246Sericfile, referenced by the DOMAIN macro.  For example, our Berkeley
26257246Sericdomain file includes definitions for several internal distinguished
26357246Serichosts:
26457246Seric
265*69624SericUUCP_RELAY	The host that will accept UUCP-addressed email.
26657246Seric		If not defined, all UUCP sites must be directly
26764028Seric		connected.
268*69624SericBITNET_RELAY	The host that will accept BITNET-addressed email.
26957246Seric		If not defined, the .BITNET pseudo-domain won't work.
270*69624SericDECNET_RELAY	The host that will accept DECNET-addressed email.
271*69624Seric		If not defined, the .DECNET pseudo-domain and addresses
272*69624Seric		of the form node::user will not work.
273*69624SericFAX_RELAY	The host that will accept mail to the .FAX pseudo-domain.
274*69624Seric		The "fax" mailer overrides this value.
27568697SericLOCAL_RELAY	DEPRECATED.  The site that will handle unqualified
27668697Seric		names -- that is, names with out an @domain extension.
27768697Seric		If not set, they are assumed to belong on this machine.
27868697Seric		This allows you to have a central site to store a
27957246Seric		company- or department-wide alias database.  This
28068697Seric		only works at small sites, and only with some user
28168697Seric		agents.
28267915SericLUSER_RELAY	The site that will handle lusers -- that is, apparently
28367915Seric		local names that aren't local accounts or aliases.
28457246Seric
28567915SericAny of these can be either ``mailer:hostname'' (in which case the
28668694Sericmailer is the internal mailer name, such as ``uucp-new'' and the hostname
28764028Sericis the name of the host as appropriate for that mailer) or just a
28864028Seric``hostname'', in which case a default mailer type (usually ``relay'',
28964153Serica variant on SMTP) is used.  WARNING: if you have a wildcard MX
29064153Sericrecord matching your domain, you probably want to define these to
29164153Serichave a trailing dot so that you won't get the mail diverted back
29264153Sericto yourself.
29364028Seric
29457246SericThe domain file can also be used to define a domain name, if needed
29557982Seric(using "DD<domain>") and set certain site-wide features.  If all hosts
29657982Sericat your site masquerade behind one email name, you could also use
29757982SericMASQUERADE_AS here.
29857246Seric
29958408SericYou do not have to define a domain -- in particular, if you are a
30058408Sericsingle machine sitting off somewhere, it is probably more work than
30158408Sericit's worth.  This is just a mechanism for combining "domain dependent
30258408Sericknowledge" into one place.
30358408Seric
30457246Seric+---------+
30557246Seric| MAILERS |
30657246Seric+---------+
30757246Seric
30851220SericThere are fewer mailers supported in this version than the previous
30951220Sericversion, owing mostly to a simpler world.
31051220Seric
31151220Sericlocal		The local and prog mailers.  You will almost always
31251220Seric		need these; the only exception is if you relay ALL
31357247Seric		your mail to another site.  This mailer is included
31457247Seric		automatically.
31551220Seric
31651220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
31751220Seric		not hide hosts behind a gateway or another other
31851220Seric		such hack; it assumes a world where everyone is
31963761Seric		running the name server.  This file actually defines
32067915Seric		four mailers: "smtp" for regular (old-style) SMTP to
32163761Seric		other servers, "esmtp" for extended SMTP to other
32267915Seric		servers, "smtp8" to do SMTP to other servers without
32367915Seric		converting 8-bit data to MIME (essentially, this is
32467915Seric		your statement that you know the other end is 8-bit
32567915Seric		clean even if it doesn't say so), and "relay" for
32667915Seric		transmission to our RELAY_HOST, LUSER_RELAY, or
32767915Seric		MAILER_HUB.
32851220Seric
32951220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
33067471Seric		defines two mailers, "uucp-old" (a.k.a. "uucp") and
33167471Seric		"uucp-new" (a.k.a. "suucp").  The latter is for when you
33267471Seric		know that the UUCP mailer at the other end can handle
33367471Seric		multiple recipients in one transfer.  If the smtp mailer
33467471Seric		is also included in your configuration, two other mailers
33568694Seric		("uucp-dom" and "uucp-uudom") are also defined [warning:
33668694Seric		you MUST specify MAILER(smtp) before MAILER(uucp)].  When you
33767471Seric		include the uucp mailer, sendmail looks for all names in
33865218Seric		the $=U class and sends them to the uucp-old mailer; all
33965218Seric		names in the $=Y class are sent to uucp-new; and all
34065218Seric		names in the $=Z class are sent to uucp-uudom.  Note that
34157246Seric		this is a function of what version of rmail runs on
34257246Seric		the receiving end, and hence may be out of your control.
34365218Seric		See the section below describing UUCP mailers in more
34465218Seric		detail.
34551220Seric
34658087Sericusenet		Usenet (network news) delivery.  If this is specified,
34758087Seric		an extra rule is added to ruleset 0 that forwards all
34858087Seric		local email for users named ``group.usenet'' to the
34958087Seric		``inews'' program.  Note that this works for all groups,
35058087Seric		and may be considered a security problem.
35158087Seric
35258363Sericfax		Facsimile transmission.  This is experimental and based
35358363Seric		on Sam Leffler's FlexFAX software.  For more information,
35458363Seric		see below.
35558087Seric
35665148Sericpop		Post Office Protocol.
35758363Seric
35867942Sericprocmail	An interface to procmail (does not come with sendmail).
35967942Seric		This is designed to be used in mailertables.  For example,
36067942Seric		a common question is "how do I forward all mail for a given
36167942Seric		domain to a single person?".  If you have this mailer
36267942Seric		defined, you could set up a mailertable reading:
36367942Seric
36467942Seric			host.com	procmail:/etc/procmailrcs/host.com
36567942Seric
36667942Seric		with the file /etc/procmailrcs/host.com reading:
36767942Seric
36867942Seric			:0	# forward mail for host.com
36967942Seric			! -oi -f $1 person@other.host
37067942Seric
37167942Seric		This would arrange for (anything)@host.com to be sent
37267942Seric		to person@other.host.  Within the procmail script, $1 is
37367942Seric		the name of the sender and $2 is the name of the recipient.
37467942Seric		If you use this with FEATURE(local_procmail), the FEATURE
37567942Seric		should be listed first.
37667942Seric
37767929SericThe local mailer accepts addresses of the form "user+detail", where
37867929Sericthe "+detail" is not used for mailbox matching but is available
37967942Sericto certain local mail programs (in particular, see FEATURE(local_procmail)).
38067929SericFor example, "eric", "eric+sendmail", and "eric+sww" all indicate
38167929Sericthe same user, but additional arguments <null>, "sendmail", and "sww"
38267929Sericmay be provided for use in sorting mail.
38365148Seric
38467929Seric
38557246Seric+----------+
38657246Seric| FEATURES |
38757246Seric+----------+
38851268Seric
38957246SericSpecial features can be requested using the "FEATURE" macro.  For
39057246Sericexample, the .mc line:
39157246Seric
39257246Seric	FEATURE(use_cw_file)
39357246Seric
39457246Serictells sendmail that you want to have it read an /etc/sendmail.cw
39558782Sericfile to get values for class $=w.  The FEATURE may contain a single
39658782Sericoptional parameter -- for example:
39757246Seric
39858782Seric	FEATURE(mailertable, dbm /usr/lib/mailertable)
39958782Seric
40058782SericAvailable features are:
40158782Seric
40257246Sericuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
40357246Seric		names for this host.  This might be used if you were
40457246Seric		on a host that MXed for a dynamic set of other
40557246Seric		hosts.  If the set is static, just including the line
40657246Seric		"Cw<name1> <name2> ..." is probably superior.
40758408Seric		The actual filename can be overridden by redefining
40858408Seric		confCW_FILE.
40964324Seric
41058087Sericredirect	Reject all mail addressed to "address.REDIRECT" with
41158087Seric		a ``551 User not local; please try <address>'' message.
41258087Seric		If this is set, you can alias people who have left
41358087Seric		to their new address with ".REDIRECT" appended.
41464324Seric
41558284Sericnouucp		Don't do anything special with UUCP addresses at all.
41664324Seric
41759080Sericnocanonify	Don't pass addresses to $[ ... $] for canonification.
41859080Seric		This would generally only be used by sites that only
41959080Seric		act as mail gateways or which have user agents that do
42064028Seric		full canonification themselves.  You may also want to
42164028Seric		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
42264028Seric		turn off the usual resolver options that do a similar
42364028Seric		thing.
42464324Seric
42567917Sericstickyhost	If set, email sent to "user@local.host" are marked
42658526Seric		as "sticky" -- that is, the local addresses aren't
42758526Seric		matched against UDB and don't go through ruleset 5.
42867915Seric		This is used if you want a set up where "user" is
42967915Seric		not necessarily the same as "user@local.host", e.g.,
43067915Seric		to make a distinct domain-wide namespace.  Prior to
43167915Seric		8.7 this was the default, and notsticky was used to
43267915Seric		turn this off.
43364324Seric
43458782Sericmailertable	Include a "mailer table" which can be used to override
43558782Seric		routing for particular domains.  The argument of the
43658782Seric		FEATURE may be the key definition.  If none is specified,
43758782Seric		the definition used is:
43864164Seric			hash -o /etc/mailertable
43963761Seric		Keys in this database are fully qualified domain names
44063761Seric		or partial domains preceded by a dot -- for example,
44163761Seric		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
44263761Seric		Values must be of the form:
44358782Seric			mailer:domain
44463761Seric		where "mailer" is the internal mailer name, and "domain"
44563761Seric		is where to send the message.  These maps are not
44663761Seric		reflected into the message header.
44764324Seric
44863761Sericdomaintable	Include a "domain table" which can be used to provide
44967451Seric		domain name mapping.  Use of this should really be
45067451Seric		limited to your own domains.  It may be useful if you
45167451Seric		change names (e.g., your company changes names from
45267451Seric		oldname.com to newname.com).  The argument of the
45367451Seric		FEATURE may be the key definition.  If none is specified,
45467451Seric		the definition used is:
45564164Seric			hash -o /etc/domaintable
45667451Seric		The key in this table is the domain name; the value is
45767451Seric		the new (fully qualified) domain.  Anything in the
45863761Seric		domaintable is reflected into headers; that is, this
45963761Seric		is done in ruleset 3.
46064324Seric
46159034Sericbitdomain	Look up bitnet hosts in a table to try to turn them into
46259034Seric		internet addresses.  The table can be built using the
46364153Seric		bitdomain program contributed by John Gardiner Myers.
46459034Seric		The argument of the FEATURE may be the key definition; if
46559034Seric		none is specified, the definition used is:
46664164Seric			hash -o /etc/bitdomain.db
46759034Seric		Keys are the bitnet hostname; values are the corresponding
46859034Seric		internet hostname.
46964324Seric
47059037Sericuucpdomain	Similar feature for UUCP hosts.  The default map definition
47159037Seric		is:
47264164Seric			hash -o /etc/uudomain.db
47359037Seric		At the moment there is no automagic tool to build this
47459037Seric		database.
47564324Seric
47660263Sericalways_add_domain
47760263Seric		Include the local host domain even on locally delivered
47860263Seric		mail.  Normally it is not added unless it is already
47960263Seric		present.
48064324Seric
48163761Sericallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
48263761Seric		feature will cause recipient addresses to also masquerade
48363761Seric		as being from the masquerade host.  Normally they get
48463761Seric		the local hostname.  Although this may be right for
48563761Seric		ordinary users, it can break local aliases.  For example,
48663761Seric		if you send to "localalias", the originating sendmail will
48763761Seric		find that alias and send to all members, but send the
48863761Seric		message with "To: localalias@masqueradehost".  Since that
48963761Seric		alias likely does not exist, replies will fail.  Use this
49063761Seric		feature ONLY if you can guarantee that the ENTIRE
49163761Seric		namespace on your masquerade host supersets all the
49263761Seric		local entries.
49364324Seric
49464153Sericnodns		We aren't running DNS at our site (for example,
49564153Seric		we are UUCP-only connected).  It's hard to consider
49664153Seric		this a "feature", but hey, it had to go somewhere.
49757246Seric
49864324Sericnullclient	This is a special case -- it creates a stripped down
49964324Seric		configuration file containing nothing but support for
50064394Seric		forwarding all mail to a central hub via a local
50164394Seric		SMTP-based network.  The argument is the name of that
50264394Seric		hub.
50364394Seric
50464394Seric		The only other feature that should be used in conjunction
50564394Seric		with this one is "nocanonify" (this causes addresses to
50664394Seric		be sent unqualified via the SMTP connection; normally
50764394Seric		they are qualifed with the masquerade name, which
50864394Seric		defaults to the name of the hub machine).  No mailers
50964394Seric		should be defined.  No aliasing or forwarding is done.
51057246Seric
51167942Sericlocal_procmail	Use procmail as the local mailer.  This mailer can
51267929Seric		make use of the "user+indicator@local.host" syntax;
51367929Seric		normally the +indicator is just tossed, but by default
51467929Seric		it is passed as the -a argument to procmail.  The
51567929Seric		argument to this feature is the pathname of procmail,
51667929Seric		which defaults to /usr/local/bin/procmail.
51764324Seric
51868206Sericbestmx_is_local	Accept mail as though locally addressed for any host that
51968206Seric		lists us as the best possible MX record.  This generates
52068206Seric		additional DNS traffic, but should be OK for low to
52168206Seric		medium traffic hosts.
52267929Seric
52368216Sericsmrsh		Use the SendMail Restricted SHell (smrsh) provided
52468216Seric		with the distribution instead of /bin/sh for mailing
52568216Seric		to programs.  This improves the ability of the local
52668216Seric		system administrator to control what gets run via
52768216Seric		e-mail.  If an argument is provided it is used as the
52868216Seric		pathname to smrsh; otherwise, /usr/local/etc/smrsh is
52968216Seric		assumed.
53068206Seric
53168216Seric
53257246Seric+-------+
53357246Seric| HACKS |
53457246Seric+-------+
53557246Seric
53657246SericSome things just can't be called features.  To make this clear,
53757247Sericthey go in the hack subdirectory and are referenced using the HACK
53857246Sericmacro.  These will tend to be site-dependent.  The release
53957246Sericincludes the Berkeley-dependent "cssubdomain" hack (that makes
54057246Sericsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
54157246Sericthis is intended as a short-term aid while we move hosts into
54257246Sericsubdomains.
54357246Seric
54458087Seric
54557246Seric+--------------------+
54657246Seric| SITE CONFIGURATION |
54757246Seric+--------------------+
54857246Seric
54968057Seric    *****************************************************
55068057Seric    * This section is really obsolete, and is preserved	*
55168057Seric    * only for back compatibility.  You should plan on	*
55268057Seric    * using mailertables for new installations.	  In	*
55368057Seric    * particular, it doesn't work for the newer forms	*
55468057Seric    * of UUCP mailers, such as uucp-uudom.		*
55568057Seric    *****************************************************
55668057Seric
55757246SericComplex sites will need more local configuration information, such as
55857246Sericlists of UUCP hosts they speak with directly.  This can get a bit more
55957246Serictricky.  For an example of a "complex" site, see cf/ucbvax.mc.
56057246Seric
56166336SericIf your host is known by several different names, you need to augment
56266336Sericthe $=w class.  This is a list of names by which you are known, and
56366336Sericanything sent to an address using a host name in this list will be
56466336Serictreated as local mail.  You can do this in two ways: either create
56566336Sericthe file /etc/sendmail.cw containing a list of your aliases (one per
56666336Sericline), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
56766336Sericline:
56866336Seric
56966336Seric	Cw alias.host.name
57066336Seric
57166336Sericat the end of that file.  See the ``vangogh.mc'' file for an example.
57266336SericBe sure you use the fully-qualified name of the host, rather than a
57366336Sericshort name.
57466336Seric
57557246SericThe SITECONFIG macro allows you to indirectly reference site-dependent
57657246Sericconfiguration information stored in the siteconfig subdirectory.  For
57757246Sericexample, the line
57857246Seric
57957246Seric	SITECONFIG(uucp.ucbvax, ucbvax, U)
58057246Seric
58157246Sericreads the file uucp.ucbvax for local connection information.  The
58257246Sericsecond parameter is the local name (in this case just "ucbvax" since
58366336Sericit is locally connected, and hence a UUCP hostname).  The third
58466336Sericparameter is the name of both a macro to store the local name (in
58566336Sericthis case, $U) and the name of the class (e.g., $=U) in which to store
58666336Sericthe host information read from the file.  Another SITECONFIG line reads
58757246Seric
58857246Seric	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
58957246Seric
59057246SericThis says that the file uucp.ucbarpa contains the list of UUCP sites
59157246Sericconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
59266336Sericstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
59366336Sericis, the name of the relay to which the hosts listed in uucp.ucbarpa
59466336Sericare connected.  [The machine ucbarpa is gone now, but I've left
59557246Sericthis out-of-date configuration file around to demonstrate how you
59657246Sericmight do this.]
59757246Seric
59866336SericNote that the case of SITECONFIG with a third parameter of ``U'' is
59966336Sericspecial; the second parameter is assumed to be the UUCP name of the
60066336Sericlocal site, rather than the name of a remote site, and the UUCP name
60166336Sericis entered into $=w (the list of local hostnames) as $U.UUCP.
60266336Seric
60357246SericThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
60457246Sericmore than a sequence of SITE macros describing connectivity.  For
60557246Sericexample:
60657246Seric
60757246Seric	SITE(cnmat)
60857246Seric	SITE(sgi olympus)
60957246Seric
61057246SericThe second example demonstrates that you can use two names on the
61157246Sericsame line; these are usually aliases for the same host (or are at
61257246Sericleast in the same company).
61357246Seric
61458087Seric
61565218Seric+--------------------+
61665218Seric| USING UUCP MAILERS |
61765218Seric+--------------------+
61865218Seric
61965218SericIt's hard to get UUCP mailers right because of the extremely ad hoc
62065218Sericnature of UUCP addressing.  These config files are really designed
62165218Sericfor domain-based addressing, even for UUCP sites.
62265218Seric
62365218SericThere are four UUCP mailers available.  The choice of which one to
62465218Sericuse is partly a matter of local preferences and what is running at
62565218Sericthe other end of your UUCP connection.  Unlike good protocols that
62665218Sericdefine what will go over the wire, UUCP uses the policy that you
62765218Sericshould do what is right for the other end; if they change, you have
62865218Sericto change.  This makes it hard to do the right thing, and discourages
62965218Sericpeople from updating their software.  In general, if you can avoid
63065218SericUUCP, please do.
63165218Seric
63265218SericThe major choice is whether to go for a domainized scheme or a
63365218Sericnon-domainized scheme.  This depends entirely on what the other
63465218Sericend will recognize.  If at all possible, you should encourage the
63565218Sericother end to go to a domain-based system -- non-domainized addresses
63665218Sericdon't work entirely properly.
63765218Seric
63865218SericThe four mailers are:
63965218Seric
64065218Seric    uucp-old (obsolete name: "uucp")
64165218Seric	This is the oldest, the worst (but the closest to UUCP) way of
64265218Seric	sending messages accros UUCP connections.  It does bangify
64365218Seric	everything and prepends $U (your UUCP name) to the sender's
64465218Seric	address (which can already be a bang path itself).  It can
64565218Seric	only send to one address at a time, so it spends a lot of
64665218Seric	time copying duplicates of messages.  Avoid this if at all
64765218Seric	possible.
64865218Seric
64965218Seric    uucp-new (obsolete name: "suucp")
65065218Seric	The same as above, except that it assumes that in one rmail
65165218Seric	command you can specify several recipients.  It still has a
65265218Seric	lot of other problems.
65365218Seric
65465218Seric    uucp-dom
65565218Seric	This UUCP mailer keeps everything as domain addresses.
65667471Seric	Basically, it uses the SMTP mailer rewriting rules.  This mailer
65767471Seric	is only included if MAILER(smtp) is also specified.
65865218Seric
65965218Seric	Unfortunately, a lot of UUCP mailer transport agents require
66065218Seric	bangified addresses in the envelope, although you can use
66165218Seric	domain-based addresses in the message header.  (The envelope
66265218Seric	shows up as the From_ line on UNIX mail.)  So....
66365218Seric
66465218Seric    uucp-uudom
66565218Seric	This is a cross between uucp-new (for the envelope addresses)
66665218Seric	and uucp-dom (for the header addresses).  It bangifies the
66765218Seric	envelope sender (From_ line in messages) without adding the
66865218Seric	local hostname, unless there is no host name on the address
66965218Seric	at all (e.g., "wolf") or the host component is a UUCP host name
67065218Seric	instead of a domain name ("somehost!wolf" instead of
67167471Seric	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
67267471Seric	is also specified.
67365218Seric
67465218SericExamples:
67565218Seric
67665218SericWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
67765218Sericfollowing summarizes the sender rewriting for various mailers.
67865218Seric
67965218SericMailer          sender		rewriting in the envelope
68065218Seric------		------		-------------------------
68165218Sericuucp-{old,new}	wolf		grasp!wolf
68265218Sericuucp-dom	wolf		wolf@grasp.insa-lyon.fr
68365218Sericuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
68465218Seric
68565218Sericuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
68665218Sericuucp-dom	wolf@fr.net	wolf@fr.net
68765218Sericuucp-uudom	wolf@fr.net	fr.net!wolf
68865218Seric
68965218Sericuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
69065218Sericuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
69165218Sericuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
69265218Seric
69365218SericIf you are using one of the domainized UUCP mailers, you really want
69465218Sericto convert all UUCP addresses to domain format -- otherwise, it will
69565218Sericdo it for you (and probably not the way you expected).  For example,
69665218Sericif you have the address foo!bar!baz (and you are not sending to foo),
69765218Sericthe heuristics will add the @uucp.relay.name or @local.host.name to
69865218Sericthis address.  However, if you map foo to foo.host.name first, it
69965218Sericwill not add the local hostname.  You can do this using the uucpdomain
70065218Sericfeature.
70165218Seric
70265218Seric
70357246Seric+-------------------+
70457246Seric| TWEAKING RULESETS |
70557246Seric+-------------------+
70657246Seric
70751268SericFor more complex configurations, you can define special rules.
70851268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
70951268Sericthe names.  Any modifications made here are reflected in the header.
71051268Seric
71151268SericA common use is to convert old UUCP addreses to SMTP addresses using
71251268Sericthe UUCPSMTP macro.  For example:
71351268Seric
71451268Seric	LOCAL_RULE_3
71551268Seric	UUCPSMTP(decvax,	decvax.dec.com)
71651268Seric	UUCPSMTP(research,	research.att.com)
71751268Seric
71851268Sericwill cause addresses of the form "decvax!user" and "research!user"
71951268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
72051268Sericrespectively.
72151268Seric
72265957SericThis could also be used to look up hosts in a database map:
72357246Seric
72457246Seric	LOCAL_RULE_3
72557246Seric	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
72657246Seric
72757246SericThis map would be defined in the LOCAL_CONFIG portion, as shown below.
72857246Seric
72951268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
73051268SericFor example, new rules are needed to parse hostnames that you accept
73151309Sericvia MX records.  For example, you might have:
73251268Seric
73351309Seric	LOCAL_RULE_0
73465986Seric	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
73551309Seric
73651309SericYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
73751309Sericpointing at this host; this rule catches the message and forwards it on
73851309Sericusing UUCP.
73951309Seric
74058681SericYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
74158681SericThese rulesets are normally empty.
74258681Seric
74357246SericA similar macro is LOCAL_CONFIG.  This introduces lines added after the
74457246Sericboilerplate option setting but before rulesets, and can be used to
74557945Sericdeclare local database maps or whatever.  For example:
74651268Seric
74757246Seric	LOCAL_CONFIG
74857246Seric	Khostmap hash /etc/hostmap.db
74957246Seric	Kyplocal nis -m hosts.byname
75051220Seric
75158087Seric
75257246Seric+---------------------------+
75357246Seric| MASQUERADING AND RELAYING |
75457246Seric+---------------------------+
75557246Seric
75657246SericYou can have your host masquerade as another using
75757246Seric
75857246Seric	MASQUERADE_AS(host.domain)
75957246Seric
76065957SericThis causes outgoing SMTP mail to be labeled as coming from the
76157246Sericindicated domain, rather than $j.  One normally masquerades as one
76265957Sericof one's own subdomains (for example, it's unlikely that I would
76357246Sericchoose to masquerade as an MIT site).
76457246Seric
76564153SericThe masquerade name is not normally canonified, so it is important
76664153Sericthat it be your One True Name, that is, fully qualified and not a
76764153SericCNAME.
76864153Seric
76957246Sericthere are always users that need to be "exposed" -- that is, their
77057246Sericinternal site name should be displayed instead of the masquerade name.
77157246SericRoot is an example.  You can add users to this list using
77257246Seric
77357246Seric	EXPOSED_USER(usernames)
77457246Seric
77557246SericThis adds users to class E; you could also use something like
77657246Seric
77757246Seric	FE/etc/sendmail.cE
77857246Seric
77957246SericYou can also arrange to relay all unqualified names (that is, names
78057246Sericwithout @host) to a relay host.  For example, if you have a central
78157246Sericemail server, you might relay to that host so that users don't have
78257246Sericto have .forward files or aliases.  You can do this using
78357246Seric
78458071Seric	define(`LOCAL_RELAY', mailer:hostname)
78557246Seric
78658071SericThe ``mailer:'' can be omitted, in which case the mailer defaults to
78758071Seric"smtp".  There are some user names that you don't want relayed, perhaps
78858071Sericbecause of local aliases.  A common example is root, which may be
78958071Sericlocally aliased.  You can add entries to this list using
79057246Seric
79157246Seric	LOCAL_USER(usernames)
79257246Seric
79357246SericThis adds users to class L; you could also use something like
79457246Seric
79557246Seric	FL/etc/sendmail.cL
79657246Seric
79764153SericIf you want all incoming mail sent to a centralized hub, as for a
79864153Sericshared /var/spool/mail scheme, use
79957591Seric
80058071Seric	define(`MAIL_HUB', mailer:hostname)
80157591Seric
80258071SericAgain, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
80368697Sericand MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
80468697Sericbe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
80568697SericNames in $=L will be delivered locally, so you MUST have aliases or
80668697Seric.forward files for them.
80766047Seric
80868697SericFor example, if are on machine mastodon.CS.Berkeley.EDU and you have
80968697SericFEATURE(stickyhost), the following combinations of settings will have the
81068697Sericindicated effects:
81157591Seric
81257591Sericemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
81357591Seric
81457591SericLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
81568697Sericmail.CS.Berkeley.EDU	  (no local aliasing)	    (aliasing done)
81657591Seric
81757591SericMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
81868697Sericmammoth.CS.Berkeley.EDU	  (aliasing done)	    (aliasing done)
81957591Seric
82057591SericBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
82168697SericMAIL_HUB set as above	  (no local aliasing)	    (aliasing done)
82257591Seric
82368697SericIf you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
82468697SericMAIL_HUB act identically, with MAIL_HUB taking precedence.
82568697Seric
82664153SericIf you want all outgoing mail to go to a central relay site, define
82764153SericSMART_HOST as well.  Briefly:
82858071Seric
82964153Seric	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
83064153Seric	MAIL_HUB applies to names qualified with the name of the
83164153Seric		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
83264153Seric	SMART_HOST applies to names qualified with other hosts.
83364153Seric
834*69624SericHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
835*69624SericDECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
836*69624Sericreally want absolutely everything to go to a single central site you will
837*69624Sericneed to unset all the other relays -- or better yet, find or build a
838*69624Sericminimal config file that does this.
83964153Seric
84064153Seric
84158071Seric+-------------------------------+
84258071Seric| NON-SMTP BASED CONFIGURATIONS |
84358071Seric+-------------------------------+
84458071Seric
84558071SericThese configuration files are designed primarily for use by SMTP-based
84658071Sericsites.  I don't pretend that they are well tuned for UUCP-only or
84758071SericUUCP-primarily nodes (the latter is defined as a small local net
84858071Sericconnected to the rest of the world via UUCP).  However, there is one
84958071Serichook to handle some special cases.
85058071Seric
85158071SericYou can define a ``smart host'' that understands a richer address syntax
85258071Sericusing:
85358071Seric
85458071Seric	define(`SMART_HOST', mailer:hostname)
85558071Seric
85664028SericIn this case, the ``mailer:'' defaults to "relay".  Any messages that
85758071Sericcan't be handled using the usual UUCP rules are passed to this host.
85858071Seric
85958071SericIf you are on a local SMTP-based net that connects to the outside
86058071Sericworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
86158071SericFor example:
86258071Seric
86358071Seric	define(`SMART_HOST', suucp:uunet)
86458071Seric	LOCAL_NET_CONFIG
86563761Seric	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
86658071Seric
86758071SericThis will cause all names that end in your domain name ($m) via
86858071SericSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
86963761SericIf you have FEATURE(nocanonify), you may need to omit the dots after
87063761Sericthe $m.  If you are running a local DNS inside your domain which is
87163761Sericnot otherwise connected to the outside world, you probably want to
87263761Sericuse:
87358071Seric
87463761Seric	define(`SMART_HOST', smtp:fire.wall.com)
87563761Seric	LOCAL_NET_CONFIG
87663761Seric	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
87758071Seric
87863761SericThat is, send directly only to things you found in your DNS lookup;
87963761Sericanything else goes through SMART_HOST.
88063761Seric
88164153SericIf you are not running DNS at all, it is important to use
88264153SericFEATURE(nodns) to avoid having sendmail queue everything waiting
88364153Sericfor the name server to come up.
88463761Seric
88564153Seric
88664259Seric+-----------+
88764259Seric| WHO AM I? |
88864259Seric+-----------+
88964259Seric
89064259SericNormally, the $j macro is automatically defined to be your fully
89164259Sericqualified domain name (FQDN).  Sendmail does this by getting your
89264259Serichost name using gethostname and then calling gethostbyname on the
89364259Sericresult.  For example, in some environments gethostname returns
89464259Sericonly the root of the host name (such as "foo"); gethostbyname is
89564259Sericsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
89664259Sericcases, gethostbyname may fail to return the FQDN.  In this case
89764259Sericyou MUST define confDOMAIN_NAME to be your fully qualified domain
89864259Sericname.  This is usually done using:
89964259Seric
90064259Seric	Dmbar.com
90164259Seric	define(`confDOMAIN_NAME', `$w.$m')dnl
90264259Seric
90364259Seric
90464028Seric+--------------------+
90564028Seric| USING MAILERTABLES |
90664028Seric+--------------------+
90764028Seric
90864028SericTo use FEATURE(mailertable), you will have to create an external
90964028Sericdatabase containing the routing information for various domains.
91064028SericFor example, a mailertable file in text format might be:
91164028Seric
91264028Seric	.my.domain		xnet:%1.my.domain
91364028Seric	uuhost1.my.domain	suucp:uuhost1
91464028Seric	.bitnet			smtp:relay.bit.net
91564028Seric
91664028SericThis should normally be stored in /etc/mailertable.  The actual
91764028Sericdatabase version of the mailertable is built using:
91864028Seric
91964028Seric	makemap hash /etc/mailertable.db < /etc/mailertable
92064028Seric
92164028SericThe semantics are simple.  Any LHS entry that does not begin with
92264028Serica dot matches the full host name indicated.  LHS entries beginning
92364028Sericwith a dot match anything ending with that domain name -- that is,
92464028Sericthey can be thought of as having a leading "*" wildcard.  Matching
92564028Sericis done in order of most-to-least qualified -- for example, even
92664028Sericthough ".my.domain" is listed first in the above example, an entry
92764028Sericof "uuhost1.my.domain" will match the second entry since it is
92864028Sericmore explicit.
92964028Seric
93064028SericThe RHS should always be a "mailer:host" pair.  The mailer is the
93164028Sericconfiguration name of a mailer (that is, an `M' line in the
93264028Sericsendmail.cf file).  The "host" will be the hostname passed to
93364028Sericthat mailer.  In domain-based matches (that is, those with leading
93464028Sericdots) the "%1" may be used to interpolate the wildcarded part of
93564028Sericthe host name.  For example, the first line above sends everything
93664028Sericaddressed to "anything.my.domain" to that same host name, but using
93764028Sericthe (presumably experimental) xnet mailer.
93864028Seric
93967915SericIn some cases you may want to temporarily turn off MX records,
94067915Sericparticularly on gateways.  For example, you may want to MX
94167915Sericeverything in a domain to one machine that then forwards it
94267915Sericdirectly.  To do this, you might use the DNS configuration:
94364028Seric
94467915Seric	*.domain.	IN	MX	0	relay.machine
94567915Seric
94667915Sericand on relay.machine use the mailertable:
94767915Seric
94867915Seric	.domain		smtp:[gateway.domain]
94967915Seric
95067915SericThe [square brackets] turn off MX records for this host only.
95167915SericIf you didn't do this, the mailertable would use the MX record
95267915Sericagain, which would give you an MX loop.
95367915Seric
95467915Seric
95564153Seric+--------------------------------+
95664153Seric| USING USERDB TO MAP FULL NAMES |
95764153Seric+--------------------------------+
95864153Seric
95964153SericThe user database was not originally intended for mapping full names
96064153Sericto login names (e.g., Eric.Allman => eric), but some people are using
96164153Sericit that way.  (I would recommend that you set up aliases for this
96264153Sericpurpose instead -- since you can specify multiple alias files, this
96364153Sericis fairly easy.)  The intent was to locate the default maildrop at
96464153Serica site, but allow you to override this by sending to a specific host.
96564153Seric
96664153SericIf you decide to set up the user database in this fashion, it is
96767917Sericimperative that you not use FEATURE(stickyhost) -- otherwise,
96864153Serice-mail sent to Full.Name@local.host.name will be rejected.
96964153Seric
97067917SericTo build the internal form of the user database, use:
97164153Seric
97264259Seric	makemap btree /usr/data/base.db < /usr/data/base.txt
97364259Seric
97469508SericAs a general rule, I am adamantly opposed to using full names as
97569508Serice-mail addresses, since they are not in any sense unique.  For example,
97669508Sericthe Unix software-development community has two Andy Tannenbaums,
97769508Sericat least two well-known Peter Deutsches, and at one time Bell Labs
97869508Serichad two Stephen R. Bournes with offices along the same hallway.
97969508SericWhich one will be forced to suffer the indignity of being
98069508SericStephen_R_Bourne_2?  The less famous of the two, or the one that
98169508Sericwas hired later?
98264259Seric
98369508SericFinger should handle full names (and be fuzzy).  Mail should use
98469508Serichandles, and not be fuzzy.  [Not that I expect anyone to pay any
98569508Sericattention to my opinions.]
98669508Seric
98769508Seric
98867539Seric+--------------------------------+
98967539Seric| MISCELLANEOUS SPECIAL FEATURES |
99067539Seric+--------------------------------+
99167539Seric
99269540SericPlussed users
99367539Seric	Sometimes it is convenient to merge configuration on a
99467539Seric	centralized mail machine, for example, to forward all
99567539Seric	root mail to a mail server.  In this case it might be
99667539Seric	useful to be able to treat the root addresses as a class
99767539Seric	of addresses with subtle differences.  You can do this
99869540Seric	using plussed users.  For example, a client might include
99967539Seric	the alias:
100067539Seric
100169540Seric		root:  root+client1@server
100267539Seric
100369540Seric	On the server, this will match an alias for "root+client1".
100469540Seric	If that is not found, the alias "root+*" will be tried,
100569540Seric	then "root".
100667539Seric
100767539Seric
100867960Seric+----------------+
100967960Seric| SECURITY NOTES |
101067960Seric+----------------+
101167960Seric
101267960SericA lot of sendmail security comes down to you.  Sendmail 8 is much
101367960Sericmore careful about checking for security problems than previous
101467960Sericversions, but there are some things that you still need to watch
101567960Sericfor.  In particular:
101667960Seric
101767960Seric* Make sure the aliases file isn't writable except by trusted
101867960Seric  system personnel.  This includes both the text and database
101967960Seric  version.
102067960Seric
102167960Seric* Make sure that other files that sendmail reads, such as the
102267960Seric  mailertable, is only writable by trusted system personnel.
102367960Seric
102467960Seric* The queue directory should not be world writable PARTICULARLY
102567960Seric  if your system allows "file giveaways" (that is, if a non-root
102667960Seric  user can chown any file they own to any other user).
102767960Seric
102867960Seric* If your system allows file giveaways, DO NOT create a publically
102967960Seric  writable directory for forward files.  This will allow anyone
103067960Seric  to steal anyone else's e-mail.  Instead, create a script that
103167960Seric  copies the .forward file from users' home directories once a
103267960Seric  night (if you want the non-NFS-mounted forward directory).
103367960Seric
103467960Seric* If your system allows file giveaways, you'll find that
103567960Seric  sendmail is much less trusting of :include: files -- in
103667960Seric  particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
103767960Seric  /etc/shells before they will be trusted (that is, before
103867960Seric  files and programs listed in them will be honored).
103967960Seric
104067960SericIn general, file giveaways are a mistake -- if you can turn them
104167960Sericoff I recommend you do so.
104267960Seric
104367960Seric
104458363Seric+------------------+
104558363Seric| FlexFAX SOFTWARE |
104658363Seric+------------------+
104758363Seric
104858363SericSam Leffler's FlexFAX software is still in beta test -- but he expects a
104958363Sericpublic version out "later this week" [as of 3/1/93].  The following
105058363Sericblurb is direct from Sam:
105158363Seric
105264498Seric	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
105358363Seric
105458363Seric	How To Obtain This Software (in case all you get is this file)
105564498Seric	--------------------------------------------------------------
105658363Seric	The source code is available for public ftp on
105764498Seric	    sgi.com			sgi/fax/v2.1.src.tar.Z
105858363Seric		(192.48.153.1)
105958363Seric
106058363Seric	You can also obtain inst'able images for Silicon Graphics machines from
106164498Seric	    sgi.com			sgi/fax/v2.1.inst.tar
106258363Seric		(192.48.153.1)
106358363Seric
106458363Seric	For example,
106558363Seric	    % ftp -n sgi.com
106658363Seric	    ....
106758363Seric	    ftp> user anonymous
106858363Seric	    ... <type in password>
106958363Seric	    ftp> cd sgi/fax
107058363Seric	    ftp> binary
107164498Seric	    ftp> get v2.1.src.tar.Z
107258363Seric
107364498Seric	In general, the latest version of the 2.1 release of the software is
107464498Seric	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
107564498Seric	directory.  This file is a link to the appropriate released version (so
107664498Seric	don't waste your time retrieving the linked file as well!) Any files of
107764498Seric	the form v2.1.*.patch are shell scripts that can be used to patch older
107864498Seric	versions of the source code.  For example, the file v2.1.0.patch would
107964498Seric	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
108064498Seric	different than the naming conventions used during beta testing.) Patch
108164498Seric	files only work to go between consecutive versions, so if you are
108264498Seric	multiple versions behind the latest release, you will need to apply
108364498Seric	each patch file between your current version and the latest.
108464498Seric
108564498Seric
108664498Seric	Obtaining the Software by Electronic Mail
108764498Seric	-----------------------------------------
108864498Seric	Do not send me requests for the software; they will be ignored (without
108964498Seric	response).  If you cannot use FTP at all, there is a service called
109064498Seric	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
109164498Seric	this machine and it will use FTP to retrieve files for you and send you
109264498Seric	the files back again via e-mail.  To find out more about the ftpmail
109358363Seric	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
109458363Seric	consists of the single line "help".
109558363Seric
109664498Seric
109764498Seric	Obtaining the Software Within Silicon Graphics
109864498Seric	----------------------------------------------
109958363Seric	Internal to Silicon Graphics there are inst'able images on the host
110064498Seric	flake.asd in the directory /usr/dist.  Thus you can do something like:
110158363Seric
110264498Seric	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
110358363Seric
110464498Seric	to install the latest version of the software on your machine.
110558363Seric
110664498Seric
110764498Seric	What to do Once You've Retrieved Stuff
110864498Seric	--------------------------------------
110958363Seric	The external distributions come in a compressed or uncompressed tar
111058363Seric	file.  To extract the source distribution:
111158363Seric
111264498Seric	    % zcat v2.1.src.tar.Z | tar xf -
111358363Seric
111458363Seric	(uncompress and extract individual files in current directory).  To
111558363Seric	unpack and install the client portion of the inst'able distribution:
111658363Seric
111758363Seric	    % mkdir dist
111864498Seric	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
111958363Seric	    % inst -f dist/flexfax
112058363Seric	    ...
112158363Seric	    inst> go
112258363Seric
112358363Seric	(Note, the dist subdirectory is because some versions of inst fail if
112464498Seric	the files are in the current directory.) Server binaries are also
112564498Seric	included in the inst'able images as flexfax.server.*.  They are not
112664498Seric	installed by default, so to get them also you need to do:
112758363Seric
112858363Seric	    % inst -f flexfax
112958363Seric	    ...
113058363Seric	    inst> install flexfax.server.*
113158363Seric	    inst> go
113258363Seric
113364498Seric	The SGI binaries were built for Version 4.0.5H of the IRIX operating
113458363Seric	system.  They should work w/o problem on earlier versions of the
113558363Seric	system, but I have not fully tested this.  Also, note that to install a
113658363Seric	server on an SGI machine, you need to have installed the Display
113758363Seric	PostScript execution environment product (dps_eoe).  Otherwise, the fax
113858363Seric	server will not be able to convert PostScript to facsimile for
113958363Seric	transmission.
114058363Seric
114164498Seric	If you are working from the source distribution, look at the file
114264498Seric	README in the top of the source tree.  If you are working from the inst
114364498Seric	images, the subsystem flexfax.man.readme contains the README file and
114464498Seric	other useful pieces of information--the installed files are placed in
114564498Seric	the directory /usr/local/doc/flexfax).  Basically you will need to run
114664498Seric	the faxaddmodem script to setup and configure your fax modem.  Consult
114764498Seric	the README file and the manual page for faxaddmodem for information.
114858363Seric
114958363Seric
115064498Seric	FlexFAX Mail List
115164498Seric	-----------------
115258363Seric	A mailing list for users of this software is located on sgi.com.
115358363Seric	If you want to join this mailing list or have a list-related request
115458363Seric	such as getting your name removed from it, send a request to
115558363Seric
115664498Seric	    majordomo@whizzer.wpd.sgi.com
115758363Seric
115864498Seric	For example, to subscribe, send the line "subscribe flexfax" in
115964498Seric	the body of your message.  The line "help" will return a list of
116064498Seric	the commands understood by the mailing list management software.
116164498Seric
116258363Seric	Submissions (including bug reports) should be directed to:
116358363Seric
116458363Seric	    flexfax@sgi.com
116558363Seric
116664498Seric	When corresponding about this software please always specify what
116764498Seric	version you have, what system you're running on, and, if the problem is
116864498Seric	specific to your modem, identify the modem and firmware revision.
116958363Seric
117064498Seric
117157945Seric+--------------------------------+
117257945Seric| TWEAKING CONFIGURATION OPTIONS |
117357945Seric+--------------------------------+
117457945Seric
117557945SericThere are a large number of configuration options that don't normally
117657945Sericneed to be changed.  However, if you feel you need to tweak them, you
117757945Sericcan define the following M4 variables.  This list is shown in four
117857945Sericcolumns:  the name you define, the default value for that definition,
117957945Sericthe option or macro that is affected (either Ox for an option or Dx
118057945Sericfor a macro), and a brief description.  Greater detail of the semantics
118157945Sericcan be found in the Installation and Operations Guide.
118257945Seric
118363582SericSome options are likely to be deprecated in future versions -- that is,
118463582Sericthe option is only included to provide back-compatibility.  These are
118563582Sericmarked with "*".
118663582Seric
118765002SericRemember that these options are M4 variables, and hence may need to
118865002Sericbe quoted.  In particular, arguments with commas will usually have to
118965002Sericbe ``double quoted, like this phrase'' to avoid having the comma
119065002Sericconfuse things.  This is common for alias file definitions and for
119165002Sericthe read timeout.
119265002Seric
119368694SericM4 Variable Name	Configuration	Description & [Default]
119468694Seric================	=============	=======================
119568694SericconfMAILER_NAME		$n macro	[MAILER-DAEMON] The sender name used
119668694Seric					for internally generated outgoing
119768694Seric					messages.
119868694SericconfFROM_LINE		$l macro	[From $g  $d] The From_ line used
119968694Seric					when sending to files or programs.
120068694SericconfFROM_HEADER		$q macro	[$?x$x <$g>$|$g$.] The format of an
120168694Seric					internally generated From: address.
120268694SericconfOPERATORS		$o macro	[.:%@!^/[]+] Address operator
120368694Seric					characters.
120468767SericconfSMTP_LOGIN_MSG	$e macro	[$j Sendmail $v/$Z; $b]
120568694Seric					The initial (spontaneous) SMTP
120668767Seric					greeting message.  The word "ESMTP"
120768767Seric					will be inserted between the first and
120868767Seric					second words to convince other
120968767Seric					sendmails to try to speak ESMTP.
121068694SericconfDOMAIN_NAME		$j macro	If defined, sets $j.  This should
121168694Seric					only be done if your system cannot
121268694Seric					determine your local domain name,
121368694Seric					and then it should be set to
121468694Seric					$w.Foo.COM, where Foo.COM is your
121568694Seric					domain name.
121668694SericconfRECEIVED_HEADER	Received:
121768694Seric      [.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b]
121868694Seric					The format of the Received: header
121968694Seric					in messages passed through this host.
122068694Seric					It is unwise to try to change this.
122168694SericconfCW_FILE		Fw class	[/etc/sendmail.cw] Name of file used
122268694Seric					to get the local additions to the $=w
122368694Seric					class.
122468694SericconfSMTP_MAILER		-		[smtp] The mailer name used when
122568694Seric					SMTP connectivity is required.
122668694Seric					One of "smtp", "smtp8", or "esmtp".
122768694SericconfLOCAL_MAILER	-		[local] The mailer name used when
122868694Seric					local connectivity is required.
122968694Seric					Almost always "local".
123068694SericconfRELAY_MAILER	-		[relay] The default mailer name used
123168694Seric					for relaying any mail (e.g., to a
123268694Seric					BITNET_RELAY, a SMART_HOST, or
123368694Seric					whatever).  This can reasonably be
123468694Seric					"uucp-new" if you are on a
123568694Seric					UUCP-connected site.
123668694SericconfSEVEN_BIT_INPUT	SevenBitInput	[False] Force input to seven bits?
123768694SericconfEIGHT_BIT_HANDLING	EightBitMode	[pass8] 8-bit data handling
123868694SericconfALIAS_WAIT		AliasWait	[10m] Time to wait for alias file
123968694Seric					rebuild until you get bored and
124068694Seric					decide that the apparently pending
124168694Seric					rebuild failed.
124268694SericconfMIN_FREE_BLOCKS	MinFreeBlocks	[100] Minimum number of free blocks on
124368694Seric					queue filesystem to accept SMTP mail.
124468749Seric					(Prior to 8.7 this was minfree/maxsize,
124568749Seric					where minfree was the number of free
124668749Seric					blocks and maxsize was the maximum
124768749Seric					message size.  Use confMAX_MESSAGE_SIZE
124868749Seric					for the second value now.)
124968749SericconfMAX_MESSAGE_SIZE	MaxMessageSize	The maximum size of messages that will
125068749Seric					be accepted (in bytes).
125168694SericconfBLANK_SUB		BlankSub	[.] Blank (space) substitution
125268694Seric					character.
125368694SericconfCON_EXPENSIVE	HoldExpensive	[False] Avoid connecting immediately
125468694Seric					to mailers marked expensive?
125568694SericconfCHECKPOINT_INTERVAL	CheckpointInterval
125668694Seric					Checkpoint queue files every N
125768694Seric					recipients.
125868694SericconfDELIVERY_MODE	DeliveryMode	[background] Default delivery mode.
125968694SericconfAUTO_REBUILD	AutoRebuildAliases
126068694Seric					Automatically rebuild alias
126168694Seric					file if needed.
126268694SericconfERROR_MODE		ErrorMode	Error message mode.
126368694SericconfERROR_MESSAGE	ErrorHeader	Error message header/file.
126468694SericconfSAVE_FROM_LINES	SafeFromLine	Save extra leading From_ lines.
126568694SericconfTEMP_FILE_MODE	TempFileMode	[0600] Temporary file mode.
126668694SericconfMATCH_GECOS		MatchGECOS	Match GECOS field.
126768694SericconfMAX_HOP		MaxHopCount	Maximum hop count.
126868694SericconfIGNORE_DOTS*	IgnoreDots	Ignore dot as terminator for incoming
126968694Seric					messages?
127068694SericconfBIND_OPTS		ResolverOptions	Default options for DNS resolver.
127168694SericconfMIME_FORMAT_ERRORS*	SendMimeErrors	[True] Send error messages as MIME-
127268694Seric					encapsulated messages per RFC 1344.
127368694SericconfFORWARD_PATH	ForwardPath	[$z/.forward.$w:$z/.forward]
127468694Seric					The colon-separated list of places to
127568694Seric					search for .forward files.  N.B.: see
127668694Seric					the Security Notes section.
127768694SericconfMCI_CACHE_SIZE	ConnectionCacheSize
127868694Seric					[2] Size of open connection cache.
127968694SericconfMCI_CACHE_TIMEOUT	ConnectionCacheTimeout
128068694Seric					[5m] Open connection cache timeout.
128168694SericconfUSE_ERRORS_TO*	UserErrorsTo	[False] Use the Errors-To: header to deliver
128268694Seric					error messages.  This should not be
128368694Seric					necessary because of general acceptance
128468694Seric					of the envelope/header distinction.
128568694SericconfLOG_LEVEL		LogLevel	[9] Log level.
128668694SericconfME_TOO		MeToo		Include sender in group expansions.
128768694SericconfCHECK_ALIASES	CheckAliases	[True] Check RHS of aliases when
128868694Seric					running newaliases.
128968694SericconfOLD_STYLE_HEADERS*	OldStyleHeaders	[True] Assume that headers without
129068694Seric					special chars are old style.
129168694SericconfDAEMON_OPTIONS	DaemonPortOptions
129268694Seric					SMTP daemon options.
129368694SericconfPRIVACY_FLAGS	PrivacyOptions	[authwarnings] Privacy flags.
129468694SericconfCOPY_ERRORS_TO	PostmasterCopy	Address for additional copies of all
129568694Seric					error messages.
129668694SericconfQUEUE_FACTOR	QueueFactor	Slope of queue-only function.
129768694SericconfDONT_PRUNE_ROUTES	DontPruneRoutes	Don't prune down route-addr syntax
129868694Seric					addresses to the minimum possible.
129968694SericconfSAFE_QUEUE*		SuperSafe	[True] Commit all messages to disk
130068694Seric					before forking.
130168694SericconfTIME_ZONE		TimeZoneSpec	[USE_SYSTEM] Time zone info -- can be
130268694Seric					USE_SYSTEM to use the system's idea,
130368694Seric					USE_TZ to use the user's TZ envariable,
130468694Seric					or something else to force that value.
130568694SericconfDEF_USER_ID		DefaultUser	[1:1] Default user id.
130668694SericconfUSERDB_SPEC		UserDatabaseSpec
130768694Seric					User database specification.
130868694SericconfFALLBACK_MX		FallbackMXhost	Fallback MX host.
130968694SericconfTRY_NULL_MX_LIST	TryNullMXList	If we are the best MX for a host and
131068694Seric					haven't made other arrangements, try
131168694Seric					connecting to the host directly;
131268694Seric					normally this would be a config error.
131368694SericconfQUEUE_LA		QueueLA		Load average at which queue-only
131468694Seric					function kicks in.
131568694SericconfREFUSE_LA		RefuseLA	Load average at which incoming
131668694Seric					SMTP connections are refused.
131763582SericconfWORK_RECIPIENT_FACTOR
131868694Seric			RecipientFactor	Cost of each recipient.
131968694SericconfSEPARATE_PROC	ForkEachJob	Run all deliveries in a separate
132068694Seric					process.
132168694SericconfWORK_CLASS_FACTOR	ClassFactor	Priority multiplier for class.
132268694SericconfWORK_TIME_FACTOR	RetryFactor	Cost of each delivery attempt.
132368694SericconfQUEUE_SORT_ORDER	QueueSortOrder	Queue sort algorithm: Priority or Host.
132468694SericconfMIN_QUEUE_AGE	MinQueueAge	The minimum amount of time a job
132568694Seric					must sit in the queue between queue
132668694Seric					runs.  This allows you to set the
132768694Seric					queue run interval low for better
132868694Seric					resposiveness without trying all
132968694Seric					jobs in each run.
133068694SericconfDEF_CHAR_SET	DefaultCharSet	When converting unlabelled 8 bit
133168694Seric					input to MIME, the character set to
133268694Seric					use by default.
133368694SericconfSERVICE_SWITCH_FILE	ServiceSwitchFile
133468694Seric					The file to use for the service switch
133568694Seric					on systems that do not have a system-
133668694Seric					defined switch.
133768694SericconfDIAL_DELAY		DialDelay	If a connection fails, wait this long
133868694Seric					and try again.  This is to allow
133968694Seric					"dial on demand" connections to have
134068694Seric					enough time to complete a connection.
134168694SericconfNO_RCPT_ACTION	NoRecipientAction
134268694Seric					What to do if there are no legal
134368694Seric					recipient fields (To:, Cc: or Bcc:)
134468694Seric					in the message.  Legal values can
134568694Seric					be "none" to just leave the
134668694Seric					nonconforming message as is, "add-to"
134768694Seric					to add a To: header with all the
134868694Seric					known recipients (which may expose
134968694Seric					blind recipients), "add-apparently-to"
135068694Seric					to do the same but use Apparently-To:
135168694Seric					instead of To:, "add-bcc" to add an
135268694Seric					empty Bcc: header, or
135368694Seric					"add-to-undisclosed" to add the header
135468694Seric					``To: undisclosed-recipients:;''.
135568694Seric					Default is "none".
135668694SericconfSAFE_FILE_ENV	SafeFileEnvironment
135768694Seric					If set, sendmail will do a chroot()
135868694Seric					into this directory before writing
135968694Seric					files.
136068807SericconfCOLON_OK_IN_ADDR	ColonOkInAddr	If set, colons are treated as a regular
136168807Seric					character in addresses.  If not set,
136268807Seric					they are treated as the introducer to
136368807Seric					the RFC 822 "group" syntax.  Colons are
136468807Seric					handled properly in route-addrs.  This
136568807Seric					option defaults on for V5 and lower
136668807Seric					configuration files.
136757945Seric
136858087Seric
136957246Seric+-----------+
137057246Seric| HIERARCHY |
137157246Seric+-----------+
137257246Seric
137351220SericWithin this directory are several subdirectories, to wit:
137451220Seric
137551220Sericm4		General support routines.  These are typically
137651220Seric		very important and should not be changed without
137757247Seric		very careful consideration.
137851220Seric
137951220Sericcf		The configuration files themselves.  They have
138051220Seric		".mc" suffixes, and must be run through m4 to
138151220Seric		become complete.  The resulting output should
138251220Seric		have a ".cf" suffix.
138351220Seric
138451220Sericostype		Definitions describing a particular operating
138551220Seric		system type.  These should always be referenced
138651220Seric		using the OSTYPE macro in the .mc file.  Examples
138751220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
138851220Seric		"sunos4.1".
138951220Seric
139051220Sericdomain		Definitions describing a particular domain, referenced
139151220Seric		using the DOMAIN macro in the .mc file.  These are
139268845Seric		site dependent; for example, "CS.Berkeley.EDU.m4"
139368845Seric		describes hosts in the CS.Berkeley.EDU subdomain.
139451220Seric
139551220Sericmailer		Descriptions of mailers.   These are referenced using
139651220Seric		the MAILER macro in the .mc file.
139751220Seric
139851220Sericsh		Shell files used when building the .cf file from the
139951220Seric		.mc file in the cf subdirectory.
140051220Seric
140151220Sericfeature		These hold special orthogonal features that you might
140251220Seric		want to include.  They should be referenced using
140351220Seric		the FEATURE macro.
140451220Seric
140551220Serichack		Local hacks.  These can be referenced using the HACK
140651220Seric		macro.  They shouldn't be of more than voyeuristic
140751220Seric		interest outside the .Berkeley.EDU domain, but who knows?
140865957Seric		We've all got our own peccadillos.
140951220Seric
141051268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
141151268Seric		UUCP sites.
141251220Seric
141351268Seric
141457246Seric+------------------------+
141557246Seric| ADMINISTRATIVE DETAILS |
141657246Seric+------------------------+
141751220Seric
141851220SericThe following sections detail usage of certain internal parts of the
141951220Sericsendmail.cf file.  Read them carefully if you are trying to modify
142051220Sericthe current model.  If you find the above descriptions adequate, these
142151220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
142251220Seric
142351220SericRULESETS (* means built in to sendmail)
142451220Seric
142551220Seric   0 *	Parsing
142651220Seric   1 *	Sender rewriting
142751220Seric   2 *	Recipient rewriting
142851220Seric   3 *	Canonicalization
142951220Seric   4 *	Post cleanup
143054839Seric   5 *	Local address rewrite (after aliasing)
143160539Seric  1x	mailer rules (sender qualification)
143260539Seric  2x	mailer rules (recipient qualification)
143364801Seric  3x	mailer rules (sender header qualification)
143464801Seric  4x	mailer rules (recipient header qualification)
143564801Seric  5x	mailer subroutines (general)
143664801Seric  6x	mailer subroutines (general)
143764801Seric  7x	mailer subroutines (general)
143864801Seric  8x	reserved
143960539Seric  90	Mailertable host stripping
144060892Seric  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
144160892Seric  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
144263857Seric  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
144351220Seric
144451220Seric
144551220SericMAILERS
144651220Seric
144751220Seric   0	local, prog	local and program mailers
144865218Seric   1	[e]smtp, relay	SMTP channel
144965218Seric   2	uucp-*		UNIX-to-UNIX Copy Program
145058087Seric   3	netnews		Network News delivery
145158363Seric   4	fax		Sam Leffler's FlexFAX software
145251220Seric
145351220Seric
145451220SericMACROS
145551220Seric
145651220Seric   A
145751220Seric   B	Bitnet Relay
1458*69624Seric   C	DECnet Relay
145954839Seric   D	The local domain -- usually not needed
146051220Seric   E
146158363Seric   F	FAX Relay
146251220Seric   G
146357591Seric   H	mail Hub (for mail clusters)
146451220Seric   I
146551220Seric   J
146651220Seric   K
146767915Seric   L	Luser Relay
146851220Seric   M	Masquerade (who I claim to be)
146951220Seric   N
147051220Seric   O
147151220Seric   P
147251220Seric   Q
147351220Seric   R	Relay (for unqualified names)
147458071Seric   S	Smart Host
147551220Seric   T
147651309Seric   U	my UUCP name (if I have a UUCP connection)
147751309Seric   V	UUCP Relay (class V hosts)
147851220Seric   W	UUCP Relay (class W hosts)
147951220Seric   X	UUCP Relay (class X hosts)
148051309Seric   Y	UUCP Relay (all other hosts)
148151220Seric   Z	Version number
148251220Seric
148351220Seric
148451220SericCLASSES
148551220Seric
148651220Seric   A
148751220Seric   B
148851220Seric   C
148969540Seric   D
149057246Seric   E	addresses that should not seem to come from $M
149154839Seric   F	hosts we forward for
149251220Seric   G
149351220Seric   H
149451220Seric   I
149551220Seric   J
149651220Seric   K
149751220Seric   L	addresses that should not be forwarded to $R
149851220Seric   M
149951220Seric   N
150051220Seric   O	operators that indicate network operations (cannot be in local names)
1501*69624Seric   P	top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc.
150251220Seric   Q
150351220Seric   R
150451220Seric   S
150551220Seric   T
150651220Seric   U	locally connected UUCP hosts
150751309Seric   V	UUCP hosts connected to relay $V
150851309Seric   W	UUCP hosts connected to relay $W
150951309Seric   X	UUCP hosts connected to relay $X
151051309Seric   Y	locally connected smart UUCP hosts
151164153Seric   Z	locally connected domain-ized UUCP hosts
151254839Seric   .	the class containing only a dot
151351220Seric
151451220Seric
151551220SericM4 DIVERSIONS
151651220Seric
151758071Seric   1	Local host detection and resolution
151858071Seric   2	Local Ruleset 3 additions
151958071Seric   3	Local Ruleset 0 additions
152051268Seric   4	UUCP Ruleset 0 additions
152151309Seric   5	locally interpreted names (overrides $R)
152254839Seric   6	local configuration (at top of file)
152351220Seric   7	mailer definitions
152466099Seric   8
152558681Seric   9	special local rulesets (1 and 2)
1526