xref: /freebsd/contrib/sendmail/cf/README (revision 065a643db393fd78e62e8b414b4789e13fbdb5ae)
1c2aa98e2SPeter Wemm
2c2aa98e2SPeter Wemm
3c2aa98e2SPeter Wemm		NEW SENDMAIL CONFIGURATION FILES
4c2aa98e2SPeter Wemm
5c2aa98e2SPeter Wemm		Eric Allman <eric@Sendmail.ORG>
6c2aa98e2SPeter Wemm
7065a643dSPeter Wemm		@(#)README	8.184 (Berkeley) 12/29/1998
8c2aa98e2SPeter Wemm
9c2aa98e2SPeter Wemm
10c2aa98e2SPeter WemmThis document describes the sendmail configuration files being used
11c2aa98e2SPeter Wemmat Berkeley.  These use features in the new (R8) sendmail; they will
12c2aa98e2SPeter Wemmnot work on other versions.
13c2aa98e2SPeter Wemm
14c2aa98e2SPeter WemmThese configuration files are probably not as general as previous
15c2aa98e2SPeter Wemmversions, and don't handle as many of the weird cases automagically.
16c2aa98e2SPeter WemmI was able to simplify them for two reasons.  First, the network
17c2aa98e2SPeter Wemmhas become more consistent -- for example, at this point, everyone
18c2aa98e2SPeter Wemmon the internet is supposed to be running a name server, so hacks to
19c2aa98e2SPeter Wemmhandle NIC-registered hosts can go away.  Second, I assumed that a
20c2aa98e2SPeter Wemmsubdomain would be running SMTP internally -- UUCP is presumed to be
21c2aa98e2SPeter Wemma long-haul protocol.  I realize that this is not universal, but it
22c2aa98e2SPeter Wemmdoes describe the vast majority of sites with which I am familiar,
23c2aa98e2SPeter Wemmincluding those outside the US.
24c2aa98e2SPeter Wemm
25c2aa98e2SPeter WemmOf course, the downside of this is that if you do live in a weird
26c2aa98e2SPeter Wemmworld, things are going to get weirder for you.  I'm sorry about that,
27c2aa98e2SPeter Wemmbut at the time we at Berkeley had a problem, and it seemed like the
28c2aa98e2SPeter Wemmright thing to do.
29c2aa98e2SPeter Wemm
30c2aa98e2SPeter WemmThis package requires a post-V7 version of m4; if you are running the
31c2aa98e2SPeter Wemm4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with
32c2aa98e2SPeter Wemma newer version.  You can m4-expand on their system, then run locally.
33c2aa98e2SPeter WemmSunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
34c2aa98e2SPeter Wemmor later also works.  Unfortunately, I'm told that the M4 on BSDI 1.0
35c2aa98e2SPeter Wemmdoesn't work -- you'll have to use a Net/2 or GNU version.  GNU m4 is
36c2aa98e2SPeter Wemmavailable from ftp://ftp.gnu.org/pub/gnu/m4-1.4.tar.gz (check for
37c2aa98e2SPeter Wemmthe latest version).  EXCEPTIONS: DEC's m4 on Digital UNIX 4.x is broken
38c2aa98e2SPeter Wemm(3.x is fine).  Use GNU m4 on this platform.
39c2aa98e2SPeter Wemm
40c2aa98e2SPeter WemmIF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
41c2aa98e2SPeter Wemm"m4 ../m4/cf.m4 foo.mc > foo.cf" -- that should be all you need.
42c2aa98e2SPeter WemmThere is also a fairly crude (but functional) Makefile.dist that works
43c2aa98e2SPeter Wemmon the old version of make.
44c2aa98e2SPeter Wemm
45c2aa98e2SPeter WemmTo get started, you may want to look at tcpproto.mc (for TCP-only
46c2aa98e2SPeter Wemmsites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for
47c2aa98e2SPeter Wemmclusters of clients using a single mail host).  Others are versions
48c2aa98e2SPeter Wemmthat we use at Berkeley, although not all are in current use.  For
49c2aa98e2SPeter Wemmexample, ucbvax has gone away, but I've left ucbvax.mc in because
50c2aa98e2SPeter Wemmit demonstrates some interesting techniques.
51c2aa98e2SPeter Wemm
52c2aa98e2SPeter WemmI'm not pretending that this README describes everything that these
53c2aa98e2SPeter Wemmconfiguration files can do; clever people can probably tweak them
54c2aa98e2SPeter Wemmto great effect.  But it should get you started.
55c2aa98e2SPeter Wemm
56c2aa98e2SPeter Wemm*******************************************************************
57c2aa98e2SPeter Wemm***  BE SURE YOU CUSTOMIZE THESE FILES!  They have some		***
58c2aa98e2SPeter Wemm***  Berkeley-specific assumptions built in, such as the name	***
59c2aa98e2SPeter Wemm***  of our UUCP-relay.  You'll want to create your own domain	***
60c2aa98e2SPeter Wemm***  description, and use that in place of			***
61c2aa98e2SPeter Wemm***  domain/Berkeley.EDU.m4.					***
62c2aa98e2SPeter Wemm*******************************************************************
63c2aa98e2SPeter Wemm
64c2aa98e2SPeter Wemm
65c2aa98e2SPeter Wemm+--------------------------+
66c2aa98e2SPeter Wemm| INTRODUCTION AND EXAMPLE |
67c2aa98e2SPeter Wemm+--------------------------+
68c2aa98e2SPeter Wemm
69c2aa98e2SPeter WemmConfiguration files are contained in the subdirectory "cf", with a
70c2aa98e2SPeter Wemmsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
71c2aa98e2SPeter WemmYou must pre-load "cf.m4":
72c2aa98e2SPeter Wemm
73c2aa98e2SPeter Wemm	m4 ${CFDIR}/m4/cf.m4 config.mc > config.cf
74c2aa98e2SPeter Wemm
75c2aa98e2SPeter Wemmwhere ${CFDIR} is the root of the cf directory and config.mc is the
76c2aa98e2SPeter Wemmname of your configuration file.  If you are running a version of M4
77c2aa98e2SPeter Wemmthat understands the __file__ builtin (versions of GNU m4 >= 0.75 do
78c2aa98e2SPeter Wemmthis, but the versions distributed with 4.4BSD and derivatives do not)
79c2aa98e2SPeter Wemmor the -I flag (ditto), then ${CFDIR} can be in an arbitrary directory.
80c2aa98e2SPeter WemmFor "traditional" versions, ${CFDIR} ***MUST*** be "..", or you MUST
81c2aa98e2SPeter Wemmuse -D_CF_DIR_=/path/to/cf/dir/ -- note the trailing slash!  For example:
82c2aa98e2SPeter Wemm
83c2aa98e2SPeter Wemm	m4 -D_CF_DIR_=${CFDIR}/ ${CFDIR}/m4/cf.m4 config.mc > config.cf
84c2aa98e2SPeter Wemm
85c2aa98e2SPeter WemmLet's examine a typical .mc file:
86c2aa98e2SPeter Wemm
87c2aa98e2SPeter Wemm	divert(-1)
88c2aa98e2SPeter Wemm	#
89c2aa98e2SPeter Wemm	# Copyright (c) 1998 Sendmail, Inc.  All rights reserved.
90c2aa98e2SPeter Wemm	# Copyright (c) 1983 Eric P. Allman.  All rights reserved.
91c2aa98e2SPeter Wemm	# Copyright (c) 1988, 1993
92c2aa98e2SPeter Wemm	#	The Regents of the University of California.  All rights reserved.
93c2aa98e2SPeter Wemm	#
94c2aa98e2SPeter Wemm	# By using this file, you agree to the terms and conditions set
95c2aa98e2SPeter Wemm	# forth in the LICENSE file which can be found at the top level of
96c2aa98e2SPeter Wemm	# the sendmail distribution.
97c2aa98e2SPeter Wemm	#
98c2aa98e2SPeter Wemm
99c2aa98e2SPeter Wemm	#
100c2aa98e2SPeter Wemm	#  This is a Berkeley-specific configuration file for HP-UX 9.x.
101c2aa98e2SPeter Wemm	#  It applies only to the Computer Science Division at Berkeley,
102c2aa98e2SPeter Wemm	#  and should not be used elsewhere.   It is provided on the sendmail
103c2aa98e2SPeter Wemm	#  distribution as a sample only.  To create your own configuration
104c2aa98e2SPeter Wemm	#  file, create an appropriate domain file in ../domain, change the
105c2aa98e2SPeter Wemm	#  `DOMAIN' macro below to reference that file, and copy the result
106c2aa98e2SPeter Wemm	#  to a name of your own choosing.
107c2aa98e2SPeter Wemm	#
108c2aa98e2SPeter Wemm	divert(0)
109c2aa98e2SPeter Wemm
110c2aa98e2SPeter WemmThe divert(-1) will delete the crud in the resulting output file.
111c2aa98e2SPeter WemmThe copyright notice can be replaced by whatever your lawyers require;
112c2aa98e2SPeter Wemmour lawyers require the one that I've included in my files.  A copyleft
113c2aa98e2SPeter Wemmis a copyright by another name.  The divert(0) restores regular output.
114c2aa98e2SPeter Wemm
115c2aa98e2SPeter Wemm	VERSIONID(`<SCCS or RCS version id>')
116c2aa98e2SPeter Wemm
117c2aa98e2SPeter WemmVERSIONID is a macro that stuffs the version information into the
118c2aa98e2SPeter Wemmresulting file.  We use SCCS; you could use RCS, something else, or
119c2aa98e2SPeter Wemmomit it completely.  This is not the same as the version id included
120c2aa98e2SPeter Wemmin SMTP greeting messages -- this is defined in m4/version.m4.
121c2aa98e2SPeter Wemm
122c2aa98e2SPeter Wemm	OSTYPE(hpux9)dnl
123c2aa98e2SPeter Wemm
124c2aa98e2SPeter WemmYou must specify an OSTYPE to properly configure things such as the
125c2aa98e2SPeter Wemmpathname of the help and status files, the flags needed for the local
126c2aa98e2SPeter Wemmmailer, and other important things.  If you omit it, you will get an
127c2aa98e2SPeter Wemmerror when you try to build the configuration.  Look at the ostype
128c2aa98e2SPeter Wemmdirectory for the list of known operating system types.
129c2aa98e2SPeter Wemm
130c2aa98e2SPeter Wemm	DOMAIN(CS.Berkeley.EDU)dnl
131c2aa98e2SPeter Wemm
132c2aa98e2SPeter WemmThis example is specific to the Computer Science Division at Berkeley.
133c2aa98e2SPeter WemmYou can use "DOMAIN(generic)" to get a sufficiently bland definition
134c2aa98e2SPeter Wemmthat may well work for you, or you can create a customized domain
135c2aa98e2SPeter Wemmdefinition appropriate for your environment.
136c2aa98e2SPeter Wemm
137c2aa98e2SPeter Wemm	MAILER(local)
138c2aa98e2SPeter Wemm	MAILER(smtp)
139c2aa98e2SPeter Wemm
140c2aa98e2SPeter WemmThese describe the mailers used at the default CS site site.  The
141c2aa98e2SPeter Wemmlocal mailer is always included automatically.  Beware: MAILER
142c2aa98e2SPeter Wemmdeclarations should always be at the end of the configuration file,
143c2aa98e2SPeter Wemmand MAILER(smtp) should always precede MAILER(uucp).  The general
144c2aa98e2SPeter Wemmrules are that the order should be:
145c2aa98e2SPeter Wemm
146c2aa98e2SPeter Wemm	VERSIONID
147c2aa98e2SPeter Wemm	OSTYPE
148c2aa98e2SPeter Wemm	DOMAIN
149c2aa98e2SPeter Wemm	FEATURE
150c2aa98e2SPeter Wemm	local macro definitions
151c2aa98e2SPeter Wemm	MAILER
152c2aa98e2SPeter Wemm	LOCAL_RULESET_*
153c2aa98e2SPeter Wemm
154c2aa98e2SPeter Wemm
155c2aa98e2SPeter Wemm+----------------------------+
156c2aa98e2SPeter Wemm| A BRIEF INTRODUCTION TO M4 |
157c2aa98e2SPeter Wemm+----------------------------+
158c2aa98e2SPeter Wemm
159c2aa98e2SPeter WemmSendmail uses the M4 macro processor to ``compile'' the configuration
160c2aa98e2SPeter Wemmfiles.  The most important thing to know is that M4 is stream-based,
161c2aa98e2SPeter Wemmthat is, it doesn't understand about lines.  For this reason, in some
162c2aa98e2SPeter Wemmplaces you may see the word ``dnl'', which stands for ``delete
163c2aa98e2SPeter Wemmthrough newline''; essentially, it deletes all characters starting
164c2aa98e2SPeter Wemmat the ``dnl'' up to and including the next newline character.  In
165c2aa98e2SPeter Wemmmost cases sendmail uses this only to avoid lots of unnecessary
166c2aa98e2SPeter Wemmblank lines in the output.
167c2aa98e2SPeter Wemm
168c2aa98e2SPeter WemmOther important directives are define(A, B) which defines the macro
169c2aa98e2SPeter Wemm``A'' to have value ``B''.  Macros are expanded as they are read, so
170c2aa98e2SPeter Wemmone normally quotes both values to prevent expansion.  For example,
171c2aa98e2SPeter Wemm
172c2aa98e2SPeter Wemm	define(`SMART_HOST', `smart.foo.com')
173c2aa98e2SPeter Wemm
174c2aa98e2SPeter WemmOne word of warning:  M4 macros are expanded even in lines that appear
175c2aa98e2SPeter Wemmto be comments.  For example, if you have
176c2aa98e2SPeter Wemm
177c2aa98e2SPeter Wemm	# See FEATURE(foo) above
178c2aa98e2SPeter Wemm
179c2aa98e2SPeter Wemmit will not do what you expect, because the FEATURE(foo) will be
180c2aa98e2SPeter Wemmexpanded.  This also applies to
181c2aa98e2SPeter Wemm
182c2aa98e2SPeter Wemm	# And then define the $X macro to be the return address
183c2aa98e2SPeter Wemm
184c2aa98e2SPeter Wemmbecause ``define'' is an M4 keyword.  If you want to use them, surround
185c2aa98e2SPeter Wemmthem with directed quotes, `like this'.
186c2aa98e2SPeter Wemm
187c2aa98e2SPeter Wemm+----------------+
188c2aa98e2SPeter Wemm| FILE LOCATIONS |
189c2aa98e2SPeter Wemm+----------------+
190c2aa98e2SPeter Wemm
191c2aa98e2SPeter Wemmsendmail 8.9 has introduced a new configuration directory for sendmail
192c2aa98e2SPeter Wemmrelated files, /etc/mail.  The new files available for sendmail 8.9 --
193c2aa98e2SPeter Wemmthe class 'R' /etc/mail/relay-domains and the access database
194c2aa98e2SPeter Wemm/etc/mail/access -- take advantage of this new directory.  8.9 will
195c2aa98e2SPeter Wemmserve as a transition release.  Beginning with 8.10, all of the files
196c2aa98e2SPeter Wemmwill use this directory by default.
197c2aa98e2SPeter Wemm
198c2aa98e2SPeter Wemm+--------+
199c2aa98e2SPeter Wemm| OSTYPE |
200c2aa98e2SPeter Wemm+--------+
201c2aa98e2SPeter Wemm
202c2aa98e2SPeter WemmYou MUST define an operating system environment, or the configuration
203c2aa98e2SPeter Wemmfile build will puke.  There are several environments available; look
204c2aa98e2SPeter Wemmat the "ostype" directory for the current list.  This macro changes
205c2aa98e2SPeter Wemmthings like the location of the alias file and queue directory.  Some
206c2aa98e2SPeter Wemmof these files are identical to one another.
207c2aa98e2SPeter Wemm
208c2aa98e2SPeter WemmIt is IMPERATIVE that the OSTYPE occur before any MAILER definitions.
209c2aa98e2SPeter WemmIn general, the OSTYPE macro should go immediately after any version
210c2aa98e2SPeter Wemminformation, and MAILER definitions should always go last.
211c2aa98e2SPeter Wemm
212c2aa98e2SPeter WemmOperating system definitions are usually easy to write.  They may define
213c2aa98e2SPeter Wemmthe following variables (everything defaults, so an ostype file may be
214c2aa98e2SPeter Wemmempty).  Unfortunately, the list of configuration-supported systems is
215c2aa98e2SPeter Wemmnot as broad as the list of source-supported systems, since many of
216c2aa98e2SPeter Wemmthe source contributors do not include corresponding ostype files.
217c2aa98e2SPeter Wemm
218c2aa98e2SPeter WemmALIAS_FILE		[/etc/aliases] The location of the text version
219c2aa98e2SPeter Wemm			of the alias file(s).  It can be a comma-separated
220c2aa98e2SPeter Wemm			list of names (but be sure you quote values with
221c2aa98e2SPeter Wemm			commas in them -- for example, use
222c2aa98e2SPeter Wemm				define(`ALIAS_FILE', `a,b')
223c2aa98e2SPeter Wemm			to get "a" and "b" both listed as alias files;
224c2aa98e2SPeter Wemm			otherwise the define() primitive only sees "a").
225c2aa98e2SPeter WemmHELP_FILE		[/usr/lib/sendmail.hf] The name of the file
226c2aa98e2SPeter Wemm			containing information printed in response to
227c2aa98e2SPeter Wemm			the SMTP HELP command.
228c2aa98e2SPeter WemmQUEUE_DIR		[/var/spool/mqueue] The directory containing
229c2aa98e2SPeter Wemm			queue files.
230c2aa98e2SPeter WemmSTATUS_FILE		[/etc/sendmail.st] The file containing status
231c2aa98e2SPeter Wemm			information.
232c2aa98e2SPeter WemmLOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
233c2aa98e2SPeter WemmLOCAL_MAILER_FLAGS	[rmn9] The flags used by the local mailer.  The
234c2aa98e2SPeter Wemm			flags lsDFM are always included.
235c2aa98e2SPeter WemmLOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
236c2aa98e2SPeter Wemm			mail.
237c2aa98e2SPeter WemmLOCAL_MAILER_MAX	[undefined] If defined, the maximum size of local
238c2aa98e2SPeter Wemm			mail that you are willing to accept.
239c2aa98e2SPeter WemmLOCAL_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
240c2aa98e2SPeter Wemm			that ARRIVE from an address that resolves to the
241c2aa98e2SPeter Wemm			local mailer and which are converted to MIME will be
242c2aa98e2SPeter Wemm			labeled with this character set.
243c2aa98e2SPeter WemmLOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
244c2aa98e2SPeter WemmLOCAL_SHELL_FLAGS	[eu9] The flags used by the shell mailer.  The
245c2aa98e2SPeter Wemm			flags lsDFM are always included.
246c2aa98e2SPeter WemmLOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
247c2aa98e2SPeter Wemm			mail.
248c2aa98e2SPeter WemmLOCAL_SHELL_DIR		[$z:/] The directory search path in which the
249c2aa98e2SPeter Wemm			shell should run.
250c2aa98e2SPeter WemmUSENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
251c2aa98e2SPeter Wemm			used to submit news.
252c2aa98e2SPeter WemmUSENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
253c2aa98e2SPeter WemmUSENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
254c2aa98e2SPeter Wemm			usenet mailer.
255c2aa98e2SPeter WemmUSENET_MAILER_MAX	[100000] The maximum size of messages that will
256c2aa98e2SPeter Wemm			be accepted by the usenet mailer.
257c2aa98e2SPeter WemmSMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
258c2aa98e2SPeter Wemm			flags are `mDFMUX' for all SMTP-based mailers; the
259c2aa98e2SPeter Wemm			"esmtp" mailer adds `a' and "smtp8" adds `8'.
260c2aa98e2SPeter WemmSMTP_MAILER_MAX		[undefined] The maximum size of messages that will
261c2aa98e2SPeter Wemm			be transported using the smtp, smtp8, or esmtp
262c2aa98e2SPeter Wemm			mailers.
263c2aa98e2SPeter WemmSMTP_MAILER_ARGS	[IPC $h] The arguments passed to the smtp mailer.
264c2aa98e2SPeter Wemm			About the only reason you would want to change this
265c2aa98e2SPeter Wemm			would be to change the default port.
266c2aa98e2SPeter WemmESMTP_MAILER_ARGS	[IPC $h] The arguments passed to the esmtp mailer.
267c2aa98e2SPeter WemmSMTP8_MAILER_ARGS	[IPC $h] The arguments passed to the smtp8 mailer.
268c2aa98e2SPeter WemmRELAY_MAILER_ARGS	[IPC $h] The arguments passed to the relay mailer.
269c2aa98e2SPeter WemmSMTP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
270c2aa98e2SPeter Wemm			that ARRIVE from an address that resolves to one of
271c2aa98e2SPeter Wemm			the SMTP mailers and which are converted to MIME will
272c2aa98e2SPeter Wemm			be labeled with this character set.
273c2aa98e2SPeter WemmUUCP_MAILER_PATH	[/usr/bin/uux] The program used to send UUCP mail.
274c2aa98e2SPeter WemmUUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
275c2aa98e2SPeter Wemm			flags are `DFMhuU' (and `m' for uucp-new mailer,
276c2aa98e2SPeter Wemm			minus `U' for uucp-dom mailer).
277c2aa98e2SPeter WemmUUCP_MAILER_ARGS	[uux - -r -z -a$g -gC $h!rmail ($u)] The arguments
278c2aa98e2SPeter Wemm			passed to the UUCP mailer.
279c2aa98e2SPeter WemmUUCP_MAILER_MAX		[100000] The maximum size message accepted for
280c2aa98e2SPeter Wemm			transmission by the UUCP mailers.
281c2aa98e2SPeter WemmUUCP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
282c2aa98e2SPeter Wemm			that ARRIVE from an address that resolves to one of
283c2aa98e2SPeter Wemm			the UUCP mailers and which are converted to MIME will
284c2aa98e2SPeter Wemm			be labeled with this character set.
285c2aa98e2SPeter WemmFAX_MAILER_PATH		[/usr/local/lib/fax/mailfax] The program used to
286c2aa98e2SPeter Wemm			submit FAX messages.
287c2aa98e2SPeter WemmFAX_MAILER_ARGS		[mailfax $u $h $f] The arguments passed to the FAX
288c2aa98e2SPeter Wemm			mailer.
289c2aa98e2SPeter WemmFAX_MAILER_MAX		[100000] The maximum size message accepted for
290c2aa98e2SPeter Wemm			transmission by FAX.
291c2aa98e2SPeter WemmPOP_MAILER_PATH		[/usr/lib/mh/spop] The pathname of the POP mailer.
292c2aa98e2SPeter WemmPOP_MAILER_FLAGS	[Penu] Flags added to POP mailer.  Flags "lsDFM"
293c2aa98e2SPeter Wemm			are always added.
294c2aa98e2SPeter WemmPOP_MAILER_ARGS		[pop $u] The arguments passed to the POP mailer.
295c2aa98e2SPeter WemmPROCMAIL_MAILER_PATH	[/usr/local/bin/procmail] The path to the procmail
296c2aa98e2SPeter Wemm			program.  This is also used by FEATURE(local_procmail).
297c2aa98e2SPeter WemmPROCMAIL_MAILER_FLAGS	[SPhnu9] Flags added to Procmail mailer.  Flags
298c2aa98e2SPeter Wemm			``DFM'' are always set.  This is NOT used by
299c2aa98e2SPeter Wemm			FEATURE(local_procmail); tweak LOCAL_MAILER_FLAGS
300c2aa98e2SPeter Wemm			instead.
301c2aa98e2SPeter WemmPROCMAIL_MAILER_ARGS	[procmail -Y -m $h $f $u] The arguments passed to
302c2aa98e2SPeter Wemm			the Procmail mailer.  This is NOT used by
303c2aa98e2SPeter Wemm			FEATURE(local_procmail); tweak LOCAL_MAILER_ARGS
304c2aa98e2SPeter Wemm			instead.
305c2aa98e2SPeter WemmPROCMAIL_MAILER_MAX	[undefined] If set, the maximum size message that
306c2aa98e2SPeter Wemm			will be accepted by the procmail mailer.
307c2aa98e2SPeter WemmMAIL11_MAILER_PATH	[/usr/etc/mail11] The path to the mail11 mailer.
308c2aa98e2SPeter WemmMAIL11_MAILER_FLAGS	[nsFx] Flags for the mail11 mailer.
309c2aa98e2SPeter WemmMAIL11_MAILER_ARGS	[mail11 $g $x $h $u] Arguments passed to the mail11
310c2aa98e2SPeter Wemm			mailer.
311c2aa98e2SPeter WemmPH_MAILER_PATH		[/usr/local/etc/phquery] The path to the phquery
312c2aa98e2SPeter Wemm			program.
313c2aa98e2SPeter WemmPH_MAILER_FLAGS		[ehmu] Flags for the phquery mailer.
314c2aa98e2SPeter WemmPH_MAILER_ARGS		[phquery -- $u] -- arguments to the phquery mailer.
315c2aa98e2SPeter WemmCYRUS_MAILER_FLAGS	[A5@/:|] The flags used by the cyrus mailer.  The
316c2aa98e2SPeter Wemm			flags lsDFMnPq are always included.
317c2aa98e2SPeter WemmCYRUS_MAILER_PATH	[/usr/cyrus/bin/deliver] The program used to deliver
318c2aa98e2SPeter Wemm			cyrus mail.
319c2aa98e2SPeter WemmCYRUS_MAILER_ARGS	[deliver -e -m $h -- $u] The arguments passed
320c2aa98e2SPeter Wemm			to deliver cyrus mail.
321c2aa98e2SPeter WemmCYRUS_MAILER_MAX	[undefined] If set, the maximum size message that
322c2aa98e2SPeter Wemm			will be accepted by the cyrus mailer.
323c2aa98e2SPeter WemmCYRUS_MAILER_USER	[cyrus:mail] The user and group to become when
324c2aa98e2SPeter Wemm			running the cyrus mailer.
325c2aa98e2SPeter WemmCYRUS_BB_MAILER_FLAGS	[undefined] The flags used by the cyrusbb
326c2aa98e2SPeter Wemm			mailer. The flags lsDFMnP are always included.
327c2aa98e2SPeter WemmCYRUS_BB_MAILER_ARGS	[deliver -e -m $u] The arguments passed
328c2aa98e2SPeter Wemm			to deliver cyrusbb mail.
329c2aa98e2SPeter WemmconfEBINDIR		[/usr/libexec] The directory for executables.
330c2aa98e2SPeter Wemm			Currently used for FEATURE(local_lmtp) and
331c2aa98e2SPeter Wemm			FEATURE(smrsh).
332c2aa98e2SPeter Wemm
333c2aa98e2SPeter Wemm
334c2aa98e2SPeter Wemm
335c2aa98e2SPeter Wemm+---------+
336c2aa98e2SPeter Wemm| DOMAINS |
337c2aa98e2SPeter Wemm+---------+
338c2aa98e2SPeter Wemm
339c2aa98e2SPeter WemmYou will probably want to collect domain-dependent defines into one
340c2aa98e2SPeter Wemmfile, referenced by the DOMAIN macro.  For example, our Berkeley
341c2aa98e2SPeter Wemmdomain file includes definitions for several internal distinguished
342c2aa98e2SPeter Wemmhosts:
343c2aa98e2SPeter Wemm
344c2aa98e2SPeter WemmUUCP_RELAY	The host that will accept UUCP-addressed email.
345c2aa98e2SPeter Wemm		If not defined, all UUCP sites must be directly
346c2aa98e2SPeter Wemm		connected.
347c2aa98e2SPeter WemmBITNET_RELAY	The host that will accept BITNET-addressed email.
348c2aa98e2SPeter Wemm		If not defined, the .BITNET pseudo-domain won't work.
349c2aa98e2SPeter WemmDECNET_RELAY	The host that will accept DECNET-addressed email.
350c2aa98e2SPeter Wemm		If not defined, the .DECNET pseudo-domain and addresses
351c2aa98e2SPeter Wemm		of the form node::user will not work.
352c2aa98e2SPeter WemmFAX_RELAY	The host that will accept mail to the .FAX pseudo-domain.
353c2aa98e2SPeter Wemm		The "fax" mailer overrides this value.
354c2aa98e2SPeter WemmLOCAL_RELAY	DEPRECATED.  The site that will handle unqualified
355c2aa98e2SPeter Wemm		names -- that is, names with out an @domain extension.
356c2aa98e2SPeter Wemm		If not set, they are assumed to belong on this machine.
357c2aa98e2SPeter Wemm		This allows you to have a central site to store a
358c2aa98e2SPeter Wemm		company- or department-wide alias database.  This
359c2aa98e2SPeter Wemm		only works at small sites, and only with some user
360c2aa98e2SPeter Wemm		agents.
361c2aa98e2SPeter WemmLUSER_RELAY	The site that will handle lusers -- that is, apparently
362c2aa98e2SPeter Wemm		local names that aren't local accounts or aliases.
363c2aa98e2SPeter Wemm
364c2aa98e2SPeter WemmAny of these can be either ``mailer:hostname'' (in which case the
365c2aa98e2SPeter Wemmmailer is the internal mailer name, such as ``uucp-new'' and the hostname
366c2aa98e2SPeter Wemmis the name of the host as appropriate for that mailer) or just a
367c2aa98e2SPeter Wemm``hostname'', in which case a default mailer type (usually ``relay'',
368c2aa98e2SPeter Wemma variant on SMTP) is used.  WARNING: if you have a wildcard MX
369c2aa98e2SPeter Wemmrecord matching your domain, you probably want to define these to
370c2aa98e2SPeter Wemmhave a trailing dot so that you won't get the mail diverted back
371c2aa98e2SPeter Wemmto yourself.
372c2aa98e2SPeter Wemm
373c2aa98e2SPeter WemmThe domain file can also be used to define a domain name, if needed
374c2aa98e2SPeter Wemm(using "DD<domain>") and set certain site-wide features.  If all hosts
375c2aa98e2SPeter Wemmat your site masquerade behind one email name, you could also use
376c2aa98e2SPeter WemmMASQUERADE_AS here.
377c2aa98e2SPeter Wemm
378c2aa98e2SPeter WemmYou do not have to define a domain -- in particular, if you are a
379c2aa98e2SPeter Wemmsingle machine sitting off somewhere, it is probably more work than
380c2aa98e2SPeter Wemmit's worth.  This is just a mechanism for combining "domain dependent
381c2aa98e2SPeter Wemmknowledge" into one place.
382c2aa98e2SPeter Wemm
383c2aa98e2SPeter Wemm+---------+
384c2aa98e2SPeter Wemm| MAILERS |
385c2aa98e2SPeter Wemm+---------+
386c2aa98e2SPeter Wemm
387c2aa98e2SPeter WemmThere are fewer mailers supported in this version than the previous
388c2aa98e2SPeter Wemmversion, owing mostly to a simpler world.  As a general rule, put the
389c2aa98e2SPeter WemmMAILER definitions last in your .mc file, and always put MAILER(smtp)
390c2aa98e2SPeter Wemmbefore MAILER(uucp) -- several features and definitions will modify
391c2aa98e2SPeter Wemmthe definition of mailers, and the smtp mailer modifies the UUCP
392c2aa98e2SPeter Wemmmailer.
393c2aa98e2SPeter Wemm
394c2aa98e2SPeter Wemmlocal		The local and prog mailers.  You will almost always
395c2aa98e2SPeter Wemm		need these; the only exception is if you relay ALL
396c2aa98e2SPeter Wemm		your mail to another site.  This mailer is included
397c2aa98e2SPeter Wemm		automatically.
398c2aa98e2SPeter Wemm
399c2aa98e2SPeter Wemmsmtp		The Simple Mail Transport Protocol mailer.  This does
400c2aa98e2SPeter Wemm		not hide hosts behind a gateway or another other
401c2aa98e2SPeter Wemm		such hack; it assumes a world where everyone is
402c2aa98e2SPeter Wemm		running the name server.  This file actually defines
403c2aa98e2SPeter Wemm		four mailers: "smtp" for regular (old-style) SMTP to
404c2aa98e2SPeter Wemm		other servers, "esmtp" for extended SMTP to other
405c2aa98e2SPeter Wemm		servers, "smtp8" to do SMTP to other servers without
406c2aa98e2SPeter Wemm		converting 8-bit data to MIME (essentially, this is
407c2aa98e2SPeter Wemm		your statement that you know the other end is 8-bit
408c2aa98e2SPeter Wemm		clean even if it doesn't say so), and "relay" for
409c2aa98e2SPeter Wemm		transmission to our RELAY_HOST, LUSER_RELAY, or
410c2aa98e2SPeter Wemm		MAILER_HUB.
411c2aa98e2SPeter Wemm
412c2aa98e2SPeter Wemmuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
413c2aa98e2SPeter Wemm		defines two mailers, "uucp-old" (a.k.a. "uucp") and
414c2aa98e2SPeter Wemm		"uucp-new" (a.k.a. "suucp").  The latter is for when you
415c2aa98e2SPeter Wemm		know that the UUCP mailer at the other end can handle
416c2aa98e2SPeter Wemm		multiple recipients in one transfer.  If the smtp mailer
417c2aa98e2SPeter Wemm		is also included in your configuration, two other mailers
418c2aa98e2SPeter Wemm		("uucp-dom" and "uucp-uudom") are also defined [warning:
419c2aa98e2SPeter Wemm		you MUST specify MAILER(smtp) before MAILER(uucp)].  When you
420c2aa98e2SPeter Wemm		include the uucp mailer, sendmail looks for all names in
421c2aa98e2SPeter Wemm		the $=U class and sends them to the uucp-old mailer; all
422c2aa98e2SPeter Wemm		names in the $=Y class are sent to uucp-new; and all
423c2aa98e2SPeter Wemm		names in the $=Z class are sent to uucp-uudom.  Note that
424c2aa98e2SPeter Wemm		this is a function of what version of rmail runs on
425c2aa98e2SPeter Wemm		the receiving end, and hence may be out of your control.
426c2aa98e2SPeter Wemm		See the section below describing UUCP mailers in more
427c2aa98e2SPeter Wemm		detail.
428c2aa98e2SPeter Wemm
429c2aa98e2SPeter Wemmusenet		Usenet (network news) delivery.  If this is specified,
430c2aa98e2SPeter Wemm		an extra rule is added to ruleset 0 that forwards all
431c2aa98e2SPeter Wemm		local email for users named ``group.usenet'' to the
432c2aa98e2SPeter Wemm		``inews'' program.  Note that this works for all groups,
433c2aa98e2SPeter Wemm		and may be considered a security problem.
434c2aa98e2SPeter Wemm
435c2aa98e2SPeter Wemmfax		Facsimile transmission.  This is experimental and based
436c2aa98e2SPeter Wemm		on Sam Leffler's HylaFAX software.  For more information,
437c2aa98e2SPeter Wemm		see http://www.vix.com/hylafax/.
438c2aa98e2SPeter Wemm
439c2aa98e2SPeter Wemmpop		Post Office Protocol.
440c2aa98e2SPeter Wemm
441c2aa98e2SPeter Wemmprocmail	An interface to procmail (does not come with sendmail).
442c2aa98e2SPeter Wemm		This is designed to be used in mailertables.  For example,
443c2aa98e2SPeter Wemm		a common question is "how do I forward all mail for a given
444c2aa98e2SPeter Wemm		domain to a single person?".  If you have this mailer
445c2aa98e2SPeter Wemm		defined, you could set up a mailertable reading:
446c2aa98e2SPeter Wemm
447c2aa98e2SPeter Wemm			host.com	procmail:/etc/procmailrcs/host.com
448c2aa98e2SPeter Wemm
449c2aa98e2SPeter Wemm		with the file /etc/procmailrcs/host.com reading:
450c2aa98e2SPeter Wemm
451c2aa98e2SPeter Wemm			:0	# forward mail for host.com
452c2aa98e2SPeter Wemm			! -oi -f $1 person@other.host
453c2aa98e2SPeter Wemm
454c2aa98e2SPeter Wemm		This would arrange for (anything)@host.com to be sent
455c2aa98e2SPeter Wemm		to person@other.host.  Within the procmail script, $1 is
456c2aa98e2SPeter Wemm		the name of the sender and $2 is the name of the recipient.
457c2aa98e2SPeter Wemm		If you use this with FEATURE(local_procmail), the FEATURE
458c2aa98e2SPeter Wemm		should be listed first.
459c2aa98e2SPeter Wemm
460c2aa98e2SPeter Wemmmail11		The DECnet mail11 mailer, useful only if you have the mail11
461c2aa98e2SPeter Wemm		program from gatekeeper.dec.com:/pub/DEC/gwtools (and
462c2aa98e2SPeter Wemm		DECnet, of course).  This is for Phase IV DECnet support;
463c2aa98e2SPeter Wemm		if you have Phase V at your site you may have additional
464c2aa98e2SPeter Wemm		problems.
465c2aa98e2SPeter Wemm
466c2aa98e2SPeter Wemmphquery		The phquery program.  This is somewhat counterintuitively
467c2aa98e2SPeter Wemm		referenced as the "ph" mailer internally.  It can be used
468c2aa98e2SPeter Wemm		to do CCSO name server lookups.  The phquery program, which
469c2aa98e2SPeter Wemm		this mailer uses, is distributed with the ph client.
470c2aa98e2SPeter Wemm
471c2aa98e2SPeter Wemmcyrus		The cyrus and cyrusbb mailers.  The cyrus mailer delivers to
472c2aa98e2SPeter Wemm		a local cyrus user.  this mailer can make use of the
473c2aa98e2SPeter Wemm		"user+detail@local.host" syntax; it will deliver the mail to
474c2aa98e2SPeter Wemm		the user's "detail" mailbox if the mailbox's ACL permits.
475c2aa98e2SPeter Wemm		The cyrusbb mailer delivers to a system-wide cyrus mailbox
476c2aa98e2SPeter Wemm		if the mailbox's ACL permits.
477c2aa98e2SPeter Wemm
478c2aa98e2SPeter Wemm
479c2aa98e2SPeter WemmThe local mailer accepts addresses of the form "user+detail", where
480c2aa98e2SPeter Wemmthe "+detail" is not used for mailbox matching but is available
481c2aa98e2SPeter Wemmto certain local mail programs (in particular, see FEATURE(local_procmail)).
482c2aa98e2SPeter WemmFor example, "eric", "eric+sendmail", and "eric+sww" all indicate
483c2aa98e2SPeter Wemmthe same user, but additional arguments <null>, "sendmail", and "sww"
484c2aa98e2SPeter Wemmmay be provided for use in sorting mail.
485c2aa98e2SPeter Wemm
486c2aa98e2SPeter Wemm
487c2aa98e2SPeter Wemm+----------+
488c2aa98e2SPeter Wemm| FEATURES |
489c2aa98e2SPeter Wemm+----------+
490c2aa98e2SPeter Wemm
491c2aa98e2SPeter WemmSpecial features can be requested using the "FEATURE" macro.  For
492c2aa98e2SPeter Wemmexample, the .mc line:
493c2aa98e2SPeter Wemm
494c2aa98e2SPeter Wemm	FEATURE(use_cw_file)
495c2aa98e2SPeter Wemm
496c2aa98e2SPeter Wemmtells sendmail that you want to have it read an /etc/sendmail.cw
497c2aa98e2SPeter Wemmfile to get values for class $=w.  The FEATURE may contain a single
498c2aa98e2SPeter Wemmoptional parameter -- for example:
499c2aa98e2SPeter Wemm
500c2aa98e2SPeter Wemm	FEATURE(mailertable, dbm /usr/lib/mailertable)
501c2aa98e2SPeter Wemm
502c2aa98e2SPeter WemmThe default database map type for the table features can be set with
503c2aa98e2SPeter Wemm
504c2aa98e2SPeter Wemm	define(`DATABASE_MAP_TYPE', `dbm')
505c2aa98e2SPeter Wemm
506c2aa98e2SPeter Wemmwhich would set it to use ndbm databases.  The default is the Berkeley DB
507c2aa98e2SPeter Wemmhash database format.  Note that you must still declare a database map type
508c2aa98e2SPeter Wemmif you specify an argument to a FEATURE.  DATABASE_MAP_TYPE is only used
509c2aa98e2SPeter Wemmif no argument is given for the FEATURE.
510c2aa98e2SPeter Wemm
511c2aa98e2SPeter WemmAvailable features are:
512c2aa98e2SPeter Wemm
513c2aa98e2SPeter Wemmuse_cw_file	Read the file /etc/sendmail.cw file to get alternate
514c2aa98e2SPeter Wemm		names for this host.  This might be used if you were
515c2aa98e2SPeter Wemm		on a host that MXed for a dynamic set of other
516c2aa98e2SPeter Wemm		hosts.  If the set is static, just including the line
517c2aa98e2SPeter Wemm		"Cw<name1> <name2> ..." (where the names are fully
518c2aa98e2SPeter Wemm		qualified domain names) is probably superior.
519c2aa98e2SPeter Wemm		The actual filename can be overridden by redefining
520c2aa98e2SPeter Wemm		confCW_FILE.
521c2aa98e2SPeter Wemm
522c2aa98e2SPeter Wemmuse_ct_file	Read the file /etc/sendmail.ct file to get the names
523c2aa98e2SPeter Wemm		of users that will be ``trusted'', that is, able to
524c2aa98e2SPeter Wemm		set their envelope from address using -f without
525c2aa98e2SPeter Wemm		generating a warning message.
526c2aa98e2SPeter Wemm		The actual filename can be overridden by redefining
527c2aa98e2SPeter Wemm		confCT_FILE.
528c2aa98e2SPeter Wemm
529c2aa98e2SPeter Wemmredirect	Reject all mail addressed to "address.REDIRECT" with
530c2aa98e2SPeter Wemm		a ``551 User not local; please try <address>'' message.
531c2aa98e2SPeter Wemm		If this is set, you can alias people who have left
532c2aa98e2SPeter Wemm		to their new address with ".REDIRECT" appended.
533c2aa98e2SPeter Wemm
534c2aa98e2SPeter Wemmnouucp		Don't do anything special with UUCP addresses at all.
535c2aa98e2SPeter Wemm
536c2aa98e2SPeter Wemmnocanonify	Don't pass addresses to $[ ... $] for canonification.
537c2aa98e2SPeter Wemm		This would generally only be used by sites that only
538c2aa98e2SPeter Wemm		act as mail gateways or which have user agents that do
539c2aa98e2SPeter Wemm		full canonification themselves.  You may also want to
540c2aa98e2SPeter Wemm		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
541c2aa98e2SPeter Wemm		turn off the usual resolver options that do a similar
542c2aa98e2SPeter Wemm		thing.
543c2aa98e2SPeter Wemm
544c2aa98e2SPeter Wemmstickyhost	If set, email sent to "user@local.host" are marked
545c2aa98e2SPeter Wemm		as "sticky" -- that is, the local addresses aren't
546c2aa98e2SPeter Wemm		matched against UDB and don't go through ruleset 5.
547c2aa98e2SPeter Wemm		This is used if you want a set up where "user" is
548c2aa98e2SPeter Wemm		not necessarily the same as "user@local.host", e.g.,
549c2aa98e2SPeter Wemm		to make a distinct domain-wide namespace.  Prior to
550c2aa98e2SPeter Wemm		8.7 this was the default, and notsticky was used to
551c2aa98e2SPeter Wemm		turn this off.
552c2aa98e2SPeter Wemm
553c2aa98e2SPeter Wemmmailertable	Include a "mailer table" which can be used to override
554c2aa98e2SPeter Wemm		routing for particular domains.  The argument of the
555c2aa98e2SPeter Wemm		FEATURE may be the key definition.  If none is specified,
556c2aa98e2SPeter Wemm		the definition used is:
557c2aa98e2SPeter Wemm			hash -o /etc/mailertable
558c2aa98e2SPeter Wemm		Keys in this database are fully qualified domain names
559c2aa98e2SPeter Wemm		or partial domains preceded by a dot -- for example,
560c2aa98e2SPeter Wemm		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
561c2aa98e2SPeter Wemm		Values must be of the form:
562c2aa98e2SPeter Wemm			mailer:domain
563c2aa98e2SPeter Wemm		where "mailer" is the internal mailer name, and "domain"
564c2aa98e2SPeter Wemm		is where to send the message.  These maps are not
565c2aa98e2SPeter Wemm		reflected into the message header.  As a special case,
566c2aa98e2SPeter Wemm		the forms:
567c2aa98e2SPeter Wemm			local:user
568c2aa98e2SPeter Wemm		will forward to the indicated user using the local mailer,
569c2aa98e2SPeter Wemm			local:
570c2aa98e2SPeter Wemm		will forward to the original user in the e-mail address
571c2aa98e2SPeter Wemm		using the local mailer, and
572c2aa98e2SPeter Wemm			error:code message
573c2aa98e2SPeter Wemm		will give an error message with the indicated code and
574c2aa98e2SPeter Wemm		message.
575c2aa98e2SPeter Wemm
576c2aa98e2SPeter Wemmdomaintable	Include a "domain table" which can be used to provide
577c2aa98e2SPeter Wemm		domain name mapping.  Use of this should really be
578c2aa98e2SPeter Wemm		limited to your own domains.  It may be useful if you
579c2aa98e2SPeter Wemm		change names (e.g., your company changes names from
580c2aa98e2SPeter Wemm		oldname.com to newname.com).  The argument of the
581c2aa98e2SPeter Wemm		FEATURE may be the key definition.  If none is specified,
582c2aa98e2SPeter Wemm		the definition used is:
583c2aa98e2SPeter Wemm			hash -o /etc/domaintable
584c2aa98e2SPeter Wemm		The key in this table is the domain name; the value is
585c2aa98e2SPeter Wemm		the new (fully qualified) domain.  Anything in the
586c2aa98e2SPeter Wemm		domaintable is reflected into headers; that is, this
587c2aa98e2SPeter Wemm		is done in ruleset 3.
588c2aa98e2SPeter Wemm
589c2aa98e2SPeter Wemmbitdomain	Look up bitnet hosts in a table to try to turn them into
590c2aa98e2SPeter Wemm		internet addresses.  The table can be built using the
591c2aa98e2SPeter Wemm		bitdomain program contributed by John Gardiner Myers.
592c2aa98e2SPeter Wemm		The argument of the FEATURE may be the key definition; if
593c2aa98e2SPeter Wemm		none is specified, the definition used is:
594c2aa98e2SPeter Wemm			hash -o /etc/bitdomain.db
595c2aa98e2SPeter Wemm		Keys are the bitnet hostname; values are the corresponding
596c2aa98e2SPeter Wemm		internet hostname.
597c2aa98e2SPeter Wemm
598c2aa98e2SPeter Wemmuucpdomain	Similar feature for UUCP hosts.  The default map definition
599c2aa98e2SPeter Wemm		is:
600c2aa98e2SPeter Wemm			hash -o /etc/uudomain.db
601c2aa98e2SPeter Wemm		At the moment there is no automagic tool to build this
602c2aa98e2SPeter Wemm		database.
603c2aa98e2SPeter Wemm
604c2aa98e2SPeter Wemmalways_add_domain
605c2aa98e2SPeter Wemm		Include the local host domain even on locally delivered
606c2aa98e2SPeter Wemm		mail.  Normally it is not added on unqualified names.
607c2aa98e2SPeter Wemm		However, if you use a shared message store but do not use
608c2aa98e2SPeter Wemm		the same user name space everywhere, you may need the host
609c2aa98e2SPeter Wemm		name on local names.
610c2aa98e2SPeter Wemm
611c2aa98e2SPeter Wemmallmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
612c2aa98e2SPeter Wemm		feature will cause recipient addresses to also masquerade
613c2aa98e2SPeter Wemm		as being from the masquerade host.  Normally they get
614c2aa98e2SPeter Wemm		the local hostname.  Although this may be right for
615c2aa98e2SPeter Wemm		ordinary users, it can break local aliases.  For example,
616c2aa98e2SPeter Wemm		if you send to "localalias", the originating sendmail will
617c2aa98e2SPeter Wemm		find that alias and send to all members, but send the
618c2aa98e2SPeter Wemm		message with "To: localalias@masqueradehost".  Since that
619c2aa98e2SPeter Wemm		alias likely does not exist, replies will fail.  Use this
620c2aa98e2SPeter Wemm		feature ONLY if you can guarantee that the ENTIRE
621c2aa98e2SPeter Wemm		namespace on your masquerade host supersets all the
622c2aa98e2SPeter Wemm		local entries.
623c2aa98e2SPeter Wemm
624c2aa98e2SPeter Wemmlimited_masquerade
625c2aa98e2SPeter Wemm		Normally, any hosts listed in $=w are masqueraded.  If this
626c2aa98e2SPeter Wemm		feature is given, only the hosts listed in $=M are masqueraded.
627c2aa98e2SPeter Wemm		This is useful if you have several domains with disjoint
628c2aa98e2SPeter Wemm		namespaces hosted on the same machine.
629c2aa98e2SPeter Wemm
630c2aa98e2SPeter Wemmmasquerade_entire_domain
631c2aa98e2SPeter Wemm		If masquerading is enabled (using MASQUERADE_AS) and
632c2aa98e2SPeter Wemm		MASQUERADE_DOMAIN (see below) is set, this feature will
633c2aa98e2SPeter Wemm		cause addresses to be rewritten such that the masquerading
634c2aa98e2SPeter Wemm		domains are actually entire domains to be hidden.  All
635c2aa98e2SPeter Wemm		hosts within the masquerading domains will be rewritten
636c2aa98e2SPeter Wemm		to the masquerade name (used in MASQUERADE_AS).  For example,
637c2aa98e2SPeter Wemm		if you have:
638c2aa98e2SPeter Wemm
639c2aa98e2SPeter Wemm			MASQUERADE_AS(masq.com)
640c2aa98e2SPeter Wemm			MASQUERADE_DOMAIN(foo.org)
641c2aa98e2SPeter Wemm			MASQUERADE_DOMAIN(bar.com)
642c2aa98e2SPeter Wemm
643c2aa98e2SPeter Wemm		then *foo.org and *bar.com are converted to masq.com.  Without
644c2aa98e2SPeter Wemm		this feature, only foo.org and bar.com are masqueraded.
645c2aa98e2SPeter Wemm
646c2aa98e2SPeter Wemm		    NOTE: only domains within your jurisdiction and
647c2aa98e2SPeter Wemm		    current hierarchy should be masqueraded using this.
648c2aa98e2SPeter Wemm
649c2aa98e2SPeter Wemmgenericstable	This feature will cause certain addresses originating locally
650c2aa98e2SPeter Wemm		(i.e. that are unqualified) or a domain listed in $=G to be
651c2aa98e2SPeter Wemm		looked up in a map and turned into another ("generic") form,
652c2aa98e2SPeter Wemm		which can change both the domain name and the user name.  This
653c2aa98e2SPeter Wemm		is similar to the userdb functionality.  The same types of
654c2aa98e2SPeter Wemm		addresses as for masquerading are looked up, i.e. only header
655c2aa98e2SPeter Wemm		sender addresses unless the allmasquerade and/or
656c2aa98e2SPeter Wemm		masquerade_envelope features are given.  Qualified addresses
657c2aa98e2SPeter Wemm		must have the domain part in the list of names given by the
658c2aa98e2SPeter Wemm		by the macros GENERICS_DOMAIN or GENERICS_DOMAIN_FILE
659c2aa98e2SPeter Wemm		(analogously to MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE,
660c2aa98e2SPeter Wemm		see below).
661c2aa98e2SPeter Wemm
662c2aa98e2SPeter Wemm		The argument of FEATURE(genericstable) may be the map
663c2aa98e2SPeter Wemm		definition; the default map definition is:
664c2aa98e2SPeter Wemm
665c2aa98e2SPeter Wemm			hash -o /etc/genericstable
666c2aa98e2SPeter Wemm
667c2aa98e2SPeter Wemm		The key for this table is either the full address or the
668c2aa98e2SPeter Wemm		unqualified username (the former is tried first); the
669c2aa98e2SPeter Wemm		value is the new user address.  If the new user address does
670c2aa98e2SPeter Wemm		not include a domain, it will be qualified in the standard
671c2aa98e2SPeter Wemm		manner, i.e. using $j or the masquerade name.  Note that the
672c2aa98e2SPeter Wemm		address being looked up must be fully qualified.  For local
673c2aa98e2SPeter Wemm		mail, it is necessary to use FEATURE(always_add_domain) for
674c2aa98e2SPeter Wemm		the addresses to be qualified.
675c2aa98e2SPeter Wemm
676c2aa98e2SPeter Wemmvirtusertable	A domain-specific form of aliasing, allowing multiple
677c2aa98e2SPeter Wemm		virtual domains to be hosted on one machine.  For example,
678c2aa98e2SPeter Wemm		if the virtuser table contained:
679c2aa98e2SPeter Wemm
680c2aa98e2SPeter Wemm			info@foo.com	foo-info
681c2aa98e2SPeter Wemm			info@bar.com	bar-info
682c2aa98e2SPeter Wemm			@baz.org	jane@elsewhere.net
683c2aa98e2SPeter Wemm
684c2aa98e2SPeter Wemm		then mail addressed to info@foo.com will be sent to the
685c2aa98e2SPeter Wemm		address foo-info, mail addressed to info@bar.com will be
686c2aa98e2SPeter Wemm		delivered to bar-info, and mail addressed to anyone at
687c2aa98e2SPeter Wemm		baz.org will be sent to jane@elsewhere.net.  The username
688c2aa98e2SPeter Wemm		from the original address is passed as %1 allowing:
689c2aa98e2SPeter Wemm
690c2aa98e2SPeter Wemm			@foo.org	%1@elsewhere.com
691c2aa98e2SPeter Wemm
692c2aa98e2SPeter Wemm		meaning someone@foo.org will be sent to someone@elsewhere.com.
693c2aa98e2SPeter Wemm
694c2aa98e2SPeter Wemm		All the host names on the left hand side (foo.com, bar.com,
695c2aa98e2SPeter Wemm		and baz.org) must be in $=w.  The default map definition is:
696c2aa98e2SPeter Wemm
697c2aa98e2SPeter Wemm			hash -o /etc/virtusertable
698c2aa98e2SPeter Wemm
699c2aa98e2SPeter Wemm		A new definition can be specified as the second argument of
700c2aa98e2SPeter Wemm		the FEATURE macro, such as
701c2aa98e2SPeter Wemm
702c2aa98e2SPeter Wemm			FEATURE(virtusertable, dbm -o /etc/mail/virtusers)
703c2aa98e2SPeter Wemm
704c2aa98e2SPeter Wemmnodns		We aren't running DNS at our site (for example,
705c2aa98e2SPeter Wemm		we are UUCP-only connected).  It's hard to consider
706c2aa98e2SPeter Wemm		this a "feature", but hey, it had to go somewhere.
707c2aa98e2SPeter Wemm		Actually, as of 8.7 this is a no-op -- remove "dns" from
708c2aa98e2SPeter Wemm		the hosts service switch entry instead.
709c2aa98e2SPeter Wemm
710c2aa98e2SPeter Wemmnullclient	This is a special case -- it creates a stripped down
711c2aa98e2SPeter Wemm		configuration file containing nothing but support for
712c2aa98e2SPeter Wemm		forwarding all mail to a central hub via a local
713c2aa98e2SPeter Wemm		SMTP-based network.  The argument is the name of that
714c2aa98e2SPeter Wemm		hub.
715c2aa98e2SPeter Wemm
716c2aa98e2SPeter Wemm		The only other feature that should be used in conjunction
717c2aa98e2SPeter Wemm		with this one is "nocanonify" (this causes addresses to
718c2aa98e2SPeter Wemm		be sent unqualified via the SMTP connection; normally
719c2aa98e2SPeter Wemm		they are qualified with the masquerade name, which
720c2aa98e2SPeter Wemm		defaults to the name of the hub machine).  No mailers
721c2aa98e2SPeter Wemm		should be defined.  No aliasing or forwarding is done.
722065a643dSPeter Wemm		Also, note that absolutely no anti-spam or anti-relaying
723065a643dSPeter Wemm		is done in a null client configuration.  More information
724065a643dSPeter Wemm		can be found in the ANTI-SPAM CONFIGURATION CONTROL section.
725c2aa98e2SPeter Wemm
726c2aa98e2SPeter Wemmlocal_lmtp	Use an LMTP capable local mailer.  The argument to this
727c2aa98e2SPeter Wemm		feature is the pathname of an LMTP capable mailer.  By
728c2aa98e2SPeter Wemm		default, mail.local is used.  This is expected to be the
729c2aa98e2SPeter Wemm		mail.local which came with the 8.9 distribution which is
730c2aa98e2SPeter Wemm		LMTP capable.  The path to mail.local is set by the
731c2aa98e2SPeter Wemm		confEBINDIR m4 variable -- making the default
732c2aa98e2SPeter Wemm		LOCAL_MAILER_PATH /usr/libexec/mail.local.
733c2aa98e2SPeter Wemm
734c2aa98e2SPeter Wemmlocal_procmail	Use procmail as the local mailer.  This mailer can
735c2aa98e2SPeter Wemm		make use of the "user+indicator@local.host" syntax;
736c2aa98e2SPeter Wemm		normally the +indicator is just tossed, but by default
737c2aa98e2SPeter Wemm		it is passed as the -a argument to procmail.  The
738c2aa98e2SPeter Wemm		argument to this feature is the pathname of procmail,
739c2aa98e2SPeter Wemm		which defaults to PROCMAIL_MAILER_PATH.  Note that this
740c2aa98e2SPeter Wemm		does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS
741c2aa98e2SPeter Wemm		for the local mailer; tweak LOCAL_MAILER_FLAGS and
742c2aa98e2SPeter Wemm		LOCAL_MAILER_ARGS instead.
743c2aa98e2SPeter Wemm
744c2aa98e2SPeter Wemmbestmx_is_local	Accept mail as though locally addressed for any host that
745c2aa98e2SPeter Wemm		lists us as the best possible MX record.  This generates
746c2aa98e2SPeter Wemm		additional DNS traffic, but should be OK for low to
747c2aa98e2SPeter Wemm		medium traffic hosts.  The argument may be a set of
748c2aa98e2SPeter Wemm		domains, which will limit the feature to only apply to
749c2aa98e2SPeter Wemm		these domains -- this will reduce unnecessary DNS
750c2aa98e2SPeter Wemm		traffic.  THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH
751c2aa98e2SPeter Wemm		WILDCARD MX RECORDS!!!  If you have a wildcard MX record
752c2aa98e2SPeter Wemm		that matches your domain, you cannot use this feature.
753c2aa98e2SPeter Wemm
754c2aa98e2SPeter Wemmsmrsh		Use the SendMail Restricted SHell (smrsh) provided
755c2aa98e2SPeter Wemm		with the distribution instead of /bin/sh for mailing
756c2aa98e2SPeter Wemm		to programs.  This improves the ability of the local
757c2aa98e2SPeter Wemm		system administrator to control what gets run via
758c2aa98e2SPeter Wemm		e-mail.  If an argument is provided it is used as the
759c2aa98e2SPeter Wemm		pathname to smrsh; otherwise, the path defined by
760c2aa98e2SPeter Wemm		confEBINDIR is used for the smrsh binary -- by default,
761c2aa98e2SPeter Wemm		/usr/libexec/smrsh is assumed.
762c2aa98e2SPeter Wemm
763c2aa98e2SPeter Wemmpromiscuous_relay
764c2aa98e2SPeter Wemm		By default, the sendmail configuration files do not permit
765c2aa98e2SPeter Wemm		mail relaying (that is, accepting mail from outside your
766c2aa98e2SPeter Wemm		domain and sending it to another host outside your domain).
767c2aa98e2SPeter Wemm		This option sets your site to allow mail relaying from any
768c2aa98e2SPeter Wemm		site to any site.  In general, it is better to control the
769c2aa98e2SPeter Wemm		relaying more carefully with the access db and the 'R'
770c2aa98e2SPeter Wemm		class ($=R).  Domains can be added to class 'R' by the
771c2aa98e2SPeter Wemm		macros RELAY_DOMAIN or RELAY_DOMAIN_FILE (analogously to
772c2aa98e2SPeter Wemm		MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below).
773c2aa98e2SPeter Wemm
774c2aa98e2SPeter Wemmrelay_entire_domain
775c2aa98e2SPeter Wemm		By default, only hosts listed as RELAY in the access db
776c2aa98e2SPeter Wemm		will be allowed to relay.  This option also allows any
777c2aa98e2SPeter Wemm		host in your domain as defined by the 'm' class ($=m).
778c2aa98e2SPeter Wemm
779c2aa98e2SPeter Wemmrelay_hosts_only
780c2aa98e2SPeter Wemm		By default, names that are listed as RELAY in the access
781c2aa98e2SPeter Wemm		db and class 'R' ($=R) are domain names, not host names.
782c2aa98e2SPeter Wemm		For example, if you specify ``foo.com'', then mail to or
783c2aa98e2SPeter Wemm		from foo.com, abc.foo.com, or a.very.deep.domain.foo.com
784c2aa98e2SPeter Wemm		will all be accepted for relaying.  This feature changes
785c2aa98e2SPeter Wemm		the behaviour to lookup individual host names only.
786c2aa98e2SPeter Wemm
787c2aa98e2SPeter Wemmrelay_based_on_MX
788c2aa98e2SPeter Wemm		Turns on the ability to allow relaying based on the MX
789065a643dSPeter Wemm		records of the host portion of an incoming recipient; that
790065a643dSPeter Wemm		is, if an MX record for host foo.com points to your site,
791065a643dSPeter Wemm		you will accept and relay mail addressed to foo.com.  See
792c2aa98e2SPeter Wemm		description below for more information before using this
793065a643dSPeter Wemm		feature.  Also, see the KNOWNBUGS entry regarding bestmx
794065a643dSPeter Wemm		map lookups.
795065a643dSPeter Wemm
796065a643dSPeter Wemm		FEATURE(relay_based_on_MX) does not necessarily allow
797065a643dSPeter Wemm		routing of these messages which you expect to be allowed,
798065a643dSPeter Wemm		if route address syntax (or %-hack syntax) is used.  If
799065a643dSPeter Wemm		this is a problem, add entries to the access-table or use
800065a643dSPeter Wemm		FEATURE(loose_relay_check).
801c2aa98e2SPeter Wemm
802c2aa98e2SPeter Wemmrelay_local_from
803c2aa98e2SPeter Wemm		Allows relaying if the domain portion of the mail sender
804c2aa98e2SPeter Wemm		is a local host.  This should only be used if absolutely
805065a643dSPeter Wemm		necessary as it opens a window for spammers.  Specifically,
806065a643dSPeter Wemm		they can send mail to your mail server that claims to be
807065a643dSPeter Wemm		from your domain (either directly or via a routed address),
808065a643dSPeter Wemm		and you will go ahead and relay it out to arbitrary hosts
809065a643dSPeter Wemm		on the Internet.
810c2aa98e2SPeter Wemm
811c2aa98e2SPeter Wemmaccept_unqualified_senders
812c2aa98e2SPeter Wemm		Normally, MAIL FROM: commands in the SMTP session will be
813c2aa98e2SPeter Wemm		refused if the connection is a network connection and the
814c2aa98e2SPeter Wemm		sender address does not include a domain name.  If your
815c2aa98e2SPeter Wemm		setup sends local mail unqualified (i.e. MAIL FROM: <joe>),
816c2aa98e2SPeter Wemm		you will need to use this feature to accept unqualified
817c2aa98e2SPeter Wemm		sender addresses.
818c2aa98e2SPeter Wemm
819c2aa98e2SPeter Wemmaccept_unresolvable_domains
820c2aa98e2SPeter Wemm		Normally, MAIL FROM: commands in the SMTP session will be
821c2aa98e2SPeter Wemm		refused if the host part of the argument to MAIL FROM: cannot
822c2aa98e2SPeter Wemm		be located in the host name service (e.g., DNS).  If you are
823c2aa98e2SPeter Wemm		inside a firewall that has only a limited view of the
824c2aa98e2SPeter Wemm		Internet host name space, this could cause problems.  In this
825c2aa98e2SPeter Wemm		case you probably want to use this feature to accept all
826c2aa98e2SPeter Wemm		domains on input, even if they are unresolvable.
827c2aa98e2SPeter Wemm
828c2aa98e2SPeter Wemmaccess_db	Turns on the access database feature.  The access db gives
829c2aa98e2SPeter Wemm		you the ability to allow or refuse to accept mail from
830c2aa98e2SPeter Wemm		specified domains for administrative reasons.  By default,
831c2aa98e2SPeter Wemm		the access database specification is
832c2aa98e2SPeter Wemm		``hash -o /etc/mail/access''.  The format of the
833c2aa98e2SPeter Wemm		database is described below.
834c2aa98e2SPeter Wemm
835c2aa98e2SPeter Wemmblacklist_recipients
836c2aa98e2SPeter Wemm		Turns on the ability to block incoming mail for certain
837c2aa98e2SPeter Wemm		recipient usernames, hostnames, or addresses.  For
838c2aa98e2SPeter Wemm		example, you can block incoming mail to user nobody,
839c2aa98e2SPeter Wemm		host foo.mydomain.com, or guest@bar.mydomain.com.
840c2aa98e2SPeter Wemm		These specifications are put in the access db as
841c2aa98e2SPeter Wemm		described below.
842c2aa98e2SPeter Wemm
843c2aa98e2SPeter Wemmrbl		Turns on rejection of hosts found in the Realtime Blackhole
844c2aa98e2SPeter Wemm		List.  If an argument is provided it is used as the
845c2aa98e2SPeter Wemm                name sever to contact; otherwise, the main RBL server at
846c2aa98e2SPeter Wemm		rbl.maps.vix.com is used.  For details, see
847c2aa98e2SPeter Wemm		http://maps.vix.com/rbl/.
848c2aa98e2SPeter Wemm
849c2aa98e2SPeter Wemmloose_relay_check
850c2aa98e2SPeter Wemm		Normally, if a recipient using % addressing is used, e.g.
851c2aa98e2SPeter Wemm		user%site@othersite, and othersite is in class 'R', the
852c2aa98e2SPeter Wemm		check_rcpt ruleset will strip @othersite and recheck
853c2aa98e2SPeter Wemm		user@site for relaying.  This feature changes that
854c2aa98e2SPeter Wemm		behavior.  It should not be needed for most installations.
855c2aa98e2SPeter Wemm
856c2aa98e2SPeter Wemm
857c2aa98e2SPeter Wemm+-------+
858c2aa98e2SPeter Wemm| HACKS |
859c2aa98e2SPeter Wemm+-------+
860c2aa98e2SPeter Wemm
861c2aa98e2SPeter WemmSome things just can't be called features.  To make this clear,
862c2aa98e2SPeter Wemmthey go in the hack subdirectory and are referenced using the HACK
863c2aa98e2SPeter Wemmmacro.  These will tend to be site-dependent.  The release
864c2aa98e2SPeter Wemmincludes the Berkeley-dependent "cssubdomain" hack (that makes
865c2aa98e2SPeter Wemmsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
866c2aa98e2SPeter Wemmthis is intended as a short-term aid while we move hosts into
867c2aa98e2SPeter Wemmsubdomains.
868c2aa98e2SPeter Wemm
869c2aa98e2SPeter Wemm
870c2aa98e2SPeter Wemm+--------------------+
871c2aa98e2SPeter Wemm| SITE CONFIGURATION |
872c2aa98e2SPeter Wemm+--------------------+
873c2aa98e2SPeter Wemm
874c2aa98e2SPeter Wemm    *****************************************************
875c2aa98e2SPeter Wemm    * This section is really obsolete, and is preserved	*
876c2aa98e2SPeter Wemm    * only for back compatibility.  You should plan on	*
877c2aa98e2SPeter Wemm    * using mailertables for new installations.	  In	*
878c2aa98e2SPeter Wemm    * particular, it doesn't work for the newer forms	*
879c2aa98e2SPeter Wemm    * of UUCP mailers, such as uucp-uudom.		*
880c2aa98e2SPeter Wemm    *****************************************************
881c2aa98e2SPeter Wemm
882c2aa98e2SPeter WemmComplex sites will need more local configuration information, such as
883c2aa98e2SPeter Wemmlists of UUCP hosts they speak with directly.  This can get a bit more
884c2aa98e2SPeter Wemmtricky.  For an example of a "complex" site, see cf/ucbvax.mc.
885c2aa98e2SPeter Wemm
886c2aa98e2SPeter WemmIf your host is known by several different names, you need to augment
887c2aa98e2SPeter Wemmthe $=w class.  This is a list of names by which you are known, and
888c2aa98e2SPeter Wemmanything sent to an address using a host name in this list will be
889c2aa98e2SPeter Wemmtreated as local mail.  You can do this in two ways: either create
890c2aa98e2SPeter Wemmthe file /etc/sendmail.cw containing a list of your aliases (one per
891c2aa98e2SPeter Wemmline), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
892c2aa98e2SPeter Wemmline:
893c2aa98e2SPeter Wemm
894c2aa98e2SPeter Wemm	Cw alias.host.name
895c2aa98e2SPeter Wemm
896c2aa98e2SPeter Wemmat the end of that file.  See the ``vangogh.mc'' file for an example.
897c2aa98e2SPeter WemmBe sure you use the fully-qualified name of the host, rather than a
898c2aa98e2SPeter Wemmshort name.
899c2aa98e2SPeter Wemm
900c2aa98e2SPeter WemmThe SITECONFIG macro allows you to indirectly reference site-dependent
901c2aa98e2SPeter Wemmconfiguration information stored in the siteconfig subdirectory.  For
902c2aa98e2SPeter Wemmexample, the line
903c2aa98e2SPeter Wemm
904c2aa98e2SPeter Wemm	SITECONFIG(uucp.ucbvax, ucbvax, U)
905c2aa98e2SPeter Wemm
906c2aa98e2SPeter Wemmreads the file uucp.ucbvax for local connection information.  The
907c2aa98e2SPeter Wemmsecond parameter is the local name (in this case just "ucbvax" since
908c2aa98e2SPeter Wemmit is locally connected, and hence a UUCP hostname).  The third
909c2aa98e2SPeter Wemmparameter is the name of both a macro to store the local name (in
910c2aa98e2SPeter Wemmthis case, $U) and the name of the class (e.g., $=U) in which to store
911c2aa98e2SPeter Wemmthe host information read from the file.  Another SITECONFIG line reads
912c2aa98e2SPeter Wemm
913c2aa98e2SPeter Wemm	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
914c2aa98e2SPeter Wemm
915c2aa98e2SPeter WemmThis says that the file uucp.ucbarpa contains the list of UUCP sites
916c2aa98e2SPeter Wemmconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
917c2aa98e2SPeter Wemmstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
918c2aa98e2SPeter Wemmis, the name of the relay to which the hosts listed in uucp.ucbarpa
919c2aa98e2SPeter Wemmare connected.  [The machine ucbarpa is gone now, but I've left
920c2aa98e2SPeter Wemmthis out-of-date configuration file around to demonstrate how you
921c2aa98e2SPeter Wemmmight do this.]
922c2aa98e2SPeter Wemm
923c2aa98e2SPeter WemmNote that the case of SITECONFIG with a third parameter of ``U'' is
924c2aa98e2SPeter Wemmspecial; the second parameter is assumed to be the UUCP name of the
925c2aa98e2SPeter Wemmlocal site, rather than the name of a remote site, and the UUCP name
926c2aa98e2SPeter Wemmis entered into $=w (the list of local hostnames) as $U.UUCP.
927c2aa98e2SPeter Wemm
928c2aa98e2SPeter WemmThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
929c2aa98e2SPeter Wemmmore than a sequence of SITE macros describing connectivity.  For
930c2aa98e2SPeter Wemmexample:
931c2aa98e2SPeter Wemm
932c2aa98e2SPeter Wemm	SITE(cnmat)
933c2aa98e2SPeter Wemm	SITE(sgi olympus)
934c2aa98e2SPeter Wemm
935c2aa98e2SPeter WemmThe second example demonstrates that you can use two names on the
936c2aa98e2SPeter Wemmsame line; these are usually aliases for the same host (or are at
937c2aa98e2SPeter Wemmleast in the same company).
938c2aa98e2SPeter Wemm
939c2aa98e2SPeter Wemm
940c2aa98e2SPeter Wemm+--------------------+
941c2aa98e2SPeter Wemm| USING UUCP MAILERS |
942c2aa98e2SPeter Wemm+--------------------+
943c2aa98e2SPeter Wemm
944c2aa98e2SPeter WemmIt's hard to get UUCP mailers right because of the extremely ad hoc
945c2aa98e2SPeter Wemmnature of UUCP addressing.  These config files are really designed
946c2aa98e2SPeter Wemmfor domain-based addressing, even for UUCP sites.
947c2aa98e2SPeter Wemm
948c2aa98e2SPeter WemmThere are four UUCP mailers available.  The choice of which one to
949c2aa98e2SPeter Wemmuse is partly a matter of local preferences and what is running at
950c2aa98e2SPeter Wemmthe other end of your UUCP connection.  Unlike good protocols that
951c2aa98e2SPeter Wemmdefine what will go over the wire, UUCP uses the policy that you
952c2aa98e2SPeter Wemmshould do what is right for the other end; if they change, you have
953c2aa98e2SPeter Wemmto change.  This makes it hard to do the right thing, and discourages
954c2aa98e2SPeter Wemmpeople from updating their software.  In general, if you can avoid
955c2aa98e2SPeter WemmUUCP, please do.
956c2aa98e2SPeter Wemm
957c2aa98e2SPeter WemmThe major choice is whether to go for a domainized scheme or a
958c2aa98e2SPeter Wemmnon-domainized scheme.  This depends entirely on what the other
959c2aa98e2SPeter Wemmend will recognize.  If at all possible, you should encourage the
960c2aa98e2SPeter Wemmother end to go to a domain-based system -- non-domainized addresses
961c2aa98e2SPeter Wemmdon't work entirely properly.
962c2aa98e2SPeter Wemm
963c2aa98e2SPeter WemmThe four mailers are:
964c2aa98e2SPeter Wemm
965c2aa98e2SPeter Wemm    uucp-old (obsolete name: "uucp")
966c2aa98e2SPeter Wemm	This is the oldest, the worst (but the closest to UUCP) way of
967c2aa98e2SPeter Wemm	sending messages accros UUCP connections.  It does bangify
968c2aa98e2SPeter Wemm	everything and prepends $U (your UUCP name) to the sender's
969c2aa98e2SPeter Wemm	address (which can already be a bang path itself).  It can
970c2aa98e2SPeter Wemm	only send to one address at a time, so it spends a lot of
971c2aa98e2SPeter Wemm	time copying duplicates of messages.  Avoid this if at all
972c2aa98e2SPeter Wemm	possible.
973c2aa98e2SPeter Wemm
974c2aa98e2SPeter Wemm    uucp-new (obsolete name: "suucp")
975c2aa98e2SPeter Wemm	The same as above, except that it assumes that in one rmail
976c2aa98e2SPeter Wemm	command you can specify several recipients.  It still has a
977c2aa98e2SPeter Wemm	lot of other problems.
978c2aa98e2SPeter Wemm
979c2aa98e2SPeter Wemm    uucp-dom
980c2aa98e2SPeter Wemm	This UUCP mailer keeps everything as domain addresses.
981c2aa98e2SPeter Wemm	Basically, it uses the SMTP mailer rewriting rules.  This mailer
982c2aa98e2SPeter Wemm	is only included if MAILER(smtp) is also specified.
983c2aa98e2SPeter Wemm
984c2aa98e2SPeter Wemm	Unfortunately, a lot of UUCP mailer transport agents require
985c2aa98e2SPeter Wemm	bangified addresses in the envelope, although you can use
986c2aa98e2SPeter Wemm	domain-based addresses in the message header.  (The envelope
987c2aa98e2SPeter Wemm	shows up as the From_ line on UNIX mail.)  So....
988c2aa98e2SPeter Wemm
989c2aa98e2SPeter Wemm    uucp-uudom
990c2aa98e2SPeter Wemm	This is a cross between uucp-new (for the envelope addresses)
991c2aa98e2SPeter Wemm	and uucp-dom (for the header addresses).  It bangifies the
992c2aa98e2SPeter Wemm	envelope sender (From_ line in messages) without adding the
993c2aa98e2SPeter Wemm	local hostname, unless there is no host name on the address
994c2aa98e2SPeter Wemm	at all (e.g., "wolf") or the host component is a UUCP host name
995c2aa98e2SPeter Wemm	instead of a domain name ("somehost!wolf" instead of
996c2aa98e2SPeter Wemm	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
997c2aa98e2SPeter Wemm	is also specified.
998c2aa98e2SPeter Wemm
999c2aa98e2SPeter WemmExamples:
1000c2aa98e2SPeter Wemm
1001c2aa98e2SPeter WemmWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
1002c2aa98e2SPeter Wemmfollowing summarizes the sender rewriting for various mailers.
1003c2aa98e2SPeter Wemm
1004c2aa98e2SPeter WemmMailer          sender		rewriting in the envelope
1005c2aa98e2SPeter Wemm------		------		-------------------------
1006c2aa98e2SPeter Wemmuucp-{old,new}	wolf		grasp!wolf
1007c2aa98e2SPeter Wemmuucp-dom	wolf		wolf@grasp.insa-lyon.fr
1008c2aa98e2SPeter Wemmuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
1009c2aa98e2SPeter Wemm
1010c2aa98e2SPeter Wemmuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
1011c2aa98e2SPeter Wemmuucp-dom	wolf@fr.net	wolf@fr.net
1012c2aa98e2SPeter Wemmuucp-uudom	wolf@fr.net	fr.net!wolf
1013c2aa98e2SPeter Wemm
1014c2aa98e2SPeter Wemmuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
1015c2aa98e2SPeter Wemmuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
1016c2aa98e2SPeter Wemmuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
1017c2aa98e2SPeter Wemm
1018c2aa98e2SPeter WemmIf you are using one of the domainized UUCP mailers, you really want
1019c2aa98e2SPeter Wemmto convert all UUCP addresses to domain format -- otherwise, it will
1020c2aa98e2SPeter Wemmdo it for you (and probably not the way you expected).  For example,
1021c2aa98e2SPeter Wemmif you have the address foo!bar!baz (and you are not sending to foo),
1022c2aa98e2SPeter Wemmthe heuristics will add the @uucp.relay.name or @local.host.name to
1023c2aa98e2SPeter Wemmthis address.  However, if you map foo to foo.host.name first, it
1024c2aa98e2SPeter Wemmwill not add the local hostname.  You can do this using the uucpdomain
1025c2aa98e2SPeter Wemmfeature.
1026c2aa98e2SPeter Wemm
1027c2aa98e2SPeter Wemm
1028c2aa98e2SPeter Wemm+-------------------+
1029c2aa98e2SPeter Wemm| TWEAKING RULESETS |
1030c2aa98e2SPeter Wemm+-------------------+
1031c2aa98e2SPeter Wemm
1032c2aa98e2SPeter WemmFor more complex configurations, you can define special rules.
1033c2aa98e2SPeter WemmThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
1034c2aa98e2SPeter Wemmthe names.  Any modifications made here are reflected in the header.
1035c2aa98e2SPeter Wemm
1036c2aa98e2SPeter WemmA common use is to convert old UUCP addresses to SMTP addresses using
1037c2aa98e2SPeter Wemmthe UUCPSMTP macro.  For example:
1038c2aa98e2SPeter Wemm
1039c2aa98e2SPeter Wemm	LOCAL_RULE_3
1040c2aa98e2SPeter Wemm	UUCPSMTP(decvax,	decvax.dec.com)
1041c2aa98e2SPeter Wemm	UUCPSMTP(research,	research.att.com)
1042c2aa98e2SPeter Wemm
1043c2aa98e2SPeter Wemmwill cause addresses of the form "decvax!user" and "research!user"
1044c2aa98e2SPeter Wemmto be converted to "user@decvax.dec.com" and "user@research.att.com"
1045c2aa98e2SPeter Wemmrespectively.
1046c2aa98e2SPeter Wemm
1047c2aa98e2SPeter WemmThis could also be used to look up hosts in a database map:
1048c2aa98e2SPeter Wemm
1049c2aa98e2SPeter Wemm	LOCAL_RULE_3
1050c2aa98e2SPeter Wemm	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
1051c2aa98e2SPeter Wemm
1052c2aa98e2SPeter WemmThis map would be defined in the LOCAL_CONFIG portion, as shown below.
1053c2aa98e2SPeter Wemm
1054c2aa98e2SPeter WemmSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
1055c2aa98e2SPeter WemmFor example, new rules are needed to parse hostnames that you accept
1056c2aa98e2SPeter Wemmvia MX records.  For example, you might have:
1057c2aa98e2SPeter Wemm
1058c2aa98e2SPeter Wemm	LOCAL_RULE_0
1059c2aa98e2SPeter Wemm	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
1060c2aa98e2SPeter Wemm
1061c2aa98e2SPeter WemmYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
1062c2aa98e2SPeter Wemmpointing at this host; this rule catches the message and forwards it on
1063c2aa98e2SPeter Wemmusing UUCP.
1064c2aa98e2SPeter Wemm
1065c2aa98e2SPeter WemmYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
1066c2aa98e2SPeter WemmThese rulesets are normally empty.
1067c2aa98e2SPeter Wemm
1068c2aa98e2SPeter WemmA similar macro is LOCAL_CONFIG.  This introduces lines added after the
1069c2aa98e2SPeter Wemmboilerplate option setting but before rulesets, and can be used to
1070c2aa98e2SPeter Wemmdeclare local database maps or whatever.  For example:
1071c2aa98e2SPeter Wemm
1072c2aa98e2SPeter Wemm	LOCAL_CONFIG
1073c2aa98e2SPeter Wemm	Khostmap hash /etc/hostmap.db
1074c2aa98e2SPeter Wemm	Kyplocal nis -m hosts.byname
1075c2aa98e2SPeter Wemm
1076c2aa98e2SPeter Wemm
1077c2aa98e2SPeter Wemm+---------------------------+
1078c2aa98e2SPeter Wemm| MASQUERADING AND RELAYING |
1079c2aa98e2SPeter Wemm+---------------------------+
1080c2aa98e2SPeter Wemm
1081c2aa98e2SPeter WemmYou can have your host masquerade as another using
1082c2aa98e2SPeter Wemm
1083c2aa98e2SPeter Wemm	MASQUERADE_AS(host.domain)
1084c2aa98e2SPeter Wemm
1085c2aa98e2SPeter WemmThis causes mail being sent to be labeled as coming from the
1086c2aa98e2SPeter Wemmindicated host.domain, rather than $j.  One normally masquerades as
1087c2aa98e2SPeter Wemmone of one's own subdomains (for example, it's unlikely that I would
1088c2aa98e2SPeter Wemmchoose to masquerade as an MIT site).  This behaviour is modified by
1089c2aa98e2SPeter Wemma plethora of FEATUREs; in particular, see masquerade_envelope,
1090c2aa98e2SPeter Wemmallmasquerade, limited_masquerade, and masquerade_entire_domain.
1091c2aa98e2SPeter Wemm
1092c2aa98e2SPeter WemmThe masquerade name is not normally canonified, so it is important
1093c2aa98e2SPeter Wemmthat it be your One True Name, that is, fully qualified and not a
1094c2aa98e2SPeter WemmCNAME.  However, if you use a CNAME, the receiving side may canonify
1095c2aa98e2SPeter Wemmit for you, so don't think you can cheat CNAME mapping this way.
1096c2aa98e2SPeter Wemm
1097c2aa98e2SPeter WemmNormally the only addresses that are masqueraded are those that come
1098c2aa98e2SPeter Wemmfrom this host (that is, are either unqualified or in $=w, the list
1099c2aa98e2SPeter Wemmof local domain names).  You can augment this list using
1100c2aa98e2SPeter Wemm
1101c2aa98e2SPeter Wemm	MASQUERADE_DOMAIN(otherhost.domain)
1102c2aa98e2SPeter Wemm
1103c2aa98e2SPeter WemmThe effect of this is that although mail to user@otherhost.domain
1104c2aa98e2SPeter Wemmwill not be delivered locally, any mail including any user@otherhost.domain
1105c2aa98e2SPeter Wemmwill, when relayed, be rewritten to have the MASQUERADE_AS address.
1106c2aa98e2SPeter WemmThis can be a space-separated list of names.
1107c2aa98e2SPeter Wemm
1108c2aa98e2SPeter WemmIf these names are in a file, you can use
1109c2aa98e2SPeter Wemm
1110c2aa98e2SPeter Wemm	MASQUERADE_DOMAIN_FILE(filename)
1111c2aa98e2SPeter Wemm
1112c2aa98e2SPeter Wemmto read the list of names from the indicated file.
1113c2aa98e2SPeter Wemm
1114c2aa98e2SPeter WemmNormally only header addresses are masqueraded.  If you want to
1115c2aa98e2SPeter Wemmmasquerade the envelope as well, use
1116c2aa98e2SPeter Wemm
1117c2aa98e2SPeter Wemm	FEATURE(masquerade_envelope)
1118c2aa98e2SPeter Wemm
1119c2aa98e2SPeter WemmThere are always users that need to be "exposed" -- that is, their
1120c2aa98e2SPeter Wemminternal site name should be displayed instead of the masquerade name.
1121c2aa98e2SPeter WemmRoot is an example.  You can add users to this list using
1122c2aa98e2SPeter Wemm
1123c2aa98e2SPeter Wemm	EXPOSED_USER(usernames)
1124c2aa98e2SPeter Wemm
1125c2aa98e2SPeter WemmThis adds users to class E; you could also use something like
1126c2aa98e2SPeter Wemm
1127c2aa98e2SPeter Wemm	FE/etc/sendmail.cE
1128c2aa98e2SPeter Wemm
1129c2aa98e2SPeter WemmYou can also arrange to relay all unqualified names (that is, names
1130c2aa98e2SPeter Wemmwithout @host) to a relay host.  For example, if you have a central
1131c2aa98e2SPeter Wemmemail server, you might relay to that host so that users don't have
1132c2aa98e2SPeter Wemmto have .forward files or aliases.  You can do this using
1133c2aa98e2SPeter Wemm
1134c2aa98e2SPeter Wemm	define(`LOCAL_RELAY', mailer:hostname)
1135c2aa98e2SPeter Wemm
1136c2aa98e2SPeter WemmThe ``mailer:'' can be omitted, in which case the mailer defaults to
1137c2aa98e2SPeter Wemm"relay".  There are some user names that you don't want relayed, perhaps
1138c2aa98e2SPeter Wemmbecause of local aliases.  A common example is root, which may be
1139c2aa98e2SPeter Wemmlocally aliased.  You can add entries to this list using
1140c2aa98e2SPeter Wemm
1141c2aa98e2SPeter Wemm	LOCAL_USER(usernames)
1142c2aa98e2SPeter Wemm
1143c2aa98e2SPeter WemmThis adds users to class L; you could also use something like
1144c2aa98e2SPeter Wemm
1145c2aa98e2SPeter Wemm	FL/etc/sendmail.cL
1146c2aa98e2SPeter Wemm
1147c2aa98e2SPeter WemmIf you want all incoming mail sent to a centralized hub, as for a
1148c2aa98e2SPeter Wemmshared /var/spool/mail scheme, use
1149c2aa98e2SPeter Wemm
1150c2aa98e2SPeter Wemm	define(`MAIL_HUB', mailer:hostname)
1151c2aa98e2SPeter Wemm
1152c2aa98e2SPeter WemmAgain, ``mailer:'' defaults to "relay".  If you define both LOCAL_RELAY
1153c2aa98e2SPeter Wemmand MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
1154c2aa98e2SPeter Wemmbe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
1155c2aa98e2SPeter WemmNames in $=L will be delivered locally, so you MUST have aliases or
1156c2aa98e2SPeter Wemm.forward files for them.
1157c2aa98e2SPeter Wemm
1158c2aa98e2SPeter WemmFor example, if you are on machine mastodon.CS.Berkeley.EDU and you have
1159c2aa98e2SPeter WemmFEATURE(stickyhost), the following combinations of settings will have the
1160c2aa98e2SPeter Wemmindicated effects:
1161c2aa98e2SPeter Wemm
1162c2aa98e2SPeter Wemmemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
1163c2aa98e2SPeter Wemm
1164c2aa98e2SPeter WemmLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
1165c2aa98e2SPeter Wemmmail.CS.Berkeley.EDU	  (no local aliasing)	    (aliasing done)
1166c2aa98e2SPeter Wemm
1167c2aa98e2SPeter WemmMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
1168c2aa98e2SPeter Wemmmammoth.CS.Berkeley.EDU	  (aliasing done)	    (aliasing done)
1169c2aa98e2SPeter Wemm
1170c2aa98e2SPeter WemmBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
1171c2aa98e2SPeter WemmMAIL_HUB set as above	  (no local aliasing)	    (aliasing done)
1172c2aa98e2SPeter Wemm
1173c2aa98e2SPeter WemmIf you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
1174c2aa98e2SPeter WemmMAIL_HUB act identically, with MAIL_HUB taking precedence.
1175c2aa98e2SPeter Wemm
1176c2aa98e2SPeter WemmIf you want all outgoing mail to go to a central relay site, define
1177c2aa98e2SPeter WemmSMART_HOST as well.  Briefly:
1178c2aa98e2SPeter Wemm
1179c2aa98e2SPeter Wemm	LOCAL_RELAY applies to unqualified names (e.g., "eric").
1180c2aa98e2SPeter Wemm	MAIL_HUB applies to names qualified with the name of the
1181c2aa98e2SPeter Wemm		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
1182c2aa98e2SPeter Wemm	SMART_HOST applies to names qualified with other hosts.
1183c2aa98e2SPeter Wemm
1184c2aa98e2SPeter WemmHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
1185c2aa98e2SPeter WemmDECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
1186c2aa98e2SPeter Wemmreally want absolutely everything to go to a single central site you will
1187c2aa98e2SPeter Wemmneed to unset all the other relays -- or better yet, find or build a
1188c2aa98e2SPeter Wemmminimal config file that does this.
1189c2aa98e2SPeter Wemm
1190c2aa98e2SPeter WemmFor duplicate suppression to work properly, the host name is best
1191c2aa98e2SPeter Wemmspecified with a terminal dot:
1192c2aa98e2SPeter Wemm
1193c2aa98e2SPeter Wemm	define(`MAIL_HUB', `host.domain.')
1194c2aa98e2SPeter Wemm	      note the trailing dot ---^
1195c2aa98e2SPeter Wemm
1196c2aa98e2SPeter Wemm
1197c2aa98e2SPeter Wemm+---------------------------------+
1198c2aa98e2SPeter Wemm| ANTI-SPAM CONFIGURATION CONTROL |
1199c2aa98e2SPeter Wemm+---------------------------------+
1200c2aa98e2SPeter Wemm
1201c2aa98e2SPeter WemmThe primary anti-spam features available in sendmail are:
1202c2aa98e2SPeter Wemm
1203c2aa98e2SPeter Wemm* Relaying is denied by default.
1204c2aa98e2SPeter Wemm* Better checking on sender information.
1205c2aa98e2SPeter Wemm* Access database.
1206c2aa98e2SPeter Wemm* Header checks.
1207c2aa98e2SPeter Wemm
1208c2aa98e2SPeter WemmRelaying (transmission of messages from a site outside your domain to
1209c2aa98e2SPeter Wemmanother site outside your domain) is denied by default.  Note that
1210c2aa98e2SPeter Wemmthis changed in sendmail 8.9; previous versions allowed relaying by
1211c2aa98e2SPeter Wemmdefault.  If you want to revert to the old behaviour, you will need
1212c2aa98e2SPeter Wemmto use FEATURE(promiscuous_relay).  You can allow certain domains to
1213c2aa98e2SPeter Wemmrelay through your server by adding their domain name or IP address to
1214c2aa98e2SPeter Wemmclass 'R' ($=R) using RELAY_DOMAIN() and RELAY_DOMAIN_FILE() or via the
1215c2aa98e2SPeter Wemmaccess database (described below).
1216c2aa98e2SPeter Wemm
1217c2aa98e2SPeter WemmIf you use
1218c2aa98e2SPeter Wemm
1219c2aa98e2SPeter Wemm	FEATURE(relay_entire_domain)
1220c2aa98e2SPeter Wemm
1221c2aa98e2SPeter Wemmthen any host in any of your local domains (that is, the $=m class)
1222065a643dSPeter Wemmwill be relayed (that is, you will accept mail either to or from any
1223065a643dSPeter Wemmhost in your domain).
1224c2aa98e2SPeter Wemm
1225c2aa98e2SPeter WemmYou can also allow relaying based on the MX records of the host
1226c2aa98e2SPeter Wemmportion of an incoming recipient address by using
1227c2aa98e2SPeter Wemm
1228c2aa98e2SPeter Wemm	FEATURE(relay_based_on_MX)
1229c2aa98e2SPeter Wemm
1230c2aa98e2SPeter WemmFor example, if your server receives a recipient of user@domain.com
1231c2aa98e2SPeter Wemmand domain.com lists your server in its MX records, the mail will be
1232065a643dSPeter Wemmaccepted for relay to domain.com.  Note that this will stop spammers
1233065a643dSPeter Wemmfrom using your host to relay spam but it will not stop outsiders from
1234065a643dSPeter Wemmusing your server as a relay for their site (that is, they set up an
1235065a643dSPeter WemmMX record pointing to your mail server, and you will relay mail addressed
1236065a643dSPeter Wemmto them without any prior arrangement).  Along the same lines,
1237c2aa98e2SPeter Wemm
1238c2aa98e2SPeter Wemm	FEATURE(relay_local_from)
1239c2aa98e2SPeter Wemm
1240c2aa98e2SPeter Wemmwill allow relaying if the sender specifies a return path (i.e.
1241c2aa98e2SPeter WemmMAIL FROM: <user@domain>) domain which is a local domain.  This a
1242c2aa98e2SPeter Wemmdangerous feature as it will allow spammers to spam using your mail
1243c2aa98e2SPeter Wemmserver by simply specifying a return address of user@your.domain.com.
1244c2aa98e2SPeter WemmIt should not be used unless absolutely necessary.
1245c2aa98e2SPeter Wemm
1246c2aa98e2SPeter WemmIf source routing is used in the recipient address (i.e.
1247c2aa98e2SPeter WemmRCPT TO: <user%site.com@othersite.com>), sendmail will check
1248c2aa98e2SPeter Wemmuser@site.com for relaying if othersite.com is an allowed relay host
1249c2aa98e2SPeter Wemmin either class 'R', class 'm' if FEATURE(relay_entire_domain) is used,
1250c2aa98e2SPeter Wemmor the access database if FEATURE(access_db) is used.  To prevent
1251c2aa98e2SPeter Wemmthe address from being stripped down, use:
1252c2aa98e2SPeter Wemm
1253c2aa98e2SPeter Wemm	FEATURE(loose_relay_check)
1254c2aa98e2SPeter Wemm
1255c2aa98e2SPeter WemmIf you think you need to use this feature, you probably do not.  This
1256c2aa98e2SPeter Wemmshould only be used for sites which have no control over the addresses
1257c2aa98e2SPeter Wemmthat they provide a gateway for.  Use this FEATURE with caution as it
1258c2aa98e2SPeter Wemmcan allow spammers to relay through your server if not setup properly.
1259c2aa98e2SPeter Wemm
1260c2aa98e2SPeter WemmAs of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has
1261c2aa98e2SPeter Wemman unresolvable domain (i.e., one that DNS, your local name service,
1262c2aa98e2SPeter Wemmor special case rules in ruleset 3 cannot locate).  If you want to
1263c2aa98e2SPeter Wemmcontinue to accept such domains, e.g. because you are inside a
1264c2aa98e2SPeter Wemmfirewall that has only a limited view of the Internet host name space
1265c2aa98e2SPeter Wemm(note that you will not be able to return mail to them unless you have
1266c2aa98e2SPeter Wemmsome "smart host" forwarder), use
1267c2aa98e2SPeter Wemm
1268c2aa98e2SPeter Wemm	FEATURE(accept_unresolvable_domains)
1269c2aa98e2SPeter Wemm
1270c2aa98e2SPeter Wemmsendmail will also refuse mail if the MAIL FROM: parameter is not
1271c2aa98e2SPeter Wemmfully qualified (i.e., contains a domain as well as a user).  If you
1272c2aa98e2SPeter Wemmwant to continue to accept such senders, use
1273c2aa98e2SPeter Wemm
1274c2aa98e2SPeter Wemm	FEATURE(accept_unqualified_senders)
1275c2aa98e2SPeter Wemm
1276c2aa98e2SPeter WemmAn ``access'' database can be created to accept or reject mail from
1277c2aa98e2SPeter Wemmselected domains.  For example, you may choose to reject all mail
1278c2aa98e2SPeter Wemmoriginating from known spammers.  To enable such a database, use
1279c2aa98e2SPeter Wemm
1280c2aa98e2SPeter Wemm	FEATURE(access_db)
1281c2aa98e2SPeter Wemm
1282c2aa98e2SPeter WemmThe FEATURE macro can accept a second parameter giving the key file
1283c2aa98e2SPeter Wemmdefinition for the database; for example
1284c2aa98e2SPeter Wemm
1285c2aa98e2SPeter Wemm	FEATURE(access_db, hash -o /etc/mail/access)
1286c2aa98e2SPeter Wemm
1287065a643dSPeter WemmRemember, since /etc/mail/access is a database, after creating the text
1288065a643dSPeter Wemmfile as described below, you must use makemap to create the database
1289065a643dSPeter Wemmmap.  For example:
1290065a643dSPeter Wemm
1291065a643dSPeter Wemmmakemap hash /etc/mail/access < /etc/mail/access
1292065a643dSPeter Wemm
1293c2aa98e2SPeter WemmThe table itself uses e-mail addresses, domain names, and network
1294c2aa98e2SPeter Wemmnumbers as keys.  For example,
1295c2aa98e2SPeter Wemm
1296c2aa98e2SPeter Wemm	spammer@aol.com		REJECT
1297c2aa98e2SPeter Wemm	cyberspammer.com	REJECT
1298065a643dSPeter Wemm	192.168.212		REJECT
1299c2aa98e2SPeter Wemm
1300c2aa98e2SPeter Wemmwould refuse mail from spammer@aol.com, any user from cyberspammer.com
1301c2aa98e2SPeter Wemm(or any host within the cyberspammer.com domain), and any host on the
1302065a643dSPeter Wemm192.168.212.* network.
1303c2aa98e2SPeter Wemm
1304c2aa98e2SPeter WemmThe value part of the map can contain:
1305c2aa98e2SPeter Wemm
1306065a643dSPeter Wemm	OK		Accept mail even if other rules in the
1307065a643dSPeter Wemm			running ruleset would reject it, for example,
1308065a643dSPeter Wemm			if the domain name is unresolvable.
1309065a643dSPeter Wemm	RELAY		Accept mail addressed to the indicated domain or
1310065a643dSPeter Wemm			received from the indicated domain for relaying
1311065a643dSPeter Wemm			through your SMTP server.  RELAY also serves as
1312065a643dSPeter Wemm			an implicit OK for the other checks.
1313065a643dSPeter Wemm	REJECT		Reject the sender or recipient with a general
1314c2aa98e2SPeter Wemm			purpose message.
1315065a643dSPeter Wemm	DISCARD		Discard the message completely using the
1316065a643dSPeter Wemm			$#discard mailer.  This only works for sender
1317065a643dSPeter Wemm			addresses (i.e., it indicates that you should
1318065a643dSPeter Wemm			discard anything received from the indicated
1319065a643dSPeter Wemm			domain).
1320c2aa98e2SPeter Wemm	### any text	where ### is an RFC 821 compliant error code
1321c2aa98e2SPeter Wemm			and "any text" is a message to return for
1322c2aa98e2SPeter Wemm			the command.
1323c2aa98e2SPeter Wemm
1324c2aa98e2SPeter WemmFor example:
1325c2aa98e2SPeter Wemm
1326c2aa98e2SPeter Wemm	cyberspammer.com	550 We don't accept mail from spammers
1327c2aa98e2SPeter Wemm	okay.cyberspammer.com	OK
1328c2aa98e2SPeter Wemm	sendmail.org		OK
1329c2aa98e2SPeter Wemm	128.32			RELAY
1330c2aa98e2SPeter Wemm
1331c2aa98e2SPeter Wemmwould accept mail from okay.cyberspammer.com, but would reject mail
1332c2aa98e2SPeter Wemmfrom all other hosts at cyberspammer.com with the indicated message.
1333c2aa98e2SPeter WemmIt would allow accept mail from any hosts in the sendmail.org domain,
1334c2aa98e2SPeter Wemmand allow relaying for the 128.32.*.* network.  Note, UUCP users may
1335c2aa98e2SPeter Wemmneed to add hostname.UUCP to the access database or class 'R' ($=R).
1336c2aa98e2SPeter WemmIf you also use:
1337c2aa98e2SPeter Wemm
1338c2aa98e2SPeter Wemm	FEATURE(relay_hosts_only)
1339c2aa98e2SPeter Wemm
1340c2aa98e2SPeter Wemmthen the above example will allow relaying for sendmail.org, but not
1341c2aa98e2SPeter Wemmhosts within the sendmail.org domain.  Note that this will also require
1342c2aa98e2SPeter Wemmhosts listed in class 'R' ($=R) to be fully qualified host names.
1343c2aa98e2SPeter Wemm
1344c2aa98e2SPeter WemmYou can also use the access database to block sender addresses based on
1345c2aa98e2SPeter Wemmthe username portion of the address.  For example:
1346c2aa98e2SPeter Wemm
1347c2aa98e2SPeter Wemm	FREE.STEALTH.MAILER@	550 Spam not accepted
1348c2aa98e2SPeter Wemm
1349c2aa98e2SPeter WemmNote that you must include the @ after the username to signify that
1350c2aa98e2SPeter Wemmthis database entry is for checking only the username portion of the
1351c2aa98e2SPeter Wemmsender address.
1352c2aa98e2SPeter Wemm
1353c2aa98e2SPeter WemmIf you use:
1354c2aa98e2SPeter Wemm
1355c2aa98e2SPeter Wemm	FEATURE(blacklist_recipients)
1356c2aa98e2SPeter Wemm
1357c2aa98e2SPeter Wemmthen you can add entries to the map for local users, hosts in your
1358c2aa98e2SPeter Wemmdomains, or addresses in your domain which should not receive mail:
1359c2aa98e2SPeter Wemm
1360c2aa98e2SPeter Wemm	badlocaluser		550 Mailbox disabled for this username
1361c2aa98e2SPeter Wemm	host.mydomain.com	550 That host does not accept mail
1362c2aa98e2SPeter Wemm	user@otherhost.mydomain.com	550 Mailbox disabled for this recipient
1363c2aa98e2SPeter Wemm
1364c2aa98e2SPeter WemmThis would prevent a recipient of badlocaluser@mydomain.com, any
1365c2aa98e2SPeter Wemmuser at host.mydomain.com, and the single address
1366065a643dSPeter Wemmuser@otherhost.mydomain.com from receiving mail.  Enabling this
1367065a643dSPeter Wemmfeature will keep you from sending mails to all addresses that
1368065a643dSPeter Wemmhave an error message or REJECT as value part in the access map.
1369065a643dSPeter WemmTaking the example from above:
1370065a643dSPeter Wemm
1371065a643dSPeter Wemm	spammer@aol.com		REJECT
1372065a643dSPeter Wemm	cyberspammer.com	REJECT
1373065a643dSPeter Wemm
1374065a643dSPeter WemmMail can't be sent to spammer@aol.com or anyone at cyberspammer.com.
1375c2aa98e2SPeter Wemm
1376c2aa98e2SPeter WemmThere is also a ``Realtime Blackhole List'' run by the MAPS project
1377c2aa98e2SPeter Wemmat http://maps.vix.com/.  This is a database maintained in DNS of
1378c2aa98e2SPeter Wemmspammers.  To use this database, use
1379c2aa98e2SPeter Wemm
1380c2aa98e2SPeter Wemm	FEATURE(rbl)
1381c2aa98e2SPeter Wemm
1382c2aa98e2SPeter WemmThis will cause sendmail to reject mail from any site in the
1383c2aa98e2SPeter WemmRealtime Blackhole List database.  You can specify an alternative
1384c2aa98e2SPeter WemmRBL name server to contact by specifying an argument to the FEATURE.
1385c2aa98e2SPeter Wemm
1386c2aa98e2SPeter WemmThe features described above make use of the check_relay, check_mail,
1387c2aa98e2SPeter Wemmand check_rcpt rulesets.  If you wish to include your own checks,
1388c2aa98e2SPeter Wemmyou can put your checks in the rulesets Local_check_relay,
1389c2aa98e2SPeter WemmLocal_check_mail, and Local_check_rcpt.  For example if you wanted to
1390c2aa98e2SPeter Wemmblock senders with all numeric usernames (i.e. 2312343@bigisp.com),
1391c2aa98e2SPeter Wemmyou would use Local_check_mail and the new regex map:
1392c2aa98e2SPeter Wemm
1393c2aa98e2SPeter Wemm	LOCAL_CONFIG
1394c2aa98e2SPeter Wemm	Kallnumbers regex -a@MATCH ^[0-9]+$
1395c2aa98e2SPeter Wemm
1396c2aa98e2SPeter Wemm	LOCAL_RULESETS
1397c2aa98e2SPeter Wemm	SLocal_check_mail
1398c2aa98e2SPeter Wemm	# check address against various regex checks
1399c2aa98e2SPeter Wemm	R$*				$: $>Parse0 $>3 $1
1400c2aa98e2SPeter Wemm	R$+ < @ bigisp.com. > $*	$: $(allnumbers $1 $)
1401c2aa98e2SPeter Wemm	R@MATCH				$#error $: 553 Header Error
1402c2aa98e2SPeter Wemm
1403c2aa98e2SPeter WemmThese rules are called with the original arguments of the corresponding
1404c2aa98e2SPeter Wemmcheck_* ruleset.  If the local ruleset returns $#OK, no further checking
1405c2aa98e2SPeter Wemmis done by the features described above and the mail is accepted.  If the
1406c2aa98e2SPeter Wemmlocal ruleset resolves to a mailer (such as $#error or $#discard), the
1407c2aa98e2SPeter Wemmappropriate action is taken.  Otherwise, the results of the local
1408c2aa98e2SPeter Wemmrewriting are ignored.
1409c2aa98e2SPeter Wemm
1410c2aa98e2SPeter Wemm
1411c2aa98e2SPeter WemmYou can also reject mail on the basis of the contents of headers.
1412c2aa98e2SPeter WemmThis is done by adding a ruleset call to the 'H' header definition command
1413c2aa98e2SPeter Wemmin sendmail.cf.  For example, this can be used to check the validity of
1414c2aa98e2SPeter Wemma Message-ID: header:
1415c2aa98e2SPeter Wemm
1416c2aa98e2SPeter Wemm	LOCAL_RULESETS
1417c2aa98e2SPeter Wemm	HMessage-Id: $>CheckMessageId
1418c2aa98e2SPeter Wemm
1419c2aa98e2SPeter Wemm	SCheckMessageId
1420c2aa98e2SPeter Wemm	R< $+ @ $+ >		$@ OK
1421c2aa98e2SPeter Wemm	R$*			$#error $: 553 Header Error
1422c2aa98e2SPeter Wemm
1423065a643dSPeter WemmUsers of FEATURE(nullclient) who desire to use the anti-spam and
1424065a643dSPeter Wemmanti-relaying capabilities should replace FEATURE(nullclient, mailhub)
1425065a643dSPeter Wemmwith:
1426065a643dSPeter Wemm
1427065a643dSPeter Wemm	undefine(`ALIAS_FILE')
1428065a643dSPeter Wemm	define(`MAIL_HUB', `mailhub')
1429065a643dSPeter Wemm	define(`SMART_HOST', `mailhub')
1430065a643dSPeter Wemm	define(`confFORWARD_PATH', `')
1431065a643dSPeter Wemm
1432065a643dSPeter Wemmwhere mailhub is the fully qualified hostname for their mail server.
1433065a643dSPeter Wemm
1434c2aa98e2SPeter Wemm
1435c2aa98e2SPeter Wemm+--------------------------------+
1436c2aa98e2SPeter Wemm| ADDING NEW MAILERS OR RULESETS |
1437c2aa98e2SPeter Wemm+--------------------------------+
1438c2aa98e2SPeter Wemm
1439c2aa98e2SPeter WemmSometimes you may need to add entirely new mailers or rulesets.  They
1440c2aa98e2SPeter Wemmshould be introduced with the constructs MAILER_DEFINITIONS and
1441c2aa98e2SPeter WemmLOCAL_RULESETS respectively.  For example:
1442c2aa98e2SPeter Wemm
1443c2aa98e2SPeter Wemm	MAILER_DEFINITIONS
1444c2aa98e2SPeter Wemm	Mmymailer, ...
1445c2aa98e2SPeter Wemm	...
1446c2aa98e2SPeter Wemm
1447c2aa98e2SPeter Wemm	LOCAL_RULESETS
1448c2aa98e2SPeter Wemm	Smyruleset
1449c2aa98e2SPeter Wemm	...
1450c2aa98e2SPeter Wemm
1451c2aa98e2SPeter Wemm
1452c2aa98e2SPeter Wemm+-------------------------------+
1453c2aa98e2SPeter Wemm| NON-SMTP BASED CONFIGURATIONS |
1454c2aa98e2SPeter Wemm+-------------------------------+
1455c2aa98e2SPeter Wemm
1456c2aa98e2SPeter WemmThese configuration files are designed primarily for use by SMTP-based
1457c2aa98e2SPeter Wemmsites.  I don't pretend that they are well tuned for UUCP-only or
1458c2aa98e2SPeter WemmUUCP-primarily nodes (the latter is defined as a small local net
1459c2aa98e2SPeter Wemmconnected to the rest of the world via UUCP).  However, there is one
1460c2aa98e2SPeter Wemmhook to handle some special cases.
1461c2aa98e2SPeter Wemm
1462c2aa98e2SPeter WemmYou can define a ``smart host'' that understands a richer address syntax
1463c2aa98e2SPeter Wemmusing:
1464c2aa98e2SPeter Wemm
1465c2aa98e2SPeter Wemm	define(`SMART_HOST', mailer:hostname)
1466c2aa98e2SPeter Wemm
1467c2aa98e2SPeter WemmIn this case, the ``mailer:'' defaults to "relay".  Any messages that
1468c2aa98e2SPeter Wemmcan't be handled using the usual UUCP rules are passed to this host.
1469c2aa98e2SPeter Wemm
1470c2aa98e2SPeter WemmIf you are on a local SMTP-based net that connects to the outside
1471c2aa98e2SPeter Wemmworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
1472c2aa98e2SPeter WemmFor example:
1473c2aa98e2SPeter Wemm
1474c2aa98e2SPeter Wemm	define(`SMART_HOST', suucp:uunet)
1475c2aa98e2SPeter Wemm	LOCAL_NET_CONFIG
1476c2aa98e2SPeter Wemm	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
1477c2aa98e2SPeter Wemm
1478c2aa98e2SPeter WemmThis will cause all names that end in your domain name ($m) via
1479c2aa98e2SPeter WemmSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
1480c2aa98e2SPeter WemmIf you have FEATURE(nocanonify), you may need to omit the dots after
1481c2aa98e2SPeter Wemmthe $m.  If you are running a local DNS inside your domain which is
1482c2aa98e2SPeter Wemmnot otherwise connected to the outside world, you probably want to
1483c2aa98e2SPeter Wemmuse:
1484c2aa98e2SPeter Wemm
1485c2aa98e2SPeter Wemm	define(`SMART_HOST', smtp:fire.wall.com)
1486c2aa98e2SPeter Wemm	LOCAL_NET_CONFIG
1487c2aa98e2SPeter Wemm	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
1488c2aa98e2SPeter Wemm
1489c2aa98e2SPeter WemmThat is, send directly only to things you found in your DNS lookup;
1490c2aa98e2SPeter Wemmanything else goes through SMART_HOST.
1491c2aa98e2SPeter Wemm
1492c2aa98e2SPeter WemmYou may need to turn off the anti-spam rules in order to accept
1493c2aa98e2SPeter WemmUUCP mail with FEATURE(promiscuous_relay) and
1494c2aa98e2SPeter WemmFEATURE(accept_unresolvable_domains).
1495c2aa98e2SPeter Wemm
1496c2aa98e2SPeter Wemm
1497c2aa98e2SPeter Wemm+-----------+
1498c2aa98e2SPeter Wemm| WHO AM I? |
1499c2aa98e2SPeter Wemm+-----------+
1500c2aa98e2SPeter Wemm
1501c2aa98e2SPeter WemmNormally, the $j macro is automatically defined to be your fully
1502c2aa98e2SPeter Wemmqualified domain name (FQDN).  Sendmail does this by getting your
1503c2aa98e2SPeter Wemmhost name using gethostname and then calling gethostbyname on the
1504c2aa98e2SPeter Wemmresult.  For example, in some environments gethostname returns
1505c2aa98e2SPeter Wemmonly the root of the host name (such as "foo"); gethostbyname is
1506c2aa98e2SPeter Wemmsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
1507c2aa98e2SPeter Wemmcases, gethostbyname may fail to return the FQDN.  In this case
1508c2aa98e2SPeter Wemmyou MUST define confDOMAIN_NAME to be your fully qualified domain
1509c2aa98e2SPeter Wemmname.  This is usually done using:
1510c2aa98e2SPeter Wemm
1511c2aa98e2SPeter Wemm	Dmbar.com
1512c2aa98e2SPeter Wemm	define(`confDOMAIN_NAME', `$w.$m')dnl
1513c2aa98e2SPeter Wemm
1514c2aa98e2SPeter Wemm
1515c2aa98e2SPeter Wemm+--------------------+
1516c2aa98e2SPeter Wemm| USING MAILERTABLES |
1517c2aa98e2SPeter Wemm+--------------------+
1518c2aa98e2SPeter Wemm
1519c2aa98e2SPeter WemmTo use FEATURE(mailertable), you will have to create an external
1520c2aa98e2SPeter Wemmdatabase containing the routing information for various domains.
1521c2aa98e2SPeter WemmFor example, a mailertable file in text format might be:
1522c2aa98e2SPeter Wemm
1523c2aa98e2SPeter Wemm	.my.domain		xnet:%1.my.domain
1524c2aa98e2SPeter Wemm	uuhost1.my.domain	suucp:uuhost1
1525c2aa98e2SPeter Wemm	.bitnet			smtp:relay.bit.net
1526c2aa98e2SPeter Wemm
1527c2aa98e2SPeter WemmThis should normally be stored in /etc/mailertable.  The actual
1528c2aa98e2SPeter Wemmdatabase version of the mailertable is built using:
1529c2aa98e2SPeter Wemm
1530c2aa98e2SPeter Wemm	makemap hash /etc/mailertable.db < /etc/mailertable
1531c2aa98e2SPeter Wemm
1532c2aa98e2SPeter WemmThe semantics are simple.  Any LHS entry that does not begin with
1533c2aa98e2SPeter Wemma dot matches the full host name indicated.  LHS entries beginning
1534c2aa98e2SPeter Wemmwith a dot match anything ending with that domain name -- that is,
1535c2aa98e2SPeter Wemmthey can be thought of as having a leading "*" wildcard.  Matching
1536c2aa98e2SPeter Wemmis done in order of most-to-least qualified -- for example, even
1537c2aa98e2SPeter Wemmthough ".my.domain" is listed first in the above example, an entry
1538c2aa98e2SPeter Wemmof "uuhost1.my.domain" will match the second entry since it is
1539c2aa98e2SPeter Wemmmore explicit.
1540c2aa98e2SPeter Wemm
1541c2aa98e2SPeter WemmThe RHS should always be a "mailer:host" pair.  The mailer is the
1542c2aa98e2SPeter Wemmconfiguration name of a mailer (that is, an `M' line in the
1543c2aa98e2SPeter Wemmsendmail.cf file).  The "host" will be the hostname passed to
1544c2aa98e2SPeter Wemmthat mailer.  In domain-based matches (that is, those with leading
1545c2aa98e2SPeter Wemmdots) the "%1" may be used to interpolate the wildcarded part of
1546c2aa98e2SPeter Wemmthe host name.  For example, the first line above sends everything
1547c2aa98e2SPeter Wemmaddressed to "anything.my.domain" to that same host name, but using
1548c2aa98e2SPeter Wemmthe (presumably experimental) xnet mailer.
1549c2aa98e2SPeter Wemm
1550c2aa98e2SPeter WemmIn some cases you may want to temporarily turn off MX records,
1551c2aa98e2SPeter Wemmparticularly on gateways.  For example, you may want to MX
1552c2aa98e2SPeter Wemmeverything in a domain to one machine that then forwards it
1553c2aa98e2SPeter Wemmdirectly.  To do this, you might use the DNS configuration:
1554c2aa98e2SPeter Wemm
1555c2aa98e2SPeter Wemm	*.domain.	IN	MX	0	relay.machine
1556c2aa98e2SPeter Wemm
1557c2aa98e2SPeter Wemmand on relay.machine use the mailertable:
1558c2aa98e2SPeter Wemm
1559c2aa98e2SPeter Wemm	.domain		smtp:[gateway.domain]
1560c2aa98e2SPeter Wemm
1561c2aa98e2SPeter WemmThe [square brackets] turn off MX records for this host only.
1562c2aa98e2SPeter WemmIf you didn't do this, the mailertable would use the MX record
1563c2aa98e2SPeter Wemmagain, which would give you an MX loop.
1564c2aa98e2SPeter Wemm
1565c2aa98e2SPeter Wemm
1566c2aa98e2SPeter Wemm+--------------------------------+
1567c2aa98e2SPeter Wemm| USING USERDB TO MAP FULL NAMES |
1568c2aa98e2SPeter Wemm+--------------------------------+
1569c2aa98e2SPeter Wemm
1570c2aa98e2SPeter WemmThe user database was not originally intended for mapping full names
1571c2aa98e2SPeter Wemmto login names (e.g., Eric.Allman => eric), but some people are using
1572c2aa98e2SPeter Wemmit that way.  (I would recommend that you set up aliases for this
1573c2aa98e2SPeter Wemmpurpose instead -- since you can specify multiple alias files, this
1574c2aa98e2SPeter Wemmis fairly easy.)  The intent was to locate the default maildrop at
1575c2aa98e2SPeter Wemma site, but allow you to override this by sending to a specific host.
1576c2aa98e2SPeter Wemm
1577c2aa98e2SPeter WemmIf you decide to set up the user database in this fashion, it is
1578c2aa98e2SPeter Wemmimperative that you not use FEATURE(stickyhost) -- otherwise,
1579c2aa98e2SPeter Wemme-mail sent to Full.Name@local.host.name will be rejected.
1580c2aa98e2SPeter Wemm
1581c2aa98e2SPeter WemmTo build the internal form of the user database, use:
1582c2aa98e2SPeter Wemm
1583c2aa98e2SPeter Wemm	makemap btree /usr/data/base.db < /usr/data/base.txt
1584c2aa98e2SPeter Wemm
1585c2aa98e2SPeter WemmAs a general rule, I am adamantly opposed to using full names as
1586c2aa98e2SPeter Wemme-mail addresses, since they are not in any sense unique.  For example,
1587c2aa98e2SPeter Wemmthe Unix software-development community has two Andy Tannenbaums,
1588c2aa98e2SPeter Wemmat least two well-known Peter Deutsches, and at one time Bell Labs
1589c2aa98e2SPeter Wemmhad two Stephen R. Bournes with offices along the same hallway.
1590c2aa98e2SPeter WemmWhich one will be forced to suffer the indignity of being
1591c2aa98e2SPeter WemmStephen_R_Bourne_2?  The less famous of the two, or the one that
1592c2aa98e2SPeter Wemmwas hired later?
1593c2aa98e2SPeter Wemm
1594c2aa98e2SPeter WemmFinger should handle full names (and be fuzzy).  Mail should use
1595c2aa98e2SPeter Wemmhandles, and not be fuzzy.  [Not that I expect anyone to pay any
1596c2aa98e2SPeter Wemmattention to my opinions.]
1597c2aa98e2SPeter Wemm
1598c2aa98e2SPeter Wemm
1599c2aa98e2SPeter Wemm+--------------------------------+
1600c2aa98e2SPeter Wemm| MISCELLANEOUS SPECIAL FEATURES |
1601c2aa98e2SPeter Wemm+--------------------------------+
1602c2aa98e2SPeter Wemm
1603c2aa98e2SPeter WemmPlussed users
1604c2aa98e2SPeter Wemm	Sometimes it is convenient to merge configuration on a
1605c2aa98e2SPeter Wemm	centralized mail machine, for example, to forward all
1606c2aa98e2SPeter Wemm	root mail to a mail server.  In this case it might be
1607c2aa98e2SPeter Wemm	useful to be able to treat the root addresses as a class
1608c2aa98e2SPeter Wemm	of addresses with subtle differences.  You can do this
1609c2aa98e2SPeter Wemm	using plussed users.  For example, a client might include
1610c2aa98e2SPeter Wemm	the alias:
1611c2aa98e2SPeter Wemm
1612c2aa98e2SPeter Wemm		root:  root+client1@server
1613c2aa98e2SPeter Wemm
1614c2aa98e2SPeter Wemm	On the server, this will match an alias for "root+client1".
1615c2aa98e2SPeter Wemm	If that is not found, the alias "root+*" will be tried,
1616c2aa98e2SPeter Wemm	then "root".
1617c2aa98e2SPeter Wemm
1618c2aa98e2SPeter WemmLDAP
1619c2aa98e2SPeter Wemm	For notes on use LDAP in sendmail, see
1620c2aa98e2SPeter Wemm	http://www.stanford.edu/~bbense/Inst.html
1621c2aa98e2SPeter Wemm
1622c2aa98e2SPeter Wemm
1623c2aa98e2SPeter Wemm
1624c2aa98e2SPeter Wemm+----------------+
1625c2aa98e2SPeter Wemm| SECURITY NOTES |
1626c2aa98e2SPeter Wemm+----------------+
1627c2aa98e2SPeter Wemm
1628c2aa98e2SPeter WemmA lot of sendmail security comes down to you.  Sendmail 8 is much
1629c2aa98e2SPeter Wemmmore careful about checking for security problems than previous
1630c2aa98e2SPeter Wemmversions, but there are some things that you still need to watch
1631c2aa98e2SPeter Wemmfor.  In particular:
1632c2aa98e2SPeter Wemm
1633c2aa98e2SPeter Wemm* Make sure the aliases file isn't writable except by trusted
1634c2aa98e2SPeter Wemm  system personnel.  This includes both the text and database
1635c2aa98e2SPeter Wemm  version.
1636c2aa98e2SPeter Wemm
1637c2aa98e2SPeter Wemm* Make sure that other files that sendmail reads, such as the
1638c2aa98e2SPeter Wemm  mailertable, are only writable by trusted system personnel.
1639c2aa98e2SPeter Wemm
1640c2aa98e2SPeter Wemm* The queue directory should not be world writable PARTICULARLY
1641c2aa98e2SPeter Wemm  if your system allows "file giveaways" (that is, if a non-root
1642c2aa98e2SPeter Wemm  user can chown any file they own to any other user).
1643c2aa98e2SPeter Wemm
1644c2aa98e2SPeter Wemm* If your system allows file giveaways, DO NOT create a publically
1645c2aa98e2SPeter Wemm  writable directory for forward files.  This will allow anyone
1646c2aa98e2SPeter Wemm  to steal anyone else's e-mail.  Instead, create a script that
1647c2aa98e2SPeter Wemm  copies the .forward file from users' home directories once a
1648c2aa98e2SPeter Wemm  night (if you want the non-NFS-mounted forward directory).
1649c2aa98e2SPeter Wemm
1650c2aa98e2SPeter Wemm* If your system allows file giveaways, you'll find that
1651c2aa98e2SPeter Wemm  sendmail is much less trusting of :include: files -- in
1652c2aa98e2SPeter Wemm  particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
1653c2aa98e2SPeter Wemm  /etc/shells before they will be trusted (that is, before
1654c2aa98e2SPeter Wemm  files and programs listed in them will be honored).
1655c2aa98e2SPeter Wemm
1656c2aa98e2SPeter WemmIn general, file giveaways are a mistake -- if you can turn them
1657c2aa98e2SPeter Wemmoff I recommend you do so.
1658c2aa98e2SPeter Wemm
1659c2aa98e2SPeter Wemm
1660c2aa98e2SPeter Wemm+--------------------------------+
1661c2aa98e2SPeter Wemm| TWEAKING CONFIGURATION OPTIONS |
1662c2aa98e2SPeter Wemm+--------------------------------+
1663c2aa98e2SPeter Wemm
1664c2aa98e2SPeter WemmThere are a large number of configuration options that don't normally
1665c2aa98e2SPeter Wemmneed to be changed.  However, if you feel you need to tweak them, you
1666c2aa98e2SPeter Wemmcan define the following M4 variables.  This list is shown in four
1667c2aa98e2SPeter Wemmcolumns:  the name you define, the default value for that definition,
1668c2aa98e2SPeter Wemmthe option or macro that is affected (either Ox for an option or Dx
1669c2aa98e2SPeter Wemmfor a macro), and a brief description.  Greater detail of the semantics
1670c2aa98e2SPeter Wemmcan be found in the Installation and Operations Guide.
1671c2aa98e2SPeter Wemm
1672c2aa98e2SPeter WemmSome options are likely to be deprecated in future versions -- that is,
1673c2aa98e2SPeter Wemmthe option is only included to provide back-compatibility.  These are
1674c2aa98e2SPeter Wemmmarked with "*".
1675c2aa98e2SPeter Wemm
1676c2aa98e2SPeter WemmRemember that these options are M4 variables, and hence may need to
1677c2aa98e2SPeter Wemmbe quoted.  In particular, arguments with commas will usually have to
1678c2aa98e2SPeter Wemmbe ``double quoted, like this phrase'' to avoid having the comma
1679c2aa98e2SPeter Wemmconfuse things.  This is common for alias file definitions and for
1680c2aa98e2SPeter Wemmthe read timeout.
1681c2aa98e2SPeter Wemm
1682c2aa98e2SPeter WemmM4 Variable Name	Configuration	Description & [Default]
1683c2aa98e2SPeter Wemm================	=============	=======================
1684c2aa98e2SPeter WemmconfMAILER_NAME		$n macro	[MAILER-DAEMON] The sender name used
1685c2aa98e2SPeter Wemm					for internally generated outgoing
1686c2aa98e2SPeter Wemm					messages.
1687c2aa98e2SPeter WemmconfDOMAIN_NAME		$j macro	If defined, sets $j.  This should
1688c2aa98e2SPeter Wemm					only be done if your system cannot
1689c2aa98e2SPeter Wemm					determine your local domain name,
1690c2aa98e2SPeter Wemm					and then it should be set to
1691c2aa98e2SPeter Wemm					$w.Foo.COM, where Foo.COM is your
1692c2aa98e2SPeter Wemm					domain name.
1693c2aa98e2SPeter WemmconfCF_VERSION		$Z macro	If defined, this is appended to the
1694c2aa98e2SPeter Wemm					configuration version name.
1695c2aa98e2SPeter WemmconfFROM_HEADER		From:		[$?x$x <$g>$|$g$.] The format of an
1696c2aa98e2SPeter Wemm					internally generated From: address.
1697c2aa98e2SPeter WemmconfRECEIVED_HEADER	Received:
1698c2aa98e2SPeter Wemm		[$?sfrom $s $.$?_($?s$|from $.$_)
1699c2aa98e2SPeter Wemm			$.by $j ($v/$Z)$?r with $r$. id $i$?u
1700c2aa98e2SPeter Wemm			for $u; $|;
1701c2aa98e2SPeter Wemm			$.$b]
1702c2aa98e2SPeter Wemm					The format of the Received: header
1703c2aa98e2SPeter Wemm					in messages passed through this host.
1704c2aa98e2SPeter Wemm					It is unwise to try to change this.
1705c2aa98e2SPeter WemmconfCW_FILE		Fw class	[/etc/sendmail.cw] Name of file used
1706c2aa98e2SPeter Wemm					to get the local additions to the $=w
1707c2aa98e2SPeter Wemm					(local host names) class.
1708c2aa98e2SPeter WemmconfCT_FILE		Ft class	[/etc/sendmail.ct] Name of file used
1709c2aa98e2SPeter Wemm					to get the local additions to the $=t
1710c2aa98e2SPeter Wemm					(trusted users) class.
1711c2aa98e2SPeter WemmconfCR_FILE		FR class	[/etc/mail/relay-domains] Name of
1712c2aa98e2SPeter Wemm					file used to get the local additions
1713c2aa98e2SPeter Wemm					to the $=R (hosts allowed to relay)
1714c2aa98e2SPeter Wemm					class.
1715c2aa98e2SPeter WemmconfTRUSTED_USERS	Ct class	[no default] Names of users to add to
1716c2aa98e2SPeter Wemm					the list of trusted users.  This list
1717c2aa98e2SPeter Wemm					always includes root, uucp, and daemon.
1718c2aa98e2SPeter Wemm					See also FEATURE(use_ct_file).
1719c2aa98e2SPeter WemmconfSMTP_MAILER		-		[esmtp] The mailer name used when
1720c2aa98e2SPeter Wemm					SMTP connectivity is required.
1721c2aa98e2SPeter Wemm					One of "smtp", "smtp8", or "esmtp".
1722c2aa98e2SPeter WemmconfUUCP_MAILER		-		[uucp-old] The mailer to be used by
1723c2aa98e2SPeter Wemm					default for bang-format recipient
1724c2aa98e2SPeter Wemm					addresses.  See also discussion of
1725c2aa98e2SPeter Wemm					$=U, $=Y, and $=Z in the MAILER(uucp)
1726c2aa98e2SPeter Wemm					section.
1727c2aa98e2SPeter WemmconfLOCAL_MAILER	-		[local] The mailer name used when
1728c2aa98e2SPeter Wemm					local connectivity is required.
1729c2aa98e2SPeter Wemm					Almost always "local".
1730c2aa98e2SPeter WemmconfRELAY_MAILER	-		[relay] The default mailer name used
1731c2aa98e2SPeter Wemm					for relaying any mail (e.g., to a
1732c2aa98e2SPeter Wemm					BITNET_RELAY, a SMART_HOST, or
1733c2aa98e2SPeter Wemm					whatever).  This can reasonably be
1734c2aa98e2SPeter Wemm					"uucp-new" if you are on a
1735c2aa98e2SPeter Wemm					UUCP-connected site.
1736c2aa98e2SPeter WemmconfSEVEN_BIT_INPUT	SevenBitInput	[False] Force input to seven bits?
1737c2aa98e2SPeter WemmconfEIGHT_BIT_HANDLING	EightBitMode	[pass8] 8-bit data handling
1738c2aa98e2SPeter WemmconfALIAS_WAIT		AliasWait	[10m] Time to wait for alias file
1739c2aa98e2SPeter Wemm					rebuild until you get bored and
1740c2aa98e2SPeter Wemm					decide that the apparently pending
1741c2aa98e2SPeter Wemm					rebuild failed.
1742c2aa98e2SPeter WemmconfMIN_FREE_BLOCKS	MinFreeBlocks	[100] Minimum number of free blocks on
1743c2aa98e2SPeter Wemm					queue filesystem to accept SMTP mail.
1744c2aa98e2SPeter Wemm					(Prior to 8.7 this was minfree/maxsize,
1745c2aa98e2SPeter Wemm					where minfree was the number of free
1746c2aa98e2SPeter Wemm					blocks and maxsize was the maximum
1747c2aa98e2SPeter Wemm					message size.  Use confMAX_MESSAGE_SIZE
1748c2aa98e2SPeter Wemm					for the second value now.)
1749c2aa98e2SPeter WemmconfMAX_MESSAGE_SIZE	MaxMessageSize	[infinite] The maximum size of messages
1750c2aa98e2SPeter Wemm					that will be accepted (in bytes).
1751c2aa98e2SPeter WemmconfBLANK_SUB		BlankSub	[.] Blank (space) substitution
1752c2aa98e2SPeter Wemm					character.
1753c2aa98e2SPeter WemmconfCON_EXPENSIVE	HoldExpensive	[False] Avoid connecting immediately
1754c2aa98e2SPeter Wemm					to mailers marked expensive?
1755c2aa98e2SPeter WemmconfCHECKPOINT_INTERVAL	CheckpointInterval
1756c2aa98e2SPeter Wemm					[10] Checkpoint queue files every N
1757c2aa98e2SPeter Wemm					recipients.
1758c2aa98e2SPeter WemmconfDELIVERY_MODE	DeliveryMode	[background] Default delivery mode.
1759c2aa98e2SPeter WemmconfAUTO_REBUILD	AutoRebuildAliases
1760c2aa98e2SPeter Wemm					[False] Automatically rebuild alias
1761c2aa98e2SPeter Wemm					file if needed.
1762c2aa98e2SPeter WemmconfERROR_MODE		ErrorMode	[print] Error message mode.
1763c2aa98e2SPeter WemmconfERROR_MESSAGE	ErrorHeader	[undefined] Error message header/file.
1764065a643dSPeter WemmconfSAVE_FROM_LINES	SaveFromLine	Save extra leading From_ lines.
1765c2aa98e2SPeter WemmconfTEMP_FILE_MODE	TempFileMode	[0600] Temporary file mode.
1766c2aa98e2SPeter WemmconfMATCH_GECOS		MatchGECOS	[False] Match GECOS field.
1767c2aa98e2SPeter WemmconfMAX_HOP		MaxHopCount	[25] Maximum hop count.
1768c2aa98e2SPeter WemmconfIGNORE_DOTS*	IgnoreDots	[False; always False in -bs or -bd mode]
1769c2aa98e2SPeter Wemm					Ignore dot as terminator for incoming
1770c2aa98e2SPeter Wemm					messages?
1771c2aa98e2SPeter WemmconfBIND_OPTS		ResolverOptions	[undefined] Default options for DNS
1772c2aa98e2SPeter Wemm					resolver.
1773c2aa98e2SPeter WemmconfMIME_FORMAT_ERRORS*	SendMimeErrors	[True] Send error messages as MIME-
1774c2aa98e2SPeter Wemm					encapsulated messages per RFC 1344.
1775c2aa98e2SPeter WemmconfFORWARD_PATH	ForwardPath	[$z/.forward.$w:$z/.forward]
1776c2aa98e2SPeter Wemm					The colon-separated list of places to
1777c2aa98e2SPeter Wemm					search for .forward files.  N.B.: see
1778c2aa98e2SPeter Wemm					the Security Notes section.
1779c2aa98e2SPeter WemmconfMCI_CACHE_SIZE	ConnectionCacheSize
1780c2aa98e2SPeter Wemm					[2] Size of open connection cache.
1781c2aa98e2SPeter WemmconfMCI_CACHE_TIMEOUT	ConnectionCacheTimeout
1782c2aa98e2SPeter Wemm					[5m] Open connection cache timeout.
1783c2aa98e2SPeter WemmconfHOST_STATUS_DIRECTORY HostStatusDirectory
1784c2aa98e2SPeter Wemm					[undefined] If set, host status is kept
1785c2aa98e2SPeter Wemm					on disk between sendmail runs in the
1786c2aa98e2SPeter Wemm					named directory tree.  This need not be
1787c2aa98e2SPeter Wemm					a full pathname, in which case it is
1788c2aa98e2SPeter Wemm					interpreted relative to the queue
1789c2aa98e2SPeter Wemm					directory.
1790c2aa98e2SPeter WemmconfSINGLE_THREAD_DELIVERY  SingleThreadDelivery
1791c2aa98e2SPeter Wemm					[False] If this option and the
1792c2aa98e2SPeter Wemm					HostStatusDirectory option are both
1793c2aa98e2SPeter Wemm					set, single thread deliveries to other
1794c2aa98e2SPeter Wemm					hosts.  That is, don't allow any two
1795c2aa98e2SPeter Wemm					sendmails on this host to connect
1796c2aa98e2SPeter Wemm					simultaneously to any other single
1797c2aa98e2SPeter Wemm					host.  This can slow down delivery in
1798c2aa98e2SPeter Wemm					some cases, in particular since a
1799c2aa98e2SPeter Wemm					cached but otherwise idle connection
1800c2aa98e2SPeter Wemm					to a host will prevent other sendmails
1801c2aa98e2SPeter Wemm					from connecting to the other host.
1802c2aa98e2SPeter WemmconfUSE_ERRORS_TO*	UserErrorsTo	[False] Use the Errors-To: header to
1803c2aa98e2SPeter Wemm					deliver error messages.  This should
1804c2aa98e2SPeter Wemm					not be necessary because of general
1805c2aa98e2SPeter Wemm					acceptance of the envelope/header
1806c2aa98e2SPeter Wemm					distinction.
1807c2aa98e2SPeter WemmconfLOG_LEVEL		LogLevel	[9] Log level.
1808c2aa98e2SPeter WemmconfME_TOO		MeToo		[False] Include sender in group
1809c2aa98e2SPeter Wemm					expansions.
1810c2aa98e2SPeter WemmconfCHECK_ALIASES	CheckAliases	[False] Check RHS of aliases when
1811c2aa98e2SPeter Wemm					running newaliases.  Since this does
1812c2aa98e2SPeter Wemm					DNS lookups on every address, it can
1813c2aa98e2SPeter Wemm					slow down the alias rebuild process
1814c2aa98e2SPeter Wemm					considerably on large alias files.
1815c2aa98e2SPeter WemmconfOLD_STYLE_HEADERS*	OldStyleHeaders	[True] Assume that headers without
1816c2aa98e2SPeter Wemm					special chars are old style.
1817c2aa98e2SPeter WemmconfDAEMON_OPTIONS	DaemonPortOptions
1818c2aa98e2SPeter Wemm					[none] SMTP daemon options.
1819c2aa98e2SPeter WemmconfPRIVACY_FLAGS	PrivacyOptions	[authwarnings] Privacy flags.
1820c2aa98e2SPeter WemmconfCOPY_ERRORS_TO	PostmasterCopy	[undefined] Address for additional
1821c2aa98e2SPeter Wemm					copies of all error messages.
1822c2aa98e2SPeter WemmconfQUEUE_FACTOR	QueueFactor	[600000] Slope of queue-only function.
1823c2aa98e2SPeter WemmconfDONT_PRUNE_ROUTES	DontPruneRoutes	[False] Don't prune down route-addr
1824c2aa98e2SPeter Wemm					syntax addresses to the minimum
1825c2aa98e2SPeter Wemm					possible.
1826c2aa98e2SPeter WemmconfSAFE_QUEUE*		SuperSafe	[True] Commit all messages to disk
1827c2aa98e2SPeter Wemm					before forking.
1828c2aa98e2SPeter WemmconfTO_INITIAL		Timeout.initial	[5m] The timeout waiting for a response
1829c2aa98e2SPeter Wemm					on the initial connect.
1830c2aa98e2SPeter WemmconfTO_CONNECT		Timeout.connect	[0] The timeout waiting for an initial
1831c2aa98e2SPeter Wemm					connect() to complete.  This can only
1832c2aa98e2SPeter Wemm					shorten connection timeouts; the kernel
1833c2aa98e2SPeter Wemm					silently enforces an absolute maximum
1834c2aa98e2SPeter Wemm					(which varies depending on the system).
1835c2aa98e2SPeter WemmconfTO_ICONNECT		Timeout.iconnect
1836c2aa98e2SPeter Wemm					[undefined] Like Timeout.connect, but
1837c2aa98e2SPeter Wemm					applies only to the very first attempt
1838c2aa98e2SPeter Wemm					to connect to a host in a message.
1839c2aa98e2SPeter Wemm					This allows a single very fast pass
1840c2aa98e2SPeter Wemm					followed by more careful delivery
1841c2aa98e2SPeter Wemm					attempts in the future.
1842c2aa98e2SPeter WemmconfTO_HELO		Timeout.helo	[5m] The timeout waiting for a response
1843c2aa98e2SPeter Wemm					to a HELO or EHLO command.
1844c2aa98e2SPeter WemmconfTO_MAIL		Timeout.mail	[10m] The timeout waiting for a
1845c2aa98e2SPeter Wemm					response to the MAIL command.
1846c2aa98e2SPeter WemmconfTO_RCPT		Timeout.rcpt	[1h] The timeout waiting for a response
1847c2aa98e2SPeter Wemm					to the RCPT command.
1848c2aa98e2SPeter WemmconfTO_DATAINIT		Timeout.datainit
1849c2aa98e2SPeter Wemm					[5m] The timeout waiting for a 354
1850c2aa98e2SPeter Wemm					response from the DATA command.
1851c2aa98e2SPeter WemmconfTO_DATABLOCK	Timeout.datablock
1852c2aa98e2SPeter Wemm					[1h] The timeout waiting for a block
1853c2aa98e2SPeter Wemm					during DATA phase.
1854c2aa98e2SPeter WemmconfTO_DATAFINAL	Timeout.datafinal
1855c2aa98e2SPeter Wemm					[1h] The timeout waiting for a response
1856c2aa98e2SPeter Wemm					to the final "." that terminates a
1857c2aa98e2SPeter Wemm					message.
1858c2aa98e2SPeter WemmconfTO_RSET		Timeout.rset	[5m] The timeout waiting for a response
1859c2aa98e2SPeter Wemm					to the RSET command.
1860c2aa98e2SPeter WemmconfTO_QUIT		Timeout.quit	[2m] The timeout waiting for a response
1861c2aa98e2SPeter Wemm					to the QUIT command.
1862c2aa98e2SPeter WemmconfTO_MISC		Timeout.misc	[2m] The timeout waiting for a response
1863c2aa98e2SPeter Wemm					to other SMTP commands.
1864c2aa98e2SPeter WemmconfTO_COMMAND		Timeout.command	[1h] In server SMTP, the timeout waiting
1865c2aa98e2SPeter Wemm					for a command to be issued.
1866c2aa98e2SPeter WemmconfTO_IDENT		Timeout.ident	[30s] The timeout waiting for a response
1867c2aa98e2SPeter Wemm					to an IDENT query.
1868c2aa98e2SPeter WemmconfTO_FILEOPEN		Timeout.fileopen
1869c2aa98e2SPeter Wemm					[60s] The timeout waiting for a file
1870c2aa98e2SPeter Wemm					(e.g., :include: file) to be opened.
1871c2aa98e2SPeter WemmconfTO_QUEUERETURN	Timeout.queuereturn
1872c2aa98e2SPeter Wemm					[5d] The timeout before a message is
1873c2aa98e2SPeter Wemm					returned as undeliverable.
1874c2aa98e2SPeter WemmconfTO_QUEUERETURN_NORMAL
1875c2aa98e2SPeter Wemm			Timeout.queuereturn.normal
1876c2aa98e2SPeter Wemm					[undefined] As above, for normal
1877c2aa98e2SPeter Wemm					priority messages.
1878c2aa98e2SPeter WemmconfTO_QUEUERETURN_URGENT
1879c2aa98e2SPeter Wemm			Timeout.queuereturn.urgent
1880c2aa98e2SPeter Wemm					[undefined] As above, for urgent
1881c2aa98e2SPeter Wemm					priority messages.
1882c2aa98e2SPeter WemmconfTO_QUEUERETURN_NONURGENT
1883c2aa98e2SPeter Wemm			Timeout.queuereturn.non-urgent
1884c2aa98e2SPeter Wemm					[undefined] As above, for non-urgent
1885c2aa98e2SPeter Wemm					(low) priority messages.
1886c2aa98e2SPeter WemmconfTO_QUEUEWARN	Timeout.queuewarn
1887c2aa98e2SPeter Wemm					[4h] The timeout before a warning
1888c2aa98e2SPeter Wemm					message is sent to the sender telling
1889c2aa98e2SPeter Wemm					them that the message has been deferred.
1890c2aa98e2SPeter WemmconfTO_QUEUEWARN_NORMAL	Timeout.queuewarn.normal
1891c2aa98e2SPeter Wemm					[undefined] As above, for normal
1892c2aa98e2SPeter Wemm					priority messages.
1893c2aa98e2SPeter WemmconfTO_QUEUEWARN_URGENT	Timeout.queuewarn.urgent
1894c2aa98e2SPeter Wemm					[undefined] As above, for urgent
1895c2aa98e2SPeter Wemm					priority messages.
1896c2aa98e2SPeter WemmconfTO_QUEUEWARN_NONURGENT
1897c2aa98e2SPeter Wemm			Timeout.queuewarn.non-urgent
1898c2aa98e2SPeter Wemm					[undefined] As above, for non-urgent
1899c2aa98e2SPeter Wemm					(low) priority messages.
1900c2aa98e2SPeter WemmconfTO_HOSTSTATUS	Timeout.hoststatus
1901c2aa98e2SPeter Wemm					[30m] How long information about host
1902c2aa98e2SPeter Wemm					statuses will be maintained before it
1903c2aa98e2SPeter Wemm					is considered stale and the host should
1904c2aa98e2SPeter Wemm					be retried.  This applies both within
1905c2aa98e2SPeter Wemm					a single queue run and to persistent
1906c2aa98e2SPeter Wemm					information (see below).
1907c2aa98e2SPeter WemmconfTIME_ZONE		TimeZoneSpec	[USE_SYSTEM] Time zone info -- can be
1908c2aa98e2SPeter Wemm					USE_SYSTEM to use the system's idea,
1909c2aa98e2SPeter Wemm					USE_TZ to use the user's TZ envariable,
1910c2aa98e2SPeter Wemm					or something else to force that value.
1911c2aa98e2SPeter WemmconfDEF_USER_ID		DefaultUser	[1:1] Default user id.
1912c2aa98e2SPeter WemmconfUSERDB_SPEC		UserDatabaseSpec
1913c2aa98e2SPeter Wemm					[undefined] User database specification.
1914c2aa98e2SPeter WemmconfFALLBACK_MX		FallbackMXhost	[undefined] Fallback MX host.
1915c2aa98e2SPeter WemmconfTRY_NULL_MX_LIST	TryNullMXList	[False] If we are the best MX for a
1916c2aa98e2SPeter Wemm					host and haven't made other
1917c2aa98e2SPeter Wemm					arrangements, try connecting to the
1918c2aa98e2SPeter Wemm					host directly; normally this would be
1919c2aa98e2SPeter Wemm					a config error.
1920c2aa98e2SPeter WemmconfQUEUE_LA		QueueLA		[8] Load average at which queue-only
1921c2aa98e2SPeter Wemm					function kicks in.
1922c2aa98e2SPeter WemmconfREFUSE_LA		RefuseLA	[12] Load average at which incoming
1923c2aa98e2SPeter Wemm					SMTP connections are refused.
1924c2aa98e2SPeter WemmconfMAX_DAEMON_CHILDREN	MaxDaemonChildren
1925c2aa98e2SPeter Wemm					[undefined] The maximum number of
1926c2aa98e2SPeter Wemm					children the daemon will permit.  After
1927c2aa98e2SPeter Wemm					this number, connections will be
1928c2aa98e2SPeter Wemm					rejected.  If not set or <= 0, there is
1929c2aa98e2SPeter Wemm					no limit.
1930c2aa98e2SPeter WemmconfCONNECTION_RATE_THROTTLE ConnectionRateThrottle
1931c2aa98e2SPeter Wemm					[undefined] The maximum number of
1932c2aa98e2SPeter Wemm					connections permitted per second.
1933c2aa98e2SPeter Wemm					After this many connections are
1934c2aa98e2SPeter Wemm					accepted, further connections will be
1935c2aa98e2SPeter Wemm					delayed.  If not set or <= 0, there is
1936c2aa98e2SPeter Wemm					no limit.
1937c2aa98e2SPeter WemmconfWORK_RECIPIENT_FACTOR
1938c2aa98e2SPeter Wemm			RecipientFactor	[30000] Cost of each recipient.
1939c2aa98e2SPeter WemmconfSEPARATE_PROC	ForkEachJob	[False] Run all deliveries in a separate
1940c2aa98e2SPeter Wemm					process.
1941c2aa98e2SPeter WemmconfWORK_CLASS_FACTOR	ClassFactor	[1800] Priority multiplier for class.
1942c2aa98e2SPeter WemmconfWORK_TIME_FACTOR	RetryFactor	[90000] Cost of each delivery attempt.
1943c2aa98e2SPeter WemmconfQUEUE_SORT_ORDER	QueueSortOrder	[Priority] Queue sort algorithm:
1944c2aa98e2SPeter Wemm					Priority, Host, or Time.
1945c2aa98e2SPeter WemmconfMIN_QUEUE_AGE	MinQueueAge	[0] The minimum amount of time a job
1946c2aa98e2SPeter Wemm					must sit in the queue between queue
1947c2aa98e2SPeter Wemm					runs.  This allows you to set the
1948c2aa98e2SPeter Wemm					queue run interval low for better
1949c2aa98e2SPeter Wemm					responsiveness without trying all
1950c2aa98e2SPeter Wemm					jobs in each run.
1951c2aa98e2SPeter WemmconfDEF_CHAR_SET	DefaultCharSet	[unknown-8bit] When converting
1952c2aa98e2SPeter Wemm					unlabeled 8 bit input to MIME, the
1953c2aa98e2SPeter Wemm					character set to use by default.
1954c2aa98e2SPeter WemmconfSERVICE_SWITCH_FILE	ServiceSwitchFile
1955c2aa98e2SPeter Wemm					[/etc/service.switch] The file to use
1956c2aa98e2SPeter Wemm					for the service switch on systems that
1957c2aa98e2SPeter Wemm					do not have a system-defined switch.
1958c2aa98e2SPeter WemmconfHOSTS_FILE		HostsFile	[/etc/hosts] The file to use when doing
1959c2aa98e2SPeter Wemm					"file" type access of hosts names.
1960c2aa98e2SPeter WemmconfDIAL_DELAY		DialDelay	[0s] If a connection fails, wait this
1961c2aa98e2SPeter Wemm					long and try again.  Zero means "don't
1962c2aa98e2SPeter Wemm					retry".  This is to allow "dial on
1963c2aa98e2SPeter Wemm					demand" connections to have enough time
1964c2aa98e2SPeter Wemm					to complete a connection.
1965c2aa98e2SPeter WemmconfNO_RCPT_ACTION	NoRecipientAction
1966c2aa98e2SPeter Wemm					[none] What to do if there are no legal
1967c2aa98e2SPeter Wemm					recipient fields (To:, Cc: or Bcc:)
1968c2aa98e2SPeter Wemm					in the message.  Legal values can
1969c2aa98e2SPeter Wemm					be "none" to just leave the
1970c2aa98e2SPeter Wemm					nonconforming message as is, "add-to"
1971c2aa98e2SPeter Wemm					to add a To: header with all the
1972c2aa98e2SPeter Wemm					known recipients (which may expose
1973c2aa98e2SPeter Wemm					blind recipients), "add-apparently-to"
1974c2aa98e2SPeter Wemm					to do the same but use Apparently-To:
1975c2aa98e2SPeter Wemm					instead of To:, "add-bcc" to add an
1976c2aa98e2SPeter Wemm					empty Bcc: header, or
1977c2aa98e2SPeter Wemm					"add-to-undisclosed" to add the header
1978c2aa98e2SPeter Wemm					``To: undisclosed-recipients:;''.
1979c2aa98e2SPeter WemmconfSAFE_FILE_ENV	SafeFileEnvironment
1980c2aa98e2SPeter Wemm					[undefined] If set, sendmail will do a
1981c2aa98e2SPeter Wemm					chroot() into this directory before
1982c2aa98e2SPeter Wemm					writing files.
1983c2aa98e2SPeter WemmconfCOLON_OK_IN_ADDR	ColonOkInAddr	[True unless Configuration Level > 6]
1984c2aa98e2SPeter Wemm					If set, colons are treated as a regular
1985c2aa98e2SPeter Wemm					character in addresses.  If not set,
1986c2aa98e2SPeter Wemm					they are treated as the introducer to
1987c2aa98e2SPeter Wemm					the RFC 822 "group" syntax.  Colons are
1988c2aa98e2SPeter Wemm					handled properly in route-addrs.  This
1989c2aa98e2SPeter Wemm					option defaults on for V5 and lower
1990c2aa98e2SPeter Wemm					configuration files.
1991c2aa98e2SPeter WemmconfMAX_QUEUE_RUN_SIZE	MaxQueueRunSize	[0] If set, limit the maximum size of
1992c2aa98e2SPeter Wemm					any given queue run to this number of
1993c2aa98e2SPeter Wemm					entries.  Essentially, this will stop
1994c2aa98e2SPeter Wemm					reading the queue directory after this
1995c2aa98e2SPeter Wemm					number of entries are reached; it does
1996c2aa98e2SPeter Wemm					_not_ pick the highest priority jobs,
1997c2aa98e2SPeter Wemm					so this should be as large as your
1998c2aa98e2SPeter Wemm					system can tolerate.  If not set, there
1999c2aa98e2SPeter Wemm					is no limit.
2000c2aa98e2SPeter WemmconfDONT_EXPAND_CNAMES	DontExpandCnames
2001c2aa98e2SPeter Wemm					[False] If set, $[ ... $] lookups that
2002c2aa98e2SPeter Wemm					do DNS based lookups do not expand
2003c2aa98e2SPeter Wemm					CNAME records.  This currently violates
2004c2aa98e2SPeter Wemm					the published standards, but the IETF
2005c2aa98e2SPeter Wemm					seems to be moving toward legalizing
2006c2aa98e2SPeter Wemm					this.  For example, if "FTP.Foo.ORG"
2007c2aa98e2SPeter Wemm					is a CNAME for "Cruft.Foo.ORG", then
2008c2aa98e2SPeter Wemm					with this option set a lookup of
2009c2aa98e2SPeter Wemm					"FTP" will return "FTP.Foo.ORG"; if
2010c2aa98e2SPeter Wemm					clear it returns "Cruft.FOO.ORG".  N.B.
2011c2aa98e2SPeter Wemm					you may not see any effect until your
2012c2aa98e2SPeter Wemm					downstream neighbors stop doing CNAME
2013c2aa98e2SPeter Wemm					lookups as well.
2014c2aa98e2SPeter WemmconfFROM_LINE		UnixFromLine	[From $g  $d] The From_ line used
2015c2aa98e2SPeter Wemm					when sending to files or programs.
2016c2aa98e2SPeter WemmconfSINGLE_LINE_FROM_HEADER  SingleLineFromHeader
2017c2aa98e2SPeter Wemm					[False] From: lines that have
2018c2aa98e2SPeter Wemm					embedded newlines are unwrapped
2019c2aa98e2SPeter Wemm					onto one line.
2020c2aa98e2SPeter WemmconfALLOW_BOGUS_HELO	AllowBogusHELO	[False] Allow HELO SMTP command that
2021c2aa98e2SPeter Wemm					does not include a host name.
2022c2aa98e2SPeter WemmconfMUST_QUOTE_CHARS	MustQuoteChars	[.'] Characters to be quoted in a full
2023c2aa98e2SPeter Wemm					name phrase (@,;:\()[] are automatic).
2024c2aa98e2SPeter WemmconfOPERATORS		OperatorChars	[.:%@!^/[]+] Address operator
2025c2aa98e2SPeter Wemm					characters.
2026c2aa98e2SPeter WemmconfSMTP_LOGIN_MSG	SmtpGreetingMessage
2027c2aa98e2SPeter Wemm					[$j Sendmail $v/$Z; $b]
2028c2aa98e2SPeter Wemm					The initial (spontaneous) SMTP
2029c2aa98e2SPeter Wemm					greeting message.  The word "ESMTP"
2030c2aa98e2SPeter Wemm					will be inserted between the first and
2031c2aa98e2SPeter Wemm					second words to convince other
2032c2aa98e2SPeter Wemm					sendmails to try to speak ESMTP.
2033c2aa98e2SPeter WemmconfDONT_INIT_GROUPS	DontInitGroups	[False] If set, the initgroups(3)
2034c2aa98e2SPeter Wemm					routine will never be invoked.  You
2035c2aa98e2SPeter Wemm					might want to do this if you are
2036c2aa98e2SPeter Wemm					running NIS and you have a large group
2037c2aa98e2SPeter Wemm					map, since this call does a sequential
2038c2aa98e2SPeter Wemm					scan of the map; in a large site this
2039c2aa98e2SPeter Wemm					can cause your ypserv to run
2040c2aa98e2SPeter Wemm					essentially full time.  If you set
2041c2aa98e2SPeter Wemm					this, agents run on behalf of users
2042c2aa98e2SPeter Wemm					will only have their primary
2043c2aa98e2SPeter Wemm					(/etc/passwd) group permissions.
2044c2aa98e2SPeter WemmconfUNSAFE_GROUP_WRITES	UnsafeGroupWrites
2045c2aa98e2SPeter Wemm					[False] If set, group-writable
2046c2aa98e2SPeter Wemm					:include: and .forward files are
2047c2aa98e2SPeter Wemm					considered "unsafe", that is, programs
2048c2aa98e2SPeter Wemm					and files cannot be directly referenced
2049c2aa98e2SPeter Wemm					from such files.  World-writable files
2050c2aa98e2SPeter Wemm					are always considered unsafe.
2051c2aa98e2SPeter WemmconfDOUBLE_BOUNCE_ADDRESS  DoubleBounceAddress
2052c2aa98e2SPeter Wemm					[postmaster] If an error occurs when
2053c2aa98e2SPeter Wemm					sending an error message, send that
2054c2aa98e2SPeter Wemm					"double bounce" error message to this
2055c2aa98e2SPeter Wemm					address.
2056c2aa98e2SPeter WemmconfRUN_AS_USER		RunAsUser	[undefined] If set, become this user
2057c2aa98e2SPeter Wemm					when reading and delivering mail.
2058c2aa98e2SPeter Wemm					Causes all file reads (e.g., .forward
2059c2aa98e2SPeter Wemm					and :include: files) to be done as
2060c2aa98e2SPeter Wemm					this user.  Also, all programs will
2061c2aa98e2SPeter Wemm					be run as this user, and all output
2062c2aa98e2SPeter Wemm					files will be written as this user.
2063c2aa98e2SPeter Wemm					Intended for use only on firewalls
2064c2aa98e2SPeter Wemm					where users do not have accounts.
2065c2aa98e2SPeter WemmconfMAX_RCPTS_PER_MESSAGE  MaxRecipientsPerMessage
2066c2aa98e2SPeter Wemm					[infinite] If set, allow no more than
2067c2aa98e2SPeter Wemm					the specified number of recipients in
2068c2aa98e2SPeter Wemm					an SMTP envelope.  Further recipients
2069c2aa98e2SPeter Wemm					receive a 452 error code (i.e., they
2070c2aa98e2SPeter Wemm					are deferred for the next delivery
2071c2aa98e2SPeter Wemm					attempt).
2072c2aa98e2SPeter WemmconfDONT_PROBE_INTERFACES  DontProbeInterfaces
2073c2aa98e2SPeter Wemm					[False] If set, sendmail will _not_
2074c2aa98e2SPeter Wemm					insert the names and addresses of any
2075c2aa98e2SPeter Wemm					local interfaces into the $=w class
2076c2aa98e2SPeter Wemm					(list of known "equivalent" addresses).
2077c2aa98e2SPeter Wemm					If you set this, you must also include
2078c2aa98e2SPeter Wemm					some support for these addresses (e.g.,
2079c2aa98e2SPeter Wemm					in a mailertable entry) -- otherwise,
2080c2aa98e2SPeter Wemm					mail to addresses in this list will
2081c2aa98e2SPeter Wemm					bounce with a configuration error.
2082c2aa98e2SPeter WemmconfDONT_BLAME_SENDMAIL	DontBlameSendmail
2083c2aa98e2SPeter Wemm					[safe] Override sendmail's file
2084c2aa98e2SPeter Wemm					safety checks.  This will definitely
2085c2aa98e2SPeter Wemm					compromise system security and should
2086c2aa98e2SPeter Wemm					not be used unless absolutely
2087c2aa98e2SPeter Wemm					necessary.
2088c2aa98e2SPeter WemmconfREJECT_MSG		-		[550 Access denied] The message
2089c2aa98e2SPeter Wemm					given if the access database contains
2090c2aa98e2SPeter Wemm					REJECT in the value portion.
2091c2aa98e2SPeter Wemm
2092c2aa98e2SPeter WemmSee also the description of OSTYPE for some parameters that can be
2093c2aa98e2SPeter Wemmtweaked (generally pathnames to mailers).
2094c2aa98e2SPeter Wemm
2095c2aa98e2SPeter Wemm
2096c2aa98e2SPeter Wemm+-----------+
2097c2aa98e2SPeter Wemm| HIERARCHY |
2098c2aa98e2SPeter Wemm+-----------+
2099c2aa98e2SPeter Wemm
2100c2aa98e2SPeter WemmWithin this directory are several subdirectories, to wit:
2101c2aa98e2SPeter Wemm
2102c2aa98e2SPeter Wemmm4		General support routines.  These are typically
2103c2aa98e2SPeter Wemm		very important and should not be changed without
2104c2aa98e2SPeter Wemm		very careful consideration.
2105c2aa98e2SPeter Wemm
2106c2aa98e2SPeter Wemmcf		The configuration files themselves.  They have
2107c2aa98e2SPeter Wemm		".mc" suffixes, and must be run through m4 to
2108c2aa98e2SPeter Wemm		become complete.  The resulting output should
2109c2aa98e2SPeter Wemm		have a ".cf" suffix.
2110c2aa98e2SPeter Wemm
2111c2aa98e2SPeter Wemmostype		Definitions describing a particular operating
2112c2aa98e2SPeter Wemm		system type.  These should always be referenced
2113c2aa98e2SPeter Wemm		using the OSTYPE macro in the .mc file.  Examples
2114c2aa98e2SPeter Wemm		include "bsd4.3", "bsd4.4", "sunos3.5", and
2115c2aa98e2SPeter Wemm		"sunos4.1".
2116c2aa98e2SPeter Wemm
2117c2aa98e2SPeter Wemmdomain		Definitions describing a particular domain, referenced
2118c2aa98e2SPeter Wemm		using the DOMAIN macro in the .mc file.  These are
2119c2aa98e2SPeter Wemm		site dependent; for example, "CS.Berkeley.EDU.m4"
2120c2aa98e2SPeter Wemm		describes hosts in the CS.Berkeley.EDU subdomain.
2121c2aa98e2SPeter Wemm
2122c2aa98e2SPeter Wemmmailer		Descriptions of mailers.   These are referenced using
2123c2aa98e2SPeter Wemm		the MAILER macro in the .mc file.
2124c2aa98e2SPeter Wemm
2125c2aa98e2SPeter Wemmsh		Shell files used when building the .cf file from the
2126c2aa98e2SPeter Wemm		.mc file in the cf subdirectory.
2127c2aa98e2SPeter Wemm
2128c2aa98e2SPeter Wemmfeature		These hold special orthogonal features that you might
2129c2aa98e2SPeter Wemm		want to include.  They should be referenced using
2130c2aa98e2SPeter Wemm		the FEATURE macro.
2131c2aa98e2SPeter Wemm
2132c2aa98e2SPeter Wemmhack		Local hacks.  These can be referenced using the HACK
2133c2aa98e2SPeter Wemm		macro.  They shouldn't be of more than voyeuristic
2134c2aa98e2SPeter Wemm		interest outside the .Berkeley.EDU domain, but who knows?
2135c2aa98e2SPeter Wemm		We've all got our own peccadillos.
2136c2aa98e2SPeter Wemm
2137c2aa98e2SPeter Wemmsiteconfig	Site configuration -- e.g., tables of locally connected
2138c2aa98e2SPeter Wemm		UUCP sites.
2139c2aa98e2SPeter Wemm
2140c2aa98e2SPeter Wemm
2141c2aa98e2SPeter Wemm+------------------------+
2142c2aa98e2SPeter Wemm| ADMINISTRATIVE DETAILS |
2143c2aa98e2SPeter Wemm+------------------------+
2144c2aa98e2SPeter Wemm
2145c2aa98e2SPeter WemmThe following sections detail usage of certain internal parts of the
2146c2aa98e2SPeter Wemmsendmail.cf file.  Read them carefully if you are trying to modify
2147c2aa98e2SPeter Wemmthe current model.  If you find the above descriptions adequate, these
2148c2aa98e2SPeter Wemmshould be {boring, confusing, tedious, ridiculous} (pick one or more).
2149c2aa98e2SPeter Wemm
2150c2aa98e2SPeter WemmRULESETS (* means built in to sendmail)
2151c2aa98e2SPeter Wemm
2152c2aa98e2SPeter Wemm   0 *	Parsing
2153c2aa98e2SPeter Wemm   1 *	Sender rewriting
2154c2aa98e2SPeter Wemm   2 *	Recipient rewriting
2155c2aa98e2SPeter Wemm   3 *	Canonicalization
2156c2aa98e2SPeter Wemm   4 *	Post cleanup
2157c2aa98e2SPeter Wemm   5 *	Local address rewrite (after aliasing)
2158c2aa98e2SPeter Wemm  1x	mailer rules (sender qualification)
2159c2aa98e2SPeter Wemm  2x	mailer rules (recipient qualification)
2160c2aa98e2SPeter Wemm  3x	mailer rules (sender header qualification)
2161c2aa98e2SPeter Wemm  4x	mailer rules (recipient header qualification)
2162c2aa98e2SPeter Wemm  5x	mailer subroutines (general)
2163c2aa98e2SPeter Wemm  6x	mailer subroutines (general)
2164c2aa98e2SPeter Wemm  7x	mailer subroutines (general)
2165c2aa98e2SPeter Wemm  8x	reserved
2166c2aa98e2SPeter Wemm  90	Mailertable host stripping
2167c2aa98e2SPeter Wemm  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
2168c2aa98e2SPeter Wemm  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
2169c2aa98e2SPeter Wemm  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
2170c2aa98e2SPeter Wemm  99	Guaranteed null (for debugging)
2171c2aa98e2SPeter Wemm
2172c2aa98e2SPeter Wemm
2173c2aa98e2SPeter WemmMAILERS
2174c2aa98e2SPeter Wemm
2175c2aa98e2SPeter Wemm   0	local, prog	local and program mailers
2176c2aa98e2SPeter Wemm   1	[e]smtp, relay	SMTP channel
2177c2aa98e2SPeter Wemm   2	uucp-*		UNIX-to-UNIX Copy Program
2178c2aa98e2SPeter Wemm   3	netnews		Network News delivery
2179c2aa98e2SPeter Wemm   4	fax		Sam Leffler's HylaFAX software
2180c2aa98e2SPeter Wemm   5	mail11		DECnet mailer
2181c2aa98e2SPeter Wemm
2182c2aa98e2SPeter Wemm
2183c2aa98e2SPeter WemmMACROS
2184c2aa98e2SPeter Wemm
2185c2aa98e2SPeter Wemm   A
2186c2aa98e2SPeter Wemm   B	Bitnet Relay
2187c2aa98e2SPeter Wemm   C	DECnet Relay
2188c2aa98e2SPeter Wemm   D	The local domain -- usually not needed
2189c2aa98e2SPeter Wemm   E	reserved for X.400 Relay
2190c2aa98e2SPeter Wemm   F	FAX Relay
2191c2aa98e2SPeter Wemm   G
2192c2aa98e2SPeter Wemm   H	mail Hub (for mail clusters)
2193c2aa98e2SPeter Wemm   I
2194c2aa98e2SPeter Wemm   J
2195c2aa98e2SPeter Wemm   K
2196c2aa98e2SPeter Wemm   L	Luser Relay
2197c2aa98e2SPeter Wemm   M	Masquerade (who I claim to be)
2198c2aa98e2SPeter Wemm   N
2199c2aa98e2SPeter Wemm   O
2200c2aa98e2SPeter Wemm   P
2201c2aa98e2SPeter Wemm   Q
2202c2aa98e2SPeter Wemm   R	Relay (for unqualified names)
2203c2aa98e2SPeter Wemm   S	Smart Host
2204c2aa98e2SPeter Wemm   T
2205c2aa98e2SPeter Wemm   U	my UUCP name (if I have a UUCP connection)
2206c2aa98e2SPeter Wemm   V	UUCP Relay (class V hosts)
2207c2aa98e2SPeter Wemm   W	UUCP Relay (class W hosts)
2208c2aa98e2SPeter Wemm   X	UUCP Relay (class X hosts)
2209c2aa98e2SPeter Wemm   Y	UUCP Relay (all other hosts)
2210c2aa98e2SPeter Wemm   Z	Version number
2211c2aa98e2SPeter Wemm
2212c2aa98e2SPeter Wemm
2213c2aa98e2SPeter WemmCLASSES
2214c2aa98e2SPeter Wemm
2215c2aa98e2SPeter Wemm   A
2216c2aa98e2SPeter Wemm   B	domains that are candidates for bestmx lookup
2217c2aa98e2SPeter Wemm   C
2218c2aa98e2SPeter Wemm   D
2219c2aa98e2SPeter Wemm   E	addresses that should not seem to come from $M
2220c2aa98e2SPeter Wemm   F	hosts we forward for
2221c2aa98e2SPeter Wemm   G	domains that should be looked up in genericstable
2222c2aa98e2SPeter Wemm   H
2223c2aa98e2SPeter Wemm   I
2224c2aa98e2SPeter Wemm   J
2225c2aa98e2SPeter Wemm   K
2226c2aa98e2SPeter Wemm   L	addresses that should not be forwarded to $R
2227c2aa98e2SPeter Wemm   M	domains that should be mapped to $M
2228c2aa98e2SPeter Wemm   N
2229c2aa98e2SPeter Wemm   O	operators that indicate network operations (cannot be in local names)
2230c2aa98e2SPeter Wemm   P	top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc.
2231c2aa98e2SPeter Wemm   Q
2232c2aa98e2SPeter Wemm   R	domains we are willing to relay (pass anti-spam filters)
2233c2aa98e2SPeter Wemm   S
2234c2aa98e2SPeter Wemm   T
2235c2aa98e2SPeter Wemm   U	locally connected UUCP hosts
2236c2aa98e2SPeter Wemm   V	UUCP hosts connected to relay $V
2237c2aa98e2SPeter Wemm   W	UUCP hosts connected to relay $W
2238c2aa98e2SPeter Wemm   X	UUCP hosts connected to relay $X
2239c2aa98e2SPeter Wemm   Y	locally connected smart UUCP hosts
2240c2aa98e2SPeter Wemm   Z	locally connected domain-ized UUCP hosts
2241c2aa98e2SPeter Wemm   .	the class containing only a dot
2242c2aa98e2SPeter Wemm   [	the class containing only a left bracket
2243c2aa98e2SPeter Wemm
2244c2aa98e2SPeter Wemm
2245c2aa98e2SPeter WemmM4 DIVERSIONS
2246c2aa98e2SPeter Wemm
2247c2aa98e2SPeter Wemm   1	Local host detection and resolution
2248c2aa98e2SPeter Wemm   2	Local Ruleset 3 additions
2249c2aa98e2SPeter Wemm   3	Local Ruleset 0 additions
2250c2aa98e2SPeter Wemm   4	UUCP Ruleset 0 additions
2251c2aa98e2SPeter Wemm   5	locally interpreted names (overrides $R)
2252c2aa98e2SPeter Wemm   6	local configuration (at top of file)
2253c2aa98e2SPeter Wemm   7	mailer definitions
2254c2aa98e2SPeter Wemm   8
2255c2aa98e2SPeter Wemm   9	special local rulesets (1 and 2)
2256