xref: /freebsd/contrib/sendmail/cf/README (revision c2aa98e247e56d5266d789dfc9b90b524b0019fe)
1c2aa98e2SPeter Wemm
2c2aa98e2SPeter Wemm
3c2aa98e2SPeter Wemm		NEW SENDMAIL CONFIGURATION FILES
4c2aa98e2SPeter Wemm
5c2aa98e2SPeter Wemm		Eric Allman <eric@Sendmail.ORG>
6c2aa98e2SPeter Wemm
7c2aa98e2SPeter Wemm		@(#)README	8.174 (Berkeley) 6/30/98
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.
722c2aa98e2SPeter Wemm
723c2aa98e2SPeter Wemmlocal_lmtp	Use an LMTP capable local mailer.  The argument to this
724c2aa98e2SPeter Wemm		feature is the pathname of an LMTP capable mailer.  By
725c2aa98e2SPeter Wemm		default, mail.local is used.  This is expected to be the
726c2aa98e2SPeter Wemm		mail.local which came with the 8.9 distribution which is
727c2aa98e2SPeter Wemm		LMTP capable.  The path to mail.local is set by the
728c2aa98e2SPeter Wemm		confEBINDIR m4 variable -- making the default
729c2aa98e2SPeter Wemm		LOCAL_MAILER_PATH /usr/libexec/mail.local.
730c2aa98e2SPeter Wemm
731c2aa98e2SPeter Wemmlocal_procmail	Use procmail as the local mailer.  This mailer can
732c2aa98e2SPeter Wemm		make use of the "user+indicator@local.host" syntax;
733c2aa98e2SPeter Wemm		normally the +indicator is just tossed, but by default
734c2aa98e2SPeter Wemm		it is passed as the -a argument to procmail.  The
735c2aa98e2SPeter Wemm		argument to this feature is the pathname of procmail,
736c2aa98e2SPeter Wemm		which defaults to PROCMAIL_MAILER_PATH.  Note that this
737c2aa98e2SPeter Wemm		does NOT use PROCMAIL_MAILER_FLAGS or PROCMAIL_MAILER_ARGS
738c2aa98e2SPeter Wemm		for the local mailer; tweak LOCAL_MAILER_FLAGS and
739c2aa98e2SPeter Wemm		LOCAL_MAILER_ARGS instead.
740c2aa98e2SPeter Wemm
741c2aa98e2SPeter Wemmbestmx_is_local	Accept mail as though locally addressed for any host that
742c2aa98e2SPeter Wemm		lists us as the best possible MX record.  This generates
743c2aa98e2SPeter Wemm		additional DNS traffic, but should be OK for low to
744c2aa98e2SPeter Wemm		medium traffic hosts.  The argument may be a set of
745c2aa98e2SPeter Wemm		domains, which will limit the feature to only apply to
746c2aa98e2SPeter Wemm		these domains -- this will reduce unnecessary DNS
747c2aa98e2SPeter Wemm		traffic.  THIS FEATURE IS FUNDAMENTALLY INCOMPATIBLE WITH
748c2aa98e2SPeter Wemm		WILDCARD MX RECORDS!!!  If you have a wildcard MX record
749c2aa98e2SPeter Wemm		that matches your domain, you cannot use this feature.
750c2aa98e2SPeter Wemm
751c2aa98e2SPeter Wemmsmrsh		Use the SendMail Restricted SHell (smrsh) provided
752c2aa98e2SPeter Wemm		with the distribution instead of /bin/sh for mailing
753c2aa98e2SPeter Wemm		to programs.  This improves the ability of the local
754c2aa98e2SPeter Wemm		system administrator to control what gets run via
755c2aa98e2SPeter Wemm		e-mail.  If an argument is provided it is used as the
756c2aa98e2SPeter Wemm		pathname to smrsh; otherwise, the path defined by
757c2aa98e2SPeter Wemm		confEBINDIR is used for the smrsh binary -- by default,
758c2aa98e2SPeter Wemm		/usr/libexec/smrsh is assumed.
759c2aa98e2SPeter Wemm
760c2aa98e2SPeter Wemmpromiscuous_relay
761c2aa98e2SPeter Wemm		By default, the sendmail configuration files do not permit
762c2aa98e2SPeter Wemm		mail relaying (that is, accepting mail from outside your
763c2aa98e2SPeter Wemm		domain and sending it to another host outside your domain).
764c2aa98e2SPeter Wemm		This option sets your site to allow mail relaying from any
765c2aa98e2SPeter Wemm		site to any site.  In general, it is better to control the
766c2aa98e2SPeter Wemm		relaying more carefully with the access db and the 'R'
767c2aa98e2SPeter Wemm		class ($=R).  Domains can be added to class 'R' by the
768c2aa98e2SPeter Wemm		macros RELAY_DOMAIN or RELAY_DOMAIN_FILE (analogously to
769c2aa98e2SPeter Wemm		MASQUERADE_DOMAIN and MASQUERADE_DOMAIN_FILE, see below).
770c2aa98e2SPeter Wemm
771c2aa98e2SPeter Wemmrelay_entire_domain
772c2aa98e2SPeter Wemm		By default, only hosts listed as RELAY in the access db
773c2aa98e2SPeter Wemm		will be allowed to relay.  This option also allows any
774c2aa98e2SPeter Wemm		host in your domain as defined by the 'm' class ($=m).
775c2aa98e2SPeter Wemm
776c2aa98e2SPeter Wemmrelay_hosts_only
777c2aa98e2SPeter Wemm		By default, names that are listed as RELAY in the access
778c2aa98e2SPeter Wemm		db and class 'R' ($=R) are domain names, not host names.
779c2aa98e2SPeter Wemm		For example, if you specify ``foo.com'', then mail to or
780c2aa98e2SPeter Wemm		from foo.com, abc.foo.com, or a.very.deep.domain.foo.com
781c2aa98e2SPeter Wemm		will all be accepted for relaying.  This feature changes
782c2aa98e2SPeter Wemm		the behaviour to lookup individual host names only.
783c2aa98e2SPeter Wemm
784c2aa98e2SPeter Wemmrelay_based_on_MX
785c2aa98e2SPeter Wemm		Turns on the ability to allow relaying based on the MX
786c2aa98e2SPeter Wemm		records of the host portion of an incoming recipient.  See
787c2aa98e2SPeter Wemm		description below for more information before using this
788c2aa98e2SPeter Wemm		feature.
789c2aa98e2SPeter Wemm
790c2aa98e2SPeter Wemmrelay_local_from
791c2aa98e2SPeter Wemm		Allows relaying if the domain portion of the mail sender
792c2aa98e2SPeter Wemm		is a local host.  This should only be used if absolutely
793c2aa98e2SPeter Wemm		necessary as it opens a window for spammers.
794c2aa98e2SPeter Wemm
795c2aa98e2SPeter Wemmaccept_unqualified_senders
796c2aa98e2SPeter Wemm		Normally, MAIL FROM: commands in the SMTP session will be
797c2aa98e2SPeter Wemm		refused if the connection is a network connection and the
798c2aa98e2SPeter Wemm		sender address does not include a domain name.  If your
799c2aa98e2SPeter Wemm		setup sends local mail unqualified (i.e. MAIL FROM: <joe>),
800c2aa98e2SPeter Wemm		you will need to use this feature to accept unqualified
801c2aa98e2SPeter Wemm		sender addresses.
802c2aa98e2SPeter Wemm
803c2aa98e2SPeter Wemmaccept_unresolvable_domains
804c2aa98e2SPeter Wemm		Normally, MAIL FROM: commands in the SMTP session will be
805c2aa98e2SPeter Wemm		refused if the host part of the argument to MAIL FROM: cannot
806c2aa98e2SPeter Wemm		be located in the host name service (e.g., DNS).  If you are
807c2aa98e2SPeter Wemm		inside a firewall that has only a limited view of the
808c2aa98e2SPeter Wemm		Internet host name space, this could cause problems.  In this
809c2aa98e2SPeter Wemm		case you probably want to use this feature to accept all
810c2aa98e2SPeter Wemm		domains on input, even if they are unresolvable.
811c2aa98e2SPeter Wemm
812c2aa98e2SPeter Wemmaccess_db	Turns on the access database feature.  The access db gives
813c2aa98e2SPeter Wemm		you the ability to allow or refuse to accept mail from
814c2aa98e2SPeter Wemm		specified domains for administrative reasons.  By default,
815c2aa98e2SPeter Wemm		the access database specification is
816c2aa98e2SPeter Wemm		``hash -o /etc/mail/access''.  The format of the
817c2aa98e2SPeter Wemm		database is described below.
818c2aa98e2SPeter Wemm
819c2aa98e2SPeter Wemmblacklist_recipients
820c2aa98e2SPeter Wemm		Turns on the ability to block incoming mail for certain
821c2aa98e2SPeter Wemm		recipient usernames, hostnames, or addresses.  For
822c2aa98e2SPeter Wemm		example, you can block incoming mail to user nobody,
823c2aa98e2SPeter Wemm		host foo.mydomain.com, or guest@bar.mydomain.com.
824c2aa98e2SPeter Wemm		These specifications are put in the access db as
825c2aa98e2SPeter Wemm		described below.
826c2aa98e2SPeter Wemm
827c2aa98e2SPeter Wemmrbl		Turns on rejection of hosts found in the Realtime Blackhole
828c2aa98e2SPeter Wemm		List.  If an argument is provided it is used as the
829c2aa98e2SPeter Wemm                name sever to contact; otherwise, the main RBL server at
830c2aa98e2SPeter Wemm		rbl.maps.vix.com is used.  For details, see
831c2aa98e2SPeter Wemm		http://maps.vix.com/rbl/.
832c2aa98e2SPeter Wemm
833c2aa98e2SPeter Wemmloose_relay_check
834c2aa98e2SPeter Wemm		Normally, if a recipient using % addressing is used, e.g.
835c2aa98e2SPeter Wemm		user%site@othersite, and othersite is in class 'R', the
836c2aa98e2SPeter Wemm		check_rcpt ruleset will strip @othersite and recheck
837c2aa98e2SPeter Wemm		user@site for relaying.  This feature changes that
838c2aa98e2SPeter Wemm		behavior.  It should not be needed for most installations.
839c2aa98e2SPeter Wemm
840c2aa98e2SPeter Wemm
841c2aa98e2SPeter Wemm+-------+
842c2aa98e2SPeter Wemm| HACKS |
843c2aa98e2SPeter Wemm+-------+
844c2aa98e2SPeter Wemm
845c2aa98e2SPeter WemmSome things just can't be called features.  To make this clear,
846c2aa98e2SPeter Wemmthey go in the hack subdirectory and are referenced using the HACK
847c2aa98e2SPeter Wemmmacro.  These will tend to be site-dependent.  The release
848c2aa98e2SPeter Wemmincludes the Berkeley-dependent "cssubdomain" hack (that makes
849c2aa98e2SPeter Wemmsendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
850c2aa98e2SPeter Wemmthis is intended as a short-term aid while we move hosts into
851c2aa98e2SPeter Wemmsubdomains.
852c2aa98e2SPeter Wemm
853c2aa98e2SPeter Wemm
854c2aa98e2SPeter Wemm+--------------------+
855c2aa98e2SPeter Wemm| SITE CONFIGURATION |
856c2aa98e2SPeter Wemm+--------------------+
857c2aa98e2SPeter Wemm
858c2aa98e2SPeter Wemm    *****************************************************
859c2aa98e2SPeter Wemm    * This section is really obsolete, and is preserved	*
860c2aa98e2SPeter Wemm    * only for back compatibility.  You should plan on	*
861c2aa98e2SPeter Wemm    * using mailertables for new installations.	  In	*
862c2aa98e2SPeter Wemm    * particular, it doesn't work for the newer forms	*
863c2aa98e2SPeter Wemm    * of UUCP mailers, such as uucp-uudom.		*
864c2aa98e2SPeter Wemm    *****************************************************
865c2aa98e2SPeter Wemm
866c2aa98e2SPeter WemmComplex sites will need more local configuration information, such as
867c2aa98e2SPeter Wemmlists of UUCP hosts they speak with directly.  This can get a bit more
868c2aa98e2SPeter Wemmtricky.  For an example of a "complex" site, see cf/ucbvax.mc.
869c2aa98e2SPeter Wemm
870c2aa98e2SPeter WemmIf your host is known by several different names, you need to augment
871c2aa98e2SPeter Wemmthe $=w class.  This is a list of names by which you are known, and
872c2aa98e2SPeter Wemmanything sent to an address using a host name in this list will be
873c2aa98e2SPeter Wemmtreated as local mail.  You can do this in two ways: either create
874c2aa98e2SPeter Wemmthe file /etc/sendmail.cw containing a list of your aliases (one per
875c2aa98e2SPeter Wemmline), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
876c2aa98e2SPeter Wemmline:
877c2aa98e2SPeter Wemm
878c2aa98e2SPeter Wemm	Cw alias.host.name
879c2aa98e2SPeter Wemm
880c2aa98e2SPeter Wemmat the end of that file.  See the ``vangogh.mc'' file for an example.
881c2aa98e2SPeter WemmBe sure you use the fully-qualified name of the host, rather than a
882c2aa98e2SPeter Wemmshort name.
883c2aa98e2SPeter Wemm
884c2aa98e2SPeter WemmThe SITECONFIG macro allows you to indirectly reference site-dependent
885c2aa98e2SPeter Wemmconfiguration information stored in the siteconfig subdirectory.  For
886c2aa98e2SPeter Wemmexample, the line
887c2aa98e2SPeter Wemm
888c2aa98e2SPeter Wemm	SITECONFIG(uucp.ucbvax, ucbvax, U)
889c2aa98e2SPeter Wemm
890c2aa98e2SPeter Wemmreads the file uucp.ucbvax for local connection information.  The
891c2aa98e2SPeter Wemmsecond parameter is the local name (in this case just "ucbvax" since
892c2aa98e2SPeter Wemmit is locally connected, and hence a UUCP hostname).  The third
893c2aa98e2SPeter Wemmparameter is the name of both a macro to store the local name (in
894c2aa98e2SPeter Wemmthis case, $U) and the name of the class (e.g., $=U) in which to store
895c2aa98e2SPeter Wemmthe host information read from the file.  Another SITECONFIG line reads
896c2aa98e2SPeter Wemm
897c2aa98e2SPeter Wemm	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
898c2aa98e2SPeter Wemm
899c2aa98e2SPeter WemmThis says that the file uucp.ucbarpa contains the list of UUCP sites
900c2aa98e2SPeter Wemmconnected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
901c2aa98e2SPeter Wemmstore this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
902c2aa98e2SPeter Wemmis, the name of the relay to which the hosts listed in uucp.ucbarpa
903c2aa98e2SPeter Wemmare connected.  [The machine ucbarpa is gone now, but I've left
904c2aa98e2SPeter Wemmthis out-of-date configuration file around to demonstrate how you
905c2aa98e2SPeter Wemmmight do this.]
906c2aa98e2SPeter Wemm
907c2aa98e2SPeter WemmNote that the case of SITECONFIG with a third parameter of ``U'' is
908c2aa98e2SPeter Wemmspecial; the second parameter is assumed to be the UUCP name of the
909c2aa98e2SPeter Wemmlocal site, rather than the name of a remote site, and the UUCP name
910c2aa98e2SPeter Wemmis entered into $=w (the list of local hostnames) as $U.UUCP.
911c2aa98e2SPeter Wemm
912c2aa98e2SPeter WemmThe siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
913c2aa98e2SPeter Wemmmore than a sequence of SITE macros describing connectivity.  For
914c2aa98e2SPeter Wemmexample:
915c2aa98e2SPeter Wemm
916c2aa98e2SPeter Wemm	SITE(cnmat)
917c2aa98e2SPeter Wemm	SITE(sgi olympus)
918c2aa98e2SPeter Wemm
919c2aa98e2SPeter WemmThe second example demonstrates that you can use two names on the
920c2aa98e2SPeter Wemmsame line; these are usually aliases for the same host (or are at
921c2aa98e2SPeter Wemmleast in the same company).
922c2aa98e2SPeter Wemm
923c2aa98e2SPeter Wemm
924c2aa98e2SPeter Wemm+--------------------+
925c2aa98e2SPeter Wemm| USING UUCP MAILERS |
926c2aa98e2SPeter Wemm+--------------------+
927c2aa98e2SPeter Wemm
928c2aa98e2SPeter WemmIt's hard to get UUCP mailers right because of the extremely ad hoc
929c2aa98e2SPeter Wemmnature of UUCP addressing.  These config files are really designed
930c2aa98e2SPeter Wemmfor domain-based addressing, even for UUCP sites.
931c2aa98e2SPeter Wemm
932c2aa98e2SPeter WemmThere are four UUCP mailers available.  The choice of which one to
933c2aa98e2SPeter Wemmuse is partly a matter of local preferences and what is running at
934c2aa98e2SPeter Wemmthe other end of your UUCP connection.  Unlike good protocols that
935c2aa98e2SPeter Wemmdefine what will go over the wire, UUCP uses the policy that you
936c2aa98e2SPeter Wemmshould do what is right for the other end; if they change, you have
937c2aa98e2SPeter Wemmto change.  This makes it hard to do the right thing, and discourages
938c2aa98e2SPeter Wemmpeople from updating their software.  In general, if you can avoid
939c2aa98e2SPeter WemmUUCP, please do.
940c2aa98e2SPeter Wemm
941c2aa98e2SPeter WemmThe major choice is whether to go for a domainized scheme or a
942c2aa98e2SPeter Wemmnon-domainized scheme.  This depends entirely on what the other
943c2aa98e2SPeter Wemmend will recognize.  If at all possible, you should encourage the
944c2aa98e2SPeter Wemmother end to go to a domain-based system -- non-domainized addresses
945c2aa98e2SPeter Wemmdon't work entirely properly.
946c2aa98e2SPeter Wemm
947c2aa98e2SPeter WemmThe four mailers are:
948c2aa98e2SPeter Wemm
949c2aa98e2SPeter Wemm    uucp-old (obsolete name: "uucp")
950c2aa98e2SPeter Wemm	This is the oldest, the worst (but the closest to UUCP) way of
951c2aa98e2SPeter Wemm	sending messages accros UUCP connections.  It does bangify
952c2aa98e2SPeter Wemm	everything and prepends $U (your UUCP name) to the sender's
953c2aa98e2SPeter Wemm	address (which can already be a bang path itself).  It can
954c2aa98e2SPeter Wemm	only send to one address at a time, so it spends a lot of
955c2aa98e2SPeter Wemm	time copying duplicates of messages.  Avoid this if at all
956c2aa98e2SPeter Wemm	possible.
957c2aa98e2SPeter Wemm
958c2aa98e2SPeter Wemm    uucp-new (obsolete name: "suucp")
959c2aa98e2SPeter Wemm	The same as above, except that it assumes that in one rmail
960c2aa98e2SPeter Wemm	command you can specify several recipients.  It still has a
961c2aa98e2SPeter Wemm	lot of other problems.
962c2aa98e2SPeter Wemm
963c2aa98e2SPeter Wemm    uucp-dom
964c2aa98e2SPeter Wemm	This UUCP mailer keeps everything as domain addresses.
965c2aa98e2SPeter Wemm	Basically, it uses the SMTP mailer rewriting rules.  This mailer
966c2aa98e2SPeter Wemm	is only included if MAILER(smtp) is also specified.
967c2aa98e2SPeter Wemm
968c2aa98e2SPeter Wemm	Unfortunately, a lot of UUCP mailer transport agents require
969c2aa98e2SPeter Wemm	bangified addresses in the envelope, although you can use
970c2aa98e2SPeter Wemm	domain-based addresses in the message header.  (The envelope
971c2aa98e2SPeter Wemm	shows up as the From_ line on UNIX mail.)  So....
972c2aa98e2SPeter Wemm
973c2aa98e2SPeter Wemm    uucp-uudom
974c2aa98e2SPeter Wemm	This is a cross between uucp-new (for the envelope addresses)
975c2aa98e2SPeter Wemm	and uucp-dom (for the header addresses).  It bangifies the
976c2aa98e2SPeter Wemm	envelope sender (From_ line in messages) without adding the
977c2aa98e2SPeter Wemm	local hostname, unless there is no host name on the address
978c2aa98e2SPeter Wemm	at all (e.g., "wolf") or the host component is a UUCP host name
979c2aa98e2SPeter Wemm	instead of a domain name ("somehost!wolf" instead of
980c2aa98e2SPeter Wemm	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
981c2aa98e2SPeter Wemm	is also specified.
982c2aa98e2SPeter Wemm
983c2aa98e2SPeter WemmExamples:
984c2aa98e2SPeter Wemm
985c2aa98e2SPeter WemmWe are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
986c2aa98e2SPeter Wemmfollowing summarizes the sender rewriting for various mailers.
987c2aa98e2SPeter Wemm
988c2aa98e2SPeter WemmMailer          sender		rewriting in the envelope
989c2aa98e2SPeter Wemm------		------		-------------------------
990c2aa98e2SPeter Wemmuucp-{old,new}	wolf		grasp!wolf
991c2aa98e2SPeter Wemmuucp-dom	wolf		wolf@grasp.insa-lyon.fr
992c2aa98e2SPeter Wemmuucp-uudom	wolf		grasp.insa-lyon.fr!wolf
993c2aa98e2SPeter Wemm
994c2aa98e2SPeter Wemmuucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
995c2aa98e2SPeter Wemmuucp-dom	wolf@fr.net	wolf@fr.net
996c2aa98e2SPeter Wemmuucp-uudom	wolf@fr.net	fr.net!wolf
997c2aa98e2SPeter Wemm
998c2aa98e2SPeter Wemmuucp-{old,new}	somehost!wolf	grasp!somehost!wolf
999c2aa98e2SPeter Wemmuucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
1000c2aa98e2SPeter Wemmuucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
1001c2aa98e2SPeter Wemm
1002c2aa98e2SPeter WemmIf you are using one of the domainized UUCP mailers, you really want
1003c2aa98e2SPeter Wemmto convert all UUCP addresses to domain format -- otherwise, it will
1004c2aa98e2SPeter Wemmdo it for you (and probably not the way you expected).  For example,
1005c2aa98e2SPeter Wemmif you have the address foo!bar!baz (and you are not sending to foo),
1006c2aa98e2SPeter Wemmthe heuristics will add the @uucp.relay.name or @local.host.name to
1007c2aa98e2SPeter Wemmthis address.  However, if you map foo to foo.host.name first, it
1008c2aa98e2SPeter Wemmwill not add the local hostname.  You can do this using the uucpdomain
1009c2aa98e2SPeter Wemmfeature.
1010c2aa98e2SPeter Wemm
1011c2aa98e2SPeter Wemm
1012c2aa98e2SPeter Wemm+-------------------+
1013c2aa98e2SPeter Wemm| TWEAKING RULESETS |
1014c2aa98e2SPeter Wemm+-------------------+
1015c2aa98e2SPeter Wemm
1016c2aa98e2SPeter WemmFor more complex configurations, you can define special rules.
1017c2aa98e2SPeter WemmThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
1018c2aa98e2SPeter Wemmthe names.  Any modifications made here are reflected in the header.
1019c2aa98e2SPeter Wemm
1020c2aa98e2SPeter WemmA common use is to convert old UUCP addresses to SMTP addresses using
1021c2aa98e2SPeter Wemmthe UUCPSMTP macro.  For example:
1022c2aa98e2SPeter Wemm
1023c2aa98e2SPeter Wemm	LOCAL_RULE_3
1024c2aa98e2SPeter Wemm	UUCPSMTP(decvax,	decvax.dec.com)
1025c2aa98e2SPeter Wemm	UUCPSMTP(research,	research.att.com)
1026c2aa98e2SPeter Wemm
1027c2aa98e2SPeter Wemmwill cause addresses of the form "decvax!user" and "research!user"
1028c2aa98e2SPeter Wemmto be converted to "user@decvax.dec.com" and "user@research.att.com"
1029c2aa98e2SPeter Wemmrespectively.
1030c2aa98e2SPeter Wemm
1031c2aa98e2SPeter WemmThis could also be used to look up hosts in a database map:
1032c2aa98e2SPeter Wemm
1033c2aa98e2SPeter Wemm	LOCAL_RULE_3
1034c2aa98e2SPeter Wemm	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
1035c2aa98e2SPeter Wemm
1036c2aa98e2SPeter WemmThis map would be defined in the LOCAL_CONFIG portion, as shown below.
1037c2aa98e2SPeter Wemm
1038c2aa98e2SPeter WemmSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
1039c2aa98e2SPeter WemmFor example, new rules are needed to parse hostnames that you accept
1040c2aa98e2SPeter Wemmvia MX records.  For example, you might have:
1041c2aa98e2SPeter Wemm
1042c2aa98e2SPeter Wemm	LOCAL_RULE_0
1043c2aa98e2SPeter Wemm	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
1044c2aa98e2SPeter Wemm
1045c2aa98e2SPeter WemmYou would use this if you had installed an MX record for cnmat.Berkeley.EDU
1046c2aa98e2SPeter Wemmpointing at this host; this rule catches the message and forwards it on
1047c2aa98e2SPeter Wemmusing UUCP.
1048c2aa98e2SPeter Wemm
1049c2aa98e2SPeter WemmYou can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
1050c2aa98e2SPeter WemmThese rulesets are normally empty.
1051c2aa98e2SPeter Wemm
1052c2aa98e2SPeter WemmA similar macro is LOCAL_CONFIG.  This introduces lines added after the
1053c2aa98e2SPeter Wemmboilerplate option setting but before rulesets, and can be used to
1054c2aa98e2SPeter Wemmdeclare local database maps or whatever.  For example:
1055c2aa98e2SPeter Wemm
1056c2aa98e2SPeter Wemm	LOCAL_CONFIG
1057c2aa98e2SPeter Wemm	Khostmap hash /etc/hostmap.db
1058c2aa98e2SPeter Wemm	Kyplocal nis -m hosts.byname
1059c2aa98e2SPeter Wemm
1060c2aa98e2SPeter Wemm
1061c2aa98e2SPeter Wemm+---------------------------+
1062c2aa98e2SPeter Wemm| MASQUERADING AND RELAYING |
1063c2aa98e2SPeter Wemm+---------------------------+
1064c2aa98e2SPeter Wemm
1065c2aa98e2SPeter WemmYou can have your host masquerade as another using
1066c2aa98e2SPeter Wemm
1067c2aa98e2SPeter Wemm	MASQUERADE_AS(host.domain)
1068c2aa98e2SPeter Wemm
1069c2aa98e2SPeter WemmThis causes mail being sent to be labeled as coming from the
1070c2aa98e2SPeter Wemmindicated host.domain, rather than $j.  One normally masquerades as
1071c2aa98e2SPeter Wemmone of one's own subdomains (for example, it's unlikely that I would
1072c2aa98e2SPeter Wemmchoose to masquerade as an MIT site).  This behaviour is modified by
1073c2aa98e2SPeter Wemma plethora of FEATUREs; in particular, see masquerade_envelope,
1074c2aa98e2SPeter Wemmallmasquerade, limited_masquerade, and masquerade_entire_domain.
1075c2aa98e2SPeter Wemm
1076c2aa98e2SPeter WemmThe masquerade name is not normally canonified, so it is important
1077c2aa98e2SPeter Wemmthat it be your One True Name, that is, fully qualified and not a
1078c2aa98e2SPeter WemmCNAME.  However, if you use a CNAME, the receiving side may canonify
1079c2aa98e2SPeter Wemmit for you, so don't think you can cheat CNAME mapping this way.
1080c2aa98e2SPeter Wemm
1081c2aa98e2SPeter WemmNormally the only addresses that are masqueraded are those that come
1082c2aa98e2SPeter Wemmfrom this host (that is, are either unqualified or in $=w, the list
1083c2aa98e2SPeter Wemmof local domain names).  You can augment this list using
1084c2aa98e2SPeter Wemm
1085c2aa98e2SPeter Wemm	MASQUERADE_DOMAIN(otherhost.domain)
1086c2aa98e2SPeter Wemm
1087c2aa98e2SPeter WemmThe effect of this is that although mail to user@otherhost.domain
1088c2aa98e2SPeter Wemmwill not be delivered locally, any mail including any user@otherhost.domain
1089c2aa98e2SPeter Wemmwill, when relayed, be rewritten to have the MASQUERADE_AS address.
1090c2aa98e2SPeter WemmThis can be a space-separated list of names.
1091c2aa98e2SPeter Wemm
1092c2aa98e2SPeter WemmIf these names are in a file, you can use
1093c2aa98e2SPeter Wemm
1094c2aa98e2SPeter Wemm	MASQUERADE_DOMAIN_FILE(filename)
1095c2aa98e2SPeter Wemm
1096c2aa98e2SPeter Wemmto read the list of names from the indicated file.
1097c2aa98e2SPeter Wemm
1098c2aa98e2SPeter WemmNormally only header addresses are masqueraded.  If you want to
1099c2aa98e2SPeter Wemmmasquerade the envelope as well, use
1100c2aa98e2SPeter Wemm
1101c2aa98e2SPeter Wemm	FEATURE(masquerade_envelope)
1102c2aa98e2SPeter Wemm
1103c2aa98e2SPeter WemmThere are always users that need to be "exposed" -- that is, their
1104c2aa98e2SPeter Wemminternal site name should be displayed instead of the masquerade name.
1105c2aa98e2SPeter WemmRoot is an example.  You can add users to this list using
1106c2aa98e2SPeter Wemm
1107c2aa98e2SPeter Wemm	EXPOSED_USER(usernames)
1108c2aa98e2SPeter Wemm
1109c2aa98e2SPeter WemmThis adds users to class E; you could also use something like
1110c2aa98e2SPeter Wemm
1111c2aa98e2SPeter Wemm	FE/etc/sendmail.cE
1112c2aa98e2SPeter Wemm
1113c2aa98e2SPeter WemmYou can also arrange to relay all unqualified names (that is, names
1114c2aa98e2SPeter Wemmwithout @host) to a relay host.  For example, if you have a central
1115c2aa98e2SPeter Wemmemail server, you might relay to that host so that users don't have
1116c2aa98e2SPeter Wemmto have .forward files or aliases.  You can do this using
1117c2aa98e2SPeter Wemm
1118c2aa98e2SPeter Wemm	define(`LOCAL_RELAY', mailer:hostname)
1119c2aa98e2SPeter Wemm
1120c2aa98e2SPeter WemmThe ``mailer:'' can be omitted, in which case the mailer defaults to
1121c2aa98e2SPeter Wemm"relay".  There are some user names that you don't want relayed, perhaps
1122c2aa98e2SPeter Wemmbecause of local aliases.  A common example is root, which may be
1123c2aa98e2SPeter Wemmlocally aliased.  You can add entries to this list using
1124c2aa98e2SPeter Wemm
1125c2aa98e2SPeter Wemm	LOCAL_USER(usernames)
1126c2aa98e2SPeter Wemm
1127c2aa98e2SPeter WemmThis adds users to class L; you could also use something like
1128c2aa98e2SPeter Wemm
1129c2aa98e2SPeter Wemm	FL/etc/sendmail.cL
1130c2aa98e2SPeter Wemm
1131c2aa98e2SPeter WemmIf you want all incoming mail sent to a centralized hub, as for a
1132c2aa98e2SPeter Wemmshared /var/spool/mail scheme, use
1133c2aa98e2SPeter Wemm
1134c2aa98e2SPeter Wemm	define(`MAIL_HUB', mailer:hostname)
1135c2aa98e2SPeter Wemm
1136c2aa98e2SPeter WemmAgain, ``mailer:'' defaults to "relay".  If you define both LOCAL_RELAY
1137c2aa98e2SPeter Wemmand MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
1138c2aa98e2SPeter Wemmbe sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
1139c2aa98e2SPeter WemmNames in $=L will be delivered locally, so you MUST have aliases or
1140c2aa98e2SPeter Wemm.forward files for them.
1141c2aa98e2SPeter Wemm
1142c2aa98e2SPeter WemmFor example, if you are on machine mastodon.CS.Berkeley.EDU and you have
1143c2aa98e2SPeter WemmFEATURE(stickyhost), the following combinations of settings will have the
1144c2aa98e2SPeter Wemmindicated effects:
1145c2aa98e2SPeter Wemm
1146c2aa98e2SPeter Wemmemail sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
1147c2aa98e2SPeter Wemm
1148c2aa98e2SPeter WemmLOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
1149c2aa98e2SPeter Wemmmail.CS.Berkeley.EDU	  (no local aliasing)	    (aliasing done)
1150c2aa98e2SPeter Wemm
1151c2aa98e2SPeter WemmMAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
1152c2aa98e2SPeter Wemmmammoth.CS.Berkeley.EDU	  (aliasing done)	    (aliasing done)
1153c2aa98e2SPeter Wemm
1154c2aa98e2SPeter WemmBoth LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
1155c2aa98e2SPeter WemmMAIL_HUB set as above	  (no local aliasing)	    (aliasing done)
1156c2aa98e2SPeter Wemm
1157c2aa98e2SPeter WemmIf you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
1158c2aa98e2SPeter WemmMAIL_HUB act identically, with MAIL_HUB taking precedence.
1159c2aa98e2SPeter Wemm
1160c2aa98e2SPeter WemmIf you want all outgoing mail to go to a central relay site, define
1161c2aa98e2SPeter WemmSMART_HOST as well.  Briefly:
1162c2aa98e2SPeter Wemm
1163c2aa98e2SPeter Wemm	LOCAL_RELAY applies to unqualified names (e.g., "eric").
1164c2aa98e2SPeter Wemm	MAIL_HUB applies to names qualified with the name of the
1165c2aa98e2SPeter Wemm		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
1166c2aa98e2SPeter Wemm	SMART_HOST applies to names qualified with other hosts.
1167c2aa98e2SPeter Wemm
1168c2aa98e2SPeter WemmHowever, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
1169c2aa98e2SPeter WemmDECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
1170c2aa98e2SPeter Wemmreally want absolutely everything to go to a single central site you will
1171c2aa98e2SPeter Wemmneed to unset all the other relays -- or better yet, find or build a
1172c2aa98e2SPeter Wemmminimal config file that does this.
1173c2aa98e2SPeter Wemm
1174c2aa98e2SPeter WemmFor duplicate suppression to work properly, the host name is best
1175c2aa98e2SPeter Wemmspecified with a terminal dot:
1176c2aa98e2SPeter Wemm
1177c2aa98e2SPeter Wemm	define(`MAIL_HUB', `host.domain.')
1178c2aa98e2SPeter Wemm	      note the trailing dot ---^
1179c2aa98e2SPeter Wemm
1180c2aa98e2SPeter Wemm
1181c2aa98e2SPeter Wemm+---------------------------------+
1182c2aa98e2SPeter Wemm| ANTI-SPAM CONFIGURATION CONTROL |
1183c2aa98e2SPeter Wemm+---------------------------------+
1184c2aa98e2SPeter Wemm
1185c2aa98e2SPeter WemmThe primary anti-spam features available in sendmail are:
1186c2aa98e2SPeter Wemm
1187c2aa98e2SPeter Wemm* Relaying is denied by default.
1188c2aa98e2SPeter Wemm* Better checking on sender information.
1189c2aa98e2SPeter Wemm* Access database.
1190c2aa98e2SPeter Wemm* Header checks.
1191c2aa98e2SPeter Wemm
1192c2aa98e2SPeter WemmRelaying (transmission of messages from a site outside your domain to
1193c2aa98e2SPeter Wemmanother site outside your domain) is denied by default.  Note that
1194c2aa98e2SPeter Wemmthis changed in sendmail 8.9; previous versions allowed relaying by
1195c2aa98e2SPeter Wemmdefault.  If you want to revert to the old behaviour, you will need
1196c2aa98e2SPeter Wemmto use FEATURE(promiscuous_relay).  You can allow certain domains to
1197c2aa98e2SPeter Wemmrelay through your server by adding their domain name or IP address to
1198c2aa98e2SPeter Wemmclass 'R' ($=R) using RELAY_DOMAIN() and RELAY_DOMAIN_FILE() or via the
1199c2aa98e2SPeter Wemmaccess database (described below).
1200c2aa98e2SPeter Wemm
1201c2aa98e2SPeter WemmIf you use
1202c2aa98e2SPeter Wemm
1203c2aa98e2SPeter Wemm	FEATURE(relay_entire_domain)
1204c2aa98e2SPeter Wemm
1205c2aa98e2SPeter Wemmthen any host in any of your local domains (that is, the $=m class)
1206c2aa98e2SPeter Wemmwill be relayed.
1207c2aa98e2SPeter Wemm
1208c2aa98e2SPeter WemmYou can also allow relaying based on the MX records of the host
1209c2aa98e2SPeter Wemmportion of an incoming recipient address by using
1210c2aa98e2SPeter Wemm
1211c2aa98e2SPeter Wemm	FEATURE(relay_based_on_MX)
1212c2aa98e2SPeter Wemm
1213c2aa98e2SPeter WemmFor example, if your server receives a recipient of user@domain.com
1214c2aa98e2SPeter Wemmand domain.com lists your server in its MX records, the mail will be
1215c2aa98e2SPeter Wemmaccepted.  Note that this will stop spammers from using your host to
1216c2aa98e2SPeter Wemmrelay spam but it will not stop outsiders from using your server as a
1217c2aa98e2SPeter Wemmrelay for their site.  Along the same lines,
1218c2aa98e2SPeter Wemm
1219c2aa98e2SPeter Wemm	FEATURE(relay_local_from)
1220c2aa98e2SPeter Wemm
1221c2aa98e2SPeter Wemmwill allow relaying if the sender specifies a return path (i.e.
1222c2aa98e2SPeter WemmMAIL FROM: <user@domain>) domain which is a local domain.  This a
1223c2aa98e2SPeter Wemmdangerous feature as it will allow spammers to spam using your mail
1224c2aa98e2SPeter Wemmserver by simply specifying a return address of user@your.domain.com.
1225c2aa98e2SPeter WemmIt should not be used unless absolutely necessary.
1226c2aa98e2SPeter Wemm
1227c2aa98e2SPeter WemmIf source routing is used in the recipient address (i.e.
1228c2aa98e2SPeter WemmRCPT TO: <user%site.com@othersite.com>), sendmail will check
1229c2aa98e2SPeter Wemmuser@site.com for relaying if othersite.com is an allowed relay host
1230c2aa98e2SPeter Wemmin either class 'R', class 'm' if FEATURE(relay_entire_domain) is used,
1231c2aa98e2SPeter Wemmor the access database if FEATURE(access_db) is used.  To prevent
1232c2aa98e2SPeter Wemmthe address from being stripped down, use:
1233c2aa98e2SPeter Wemm
1234c2aa98e2SPeter Wemm	FEATURE(loose_relay_check)
1235c2aa98e2SPeter Wemm
1236c2aa98e2SPeter WemmIf you think you need to use this feature, you probably do not.  This
1237c2aa98e2SPeter Wemmshould only be used for sites which have no control over the addresses
1238c2aa98e2SPeter Wemmthat they provide a gateway for.  Use this FEATURE with caution as it
1239c2aa98e2SPeter Wemmcan allow spammers to relay through your server if not setup properly.
1240c2aa98e2SPeter Wemm
1241c2aa98e2SPeter WemmAs of 8.9, sendmail will refuse mail if the MAIL FROM: parameter has
1242c2aa98e2SPeter Wemman unresolvable domain (i.e., one that DNS, your local name service,
1243c2aa98e2SPeter Wemmor special case rules in ruleset 3 cannot locate).  If you want to
1244c2aa98e2SPeter Wemmcontinue to accept such domains, e.g. because you are inside a
1245c2aa98e2SPeter Wemmfirewall that has only a limited view of the Internet host name space
1246c2aa98e2SPeter Wemm(note that you will not be able to return mail to them unless you have
1247c2aa98e2SPeter Wemmsome "smart host" forwarder), use
1248c2aa98e2SPeter Wemm
1249c2aa98e2SPeter Wemm	FEATURE(accept_unresolvable_domains)
1250c2aa98e2SPeter Wemm
1251c2aa98e2SPeter Wemmsendmail will also refuse mail if the MAIL FROM: parameter is not
1252c2aa98e2SPeter Wemmfully qualified (i.e., contains a domain as well as a user).  If you
1253c2aa98e2SPeter Wemmwant to continue to accept such senders, use
1254c2aa98e2SPeter Wemm
1255c2aa98e2SPeter Wemm	FEATURE(accept_unqualified_senders)
1256c2aa98e2SPeter Wemm
1257c2aa98e2SPeter WemmAn ``access'' database can be created to accept or reject mail from
1258c2aa98e2SPeter Wemmselected domains.  For example, you may choose to reject all mail
1259c2aa98e2SPeter Wemmoriginating from known spammers.  To enable such a database, use
1260c2aa98e2SPeter Wemm
1261c2aa98e2SPeter Wemm	FEATURE(access_db)
1262c2aa98e2SPeter Wemm
1263c2aa98e2SPeter WemmThe FEATURE macro can accept a second parameter giving the key file
1264c2aa98e2SPeter Wemmdefinition for the database; for example
1265c2aa98e2SPeter Wemm
1266c2aa98e2SPeter Wemm	FEATURE(access_db, hash -o /etc/mail/access)
1267c2aa98e2SPeter Wemm
1268c2aa98e2SPeter WemmThe table itself uses e-mail addresses, domain names, and network
1269c2aa98e2SPeter Wemmnumbers as keys.  For example,
1270c2aa98e2SPeter Wemm
1271c2aa98e2SPeter Wemm	spammer@aol.com		REJECT
1272c2aa98e2SPeter Wemm	cyberspammer.com	REJECT
1273c2aa98e2SPeter Wemm	206.117.147		REJECT
1274c2aa98e2SPeter Wemm
1275c2aa98e2SPeter Wemmwould refuse mail from spammer@aol.com, any user from cyberspammer.com
1276c2aa98e2SPeter Wemm(or any host within the cyberspammer.com domain), and any host on the
1277c2aa98e2SPeter Wemm206.117.147.* network.
1278c2aa98e2SPeter Wemm
1279c2aa98e2SPeter WemmThe value part of the map can contain:
1280c2aa98e2SPeter Wemm
1281c2aa98e2SPeter Wemm	OK		accept mail even if other rules in the
1282c2aa98e2SPeter Wemm			running ruleset would reject it.
1283c2aa98e2SPeter Wemm	RELAY		Allow domain to relay through your SMTP
1284c2aa98e2SPeter Wemm			server.  RELAY also serves an implicit
1285c2aa98e2SPeter Wemm			OK for the other checks.
1286c2aa98e2SPeter Wemm	REJECT		reject the sender/recipient with a general
1287c2aa98e2SPeter Wemm			purpose message.
1288c2aa98e2SPeter Wemm	DISCARD		discard the message completely using
1289c2aa98e2SPeter Wemm			the $#discard mailer
1290c2aa98e2SPeter Wemm	### any text	where ### is an RFC 821 compliant error code
1291c2aa98e2SPeter Wemm			and "any text" is a message to return for
1292c2aa98e2SPeter Wemm			the command.
1293c2aa98e2SPeter Wemm
1294c2aa98e2SPeter WemmFor example:
1295c2aa98e2SPeter Wemm
1296c2aa98e2SPeter Wemm	cyberspammer.com	550 We don't accept mail from spammers
1297c2aa98e2SPeter Wemm	okay.cyberspammer.com	OK
1298c2aa98e2SPeter Wemm	sendmail.org		OK
1299c2aa98e2SPeter Wemm	128.32			RELAY
1300c2aa98e2SPeter Wemm
1301c2aa98e2SPeter Wemmwould accept mail from okay.cyberspammer.com, but would reject mail
1302c2aa98e2SPeter Wemmfrom all other hosts at cyberspammer.com with the indicated message.
1303c2aa98e2SPeter WemmIt would allow accept mail from any hosts in the sendmail.org domain,
1304c2aa98e2SPeter Wemmand allow relaying for the 128.32.*.* network.  Note, UUCP users may
1305c2aa98e2SPeter Wemmneed to add hostname.UUCP to the access database or class 'R' ($=R).
1306c2aa98e2SPeter WemmIf you also use:
1307c2aa98e2SPeter Wemm
1308c2aa98e2SPeter Wemm	FEATURE(relay_hosts_only)
1309c2aa98e2SPeter Wemm
1310c2aa98e2SPeter Wemmthen the above example will allow relaying for sendmail.org, but not
1311c2aa98e2SPeter Wemmhosts within the sendmail.org domain.  Note that this will also require
1312c2aa98e2SPeter Wemmhosts listed in class 'R' ($=R) to be fully qualified host names.
1313c2aa98e2SPeter Wemm
1314c2aa98e2SPeter WemmYou can also use the access database to block sender addresses based on
1315c2aa98e2SPeter Wemmthe username portion of the address.  For example:
1316c2aa98e2SPeter Wemm
1317c2aa98e2SPeter Wemm	FREE.STEALTH.MAILER@	550 Spam not accepted
1318c2aa98e2SPeter Wemm
1319c2aa98e2SPeter WemmNote that you must include the @ after the username to signify that
1320c2aa98e2SPeter Wemmthis database entry is for checking only the username portion of the
1321c2aa98e2SPeter Wemmsender address.
1322c2aa98e2SPeter Wemm
1323c2aa98e2SPeter WemmIf you use:
1324c2aa98e2SPeter Wemm
1325c2aa98e2SPeter Wemm	FEATURE(blacklist_recipients)
1326c2aa98e2SPeter Wemm
1327c2aa98e2SPeter Wemmthen you can add entries to the map for local users, hosts in your
1328c2aa98e2SPeter Wemmdomains, or addresses in your domain which should not receive mail:
1329c2aa98e2SPeter Wemm
1330c2aa98e2SPeter Wemm	badlocaluser		550 Mailbox disabled for this username
1331c2aa98e2SPeter Wemm	host.mydomain.com	550 That host does not accept mail
1332c2aa98e2SPeter Wemm	user@otherhost.mydomain.com	550 Mailbox disabled for this recipient
1333c2aa98e2SPeter Wemm
1334c2aa98e2SPeter WemmThis would prevent a recipient of badlocaluser@mydomain.com, any
1335c2aa98e2SPeter Wemmuser at host.mydomain.com, and the single address
1336c2aa98e2SPeter Wemmuser@otherhost.mydomain.com from receiving mail.
1337c2aa98e2SPeter Wemm
1338c2aa98e2SPeter WemmThere is also a ``Realtime Blackhole List'' run by the MAPS project
1339c2aa98e2SPeter Wemmat http://maps.vix.com/.  This is a database maintained in DNS of
1340c2aa98e2SPeter Wemmspammers.  To use this database, use
1341c2aa98e2SPeter Wemm
1342c2aa98e2SPeter Wemm	FEATURE(rbl)
1343c2aa98e2SPeter Wemm
1344c2aa98e2SPeter WemmThis will cause sendmail to reject mail from any site in the
1345c2aa98e2SPeter WemmRealtime Blackhole List database.  You can specify an alternative
1346c2aa98e2SPeter WemmRBL name server to contact by specifying an argument to the FEATURE.
1347c2aa98e2SPeter Wemm
1348c2aa98e2SPeter WemmThe features described above make use of the check_relay, check_mail,
1349c2aa98e2SPeter Wemmand check_rcpt rulesets.  If you wish to include your own checks,
1350c2aa98e2SPeter Wemmyou can put your checks in the rulesets Local_check_relay,
1351c2aa98e2SPeter WemmLocal_check_mail, and Local_check_rcpt.  For example if you wanted to
1352c2aa98e2SPeter Wemmblock senders with all numeric usernames (i.e. 2312343@bigisp.com),
1353c2aa98e2SPeter Wemmyou would use Local_check_mail and the new regex map:
1354c2aa98e2SPeter Wemm
1355c2aa98e2SPeter Wemm	LOCAL_CONFIG
1356c2aa98e2SPeter Wemm	Kallnumbers regex -a@MATCH ^[0-9]+$
1357c2aa98e2SPeter Wemm
1358c2aa98e2SPeter Wemm	LOCAL_RULESETS
1359c2aa98e2SPeter Wemm	SLocal_check_mail
1360c2aa98e2SPeter Wemm	# check address against various regex checks
1361c2aa98e2SPeter Wemm	R$*				$: $>Parse0 $>3 $1
1362c2aa98e2SPeter Wemm	R$+ < @ bigisp.com. > $*	$: $(allnumbers $1 $)
1363c2aa98e2SPeter Wemm	R@MATCH				$#error $: 553 Header Error
1364c2aa98e2SPeter Wemm
1365c2aa98e2SPeter WemmThese rules are called with the original arguments of the corresponding
1366c2aa98e2SPeter Wemmcheck_* ruleset.  If the local ruleset returns $#OK, no further checking
1367c2aa98e2SPeter Wemmis done by the features described above and the mail is accepted.  If the
1368c2aa98e2SPeter Wemmlocal ruleset resolves to a mailer (such as $#error or $#discard), the
1369c2aa98e2SPeter Wemmappropriate action is taken.  Otherwise, the results of the local
1370c2aa98e2SPeter Wemmrewriting are ignored.
1371c2aa98e2SPeter Wemm
1372c2aa98e2SPeter Wemm
1373c2aa98e2SPeter WemmYou can also reject mail on the basis of the contents of headers.
1374c2aa98e2SPeter WemmThis is done by adding a ruleset call to the 'H' header definition command
1375c2aa98e2SPeter Wemmin sendmail.cf.  For example, this can be used to check the validity of
1376c2aa98e2SPeter Wemma Message-ID: header:
1377c2aa98e2SPeter Wemm
1378c2aa98e2SPeter Wemm	LOCAL_RULESETS
1379c2aa98e2SPeter Wemm	HMessage-Id: $>CheckMessageId
1380c2aa98e2SPeter Wemm
1381c2aa98e2SPeter Wemm	SCheckMessageId
1382c2aa98e2SPeter Wemm	R< $+ @ $+ >		$@ OK
1383c2aa98e2SPeter Wemm	R$*			$#error $: 553 Header Error
1384c2aa98e2SPeter Wemm
1385c2aa98e2SPeter Wemm
1386c2aa98e2SPeter Wemm+--------------------------------+
1387c2aa98e2SPeter Wemm| ADDING NEW MAILERS OR RULESETS |
1388c2aa98e2SPeter Wemm+--------------------------------+
1389c2aa98e2SPeter Wemm
1390c2aa98e2SPeter WemmSometimes you may need to add entirely new mailers or rulesets.  They
1391c2aa98e2SPeter Wemmshould be introduced with the constructs MAILER_DEFINITIONS and
1392c2aa98e2SPeter WemmLOCAL_RULESETS respectively.  For example:
1393c2aa98e2SPeter Wemm
1394c2aa98e2SPeter Wemm	MAILER_DEFINITIONS
1395c2aa98e2SPeter Wemm	Mmymailer, ...
1396c2aa98e2SPeter Wemm	...
1397c2aa98e2SPeter Wemm
1398c2aa98e2SPeter Wemm	LOCAL_RULESETS
1399c2aa98e2SPeter Wemm	Smyruleset
1400c2aa98e2SPeter Wemm	...
1401c2aa98e2SPeter Wemm
1402c2aa98e2SPeter Wemm
1403c2aa98e2SPeter Wemm+-------------------------------+
1404c2aa98e2SPeter Wemm| NON-SMTP BASED CONFIGURATIONS |
1405c2aa98e2SPeter Wemm+-------------------------------+
1406c2aa98e2SPeter Wemm
1407c2aa98e2SPeter WemmThese configuration files are designed primarily for use by SMTP-based
1408c2aa98e2SPeter Wemmsites.  I don't pretend that they are well tuned for UUCP-only or
1409c2aa98e2SPeter WemmUUCP-primarily nodes (the latter is defined as a small local net
1410c2aa98e2SPeter Wemmconnected to the rest of the world via UUCP).  However, there is one
1411c2aa98e2SPeter Wemmhook to handle some special cases.
1412c2aa98e2SPeter Wemm
1413c2aa98e2SPeter WemmYou can define a ``smart host'' that understands a richer address syntax
1414c2aa98e2SPeter Wemmusing:
1415c2aa98e2SPeter Wemm
1416c2aa98e2SPeter Wemm	define(`SMART_HOST', mailer:hostname)
1417c2aa98e2SPeter Wemm
1418c2aa98e2SPeter WemmIn this case, the ``mailer:'' defaults to "relay".  Any messages that
1419c2aa98e2SPeter Wemmcan't be handled using the usual UUCP rules are passed to this host.
1420c2aa98e2SPeter Wemm
1421c2aa98e2SPeter WemmIf you are on a local SMTP-based net that connects to the outside
1422c2aa98e2SPeter Wemmworld via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
1423c2aa98e2SPeter WemmFor example:
1424c2aa98e2SPeter Wemm
1425c2aa98e2SPeter Wemm	define(`SMART_HOST', suucp:uunet)
1426c2aa98e2SPeter Wemm	LOCAL_NET_CONFIG
1427c2aa98e2SPeter Wemm	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
1428c2aa98e2SPeter Wemm
1429c2aa98e2SPeter WemmThis will cause all names that end in your domain name ($m) via
1430c2aa98e2SPeter WemmSMTP; anything else will be sent via suucp (smart UUCP) to uunet.
1431c2aa98e2SPeter WemmIf you have FEATURE(nocanonify), you may need to omit the dots after
1432c2aa98e2SPeter Wemmthe $m.  If you are running a local DNS inside your domain which is
1433c2aa98e2SPeter Wemmnot otherwise connected to the outside world, you probably want to
1434c2aa98e2SPeter Wemmuse:
1435c2aa98e2SPeter Wemm
1436c2aa98e2SPeter Wemm	define(`SMART_HOST', smtp:fire.wall.com)
1437c2aa98e2SPeter Wemm	LOCAL_NET_CONFIG
1438c2aa98e2SPeter Wemm	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
1439c2aa98e2SPeter Wemm
1440c2aa98e2SPeter WemmThat is, send directly only to things you found in your DNS lookup;
1441c2aa98e2SPeter Wemmanything else goes through SMART_HOST.
1442c2aa98e2SPeter Wemm
1443c2aa98e2SPeter WemmYou may need to turn off the anti-spam rules in order to accept
1444c2aa98e2SPeter WemmUUCP mail with FEATURE(promiscuous_relay) and
1445c2aa98e2SPeter WemmFEATURE(accept_unresolvable_domains).
1446c2aa98e2SPeter Wemm
1447c2aa98e2SPeter Wemm
1448c2aa98e2SPeter Wemm+-----------+
1449c2aa98e2SPeter Wemm| WHO AM I? |
1450c2aa98e2SPeter Wemm+-----------+
1451c2aa98e2SPeter Wemm
1452c2aa98e2SPeter WemmNormally, the $j macro is automatically defined to be your fully
1453c2aa98e2SPeter Wemmqualified domain name (FQDN).  Sendmail does this by getting your
1454c2aa98e2SPeter Wemmhost name using gethostname and then calling gethostbyname on the
1455c2aa98e2SPeter Wemmresult.  For example, in some environments gethostname returns
1456c2aa98e2SPeter Wemmonly the root of the host name (such as "foo"); gethostbyname is
1457c2aa98e2SPeter Wemmsupposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
1458c2aa98e2SPeter Wemmcases, gethostbyname may fail to return the FQDN.  In this case
1459c2aa98e2SPeter Wemmyou MUST define confDOMAIN_NAME to be your fully qualified domain
1460c2aa98e2SPeter Wemmname.  This is usually done using:
1461c2aa98e2SPeter Wemm
1462c2aa98e2SPeter Wemm	Dmbar.com
1463c2aa98e2SPeter Wemm	define(`confDOMAIN_NAME', `$w.$m')dnl
1464c2aa98e2SPeter Wemm
1465c2aa98e2SPeter Wemm
1466c2aa98e2SPeter Wemm+--------------------+
1467c2aa98e2SPeter Wemm| USING MAILERTABLES |
1468c2aa98e2SPeter Wemm+--------------------+
1469c2aa98e2SPeter Wemm
1470c2aa98e2SPeter WemmTo use FEATURE(mailertable), you will have to create an external
1471c2aa98e2SPeter Wemmdatabase containing the routing information for various domains.
1472c2aa98e2SPeter WemmFor example, a mailertable file in text format might be:
1473c2aa98e2SPeter Wemm
1474c2aa98e2SPeter Wemm	.my.domain		xnet:%1.my.domain
1475c2aa98e2SPeter Wemm	uuhost1.my.domain	suucp:uuhost1
1476c2aa98e2SPeter Wemm	.bitnet			smtp:relay.bit.net
1477c2aa98e2SPeter Wemm
1478c2aa98e2SPeter WemmThis should normally be stored in /etc/mailertable.  The actual
1479c2aa98e2SPeter Wemmdatabase version of the mailertable is built using:
1480c2aa98e2SPeter Wemm
1481c2aa98e2SPeter Wemm	makemap hash /etc/mailertable.db < /etc/mailertable
1482c2aa98e2SPeter Wemm
1483c2aa98e2SPeter WemmThe semantics are simple.  Any LHS entry that does not begin with
1484c2aa98e2SPeter Wemma dot matches the full host name indicated.  LHS entries beginning
1485c2aa98e2SPeter Wemmwith a dot match anything ending with that domain name -- that is,
1486c2aa98e2SPeter Wemmthey can be thought of as having a leading "*" wildcard.  Matching
1487c2aa98e2SPeter Wemmis done in order of most-to-least qualified -- for example, even
1488c2aa98e2SPeter Wemmthough ".my.domain" is listed first in the above example, an entry
1489c2aa98e2SPeter Wemmof "uuhost1.my.domain" will match the second entry since it is
1490c2aa98e2SPeter Wemmmore explicit.
1491c2aa98e2SPeter Wemm
1492c2aa98e2SPeter WemmThe RHS should always be a "mailer:host" pair.  The mailer is the
1493c2aa98e2SPeter Wemmconfiguration name of a mailer (that is, an `M' line in the
1494c2aa98e2SPeter Wemmsendmail.cf file).  The "host" will be the hostname passed to
1495c2aa98e2SPeter Wemmthat mailer.  In domain-based matches (that is, those with leading
1496c2aa98e2SPeter Wemmdots) the "%1" may be used to interpolate the wildcarded part of
1497c2aa98e2SPeter Wemmthe host name.  For example, the first line above sends everything
1498c2aa98e2SPeter Wemmaddressed to "anything.my.domain" to that same host name, but using
1499c2aa98e2SPeter Wemmthe (presumably experimental) xnet mailer.
1500c2aa98e2SPeter Wemm
1501c2aa98e2SPeter WemmIn some cases you may want to temporarily turn off MX records,
1502c2aa98e2SPeter Wemmparticularly on gateways.  For example, you may want to MX
1503c2aa98e2SPeter Wemmeverything in a domain to one machine that then forwards it
1504c2aa98e2SPeter Wemmdirectly.  To do this, you might use the DNS configuration:
1505c2aa98e2SPeter Wemm
1506c2aa98e2SPeter Wemm	*.domain.	IN	MX	0	relay.machine
1507c2aa98e2SPeter Wemm
1508c2aa98e2SPeter Wemmand on relay.machine use the mailertable:
1509c2aa98e2SPeter Wemm
1510c2aa98e2SPeter Wemm	.domain		smtp:[gateway.domain]
1511c2aa98e2SPeter Wemm
1512c2aa98e2SPeter WemmThe [square brackets] turn off MX records for this host only.
1513c2aa98e2SPeter WemmIf you didn't do this, the mailertable would use the MX record
1514c2aa98e2SPeter Wemmagain, which would give you an MX loop.
1515c2aa98e2SPeter Wemm
1516c2aa98e2SPeter Wemm
1517c2aa98e2SPeter Wemm+--------------------------------+
1518c2aa98e2SPeter Wemm| USING USERDB TO MAP FULL NAMES |
1519c2aa98e2SPeter Wemm+--------------------------------+
1520c2aa98e2SPeter Wemm
1521c2aa98e2SPeter WemmThe user database was not originally intended for mapping full names
1522c2aa98e2SPeter Wemmto login names (e.g., Eric.Allman => eric), but some people are using
1523c2aa98e2SPeter Wemmit that way.  (I would recommend that you set up aliases for this
1524c2aa98e2SPeter Wemmpurpose instead -- since you can specify multiple alias files, this
1525c2aa98e2SPeter Wemmis fairly easy.)  The intent was to locate the default maildrop at
1526c2aa98e2SPeter Wemma site, but allow you to override this by sending to a specific host.
1527c2aa98e2SPeter Wemm
1528c2aa98e2SPeter WemmIf you decide to set up the user database in this fashion, it is
1529c2aa98e2SPeter Wemmimperative that you not use FEATURE(stickyhost) -- otherwise,
1530c2aa98e2SPeter Wemme-mail sent to Full.Name@local.host.name will be rejected.
1531c2aa98e2SPeter Wemm
1532c2aa98e2SPeter WemmTo build the internal form of the user database, use:
1533c2aa98e2SPeter Wemm
1534c2aa98e2SPeter Wemm	makemap btree /usr/data/base.db < /usr/data/base.txt
1535c2aa98e2SPeter Wemm
1536c2aa98e2SPeter WemmAs a general rule, I am adamantly opposed to using full names as
1537c2aa98e2SPeter Wemme-mail addresses, since they are not in any sense unique.  For example,
1538c2aa98e2SPeter Wemmthe Unix software-development community has two Andy Tannenbaums,
1539c2aa98e2SPeter Wemmat least two well-known Peter Deutsches, and at one time Bell Labs
1540c2aa98e2SPeter Wemmhad two Stephen R. Bournes with offices along the same hallway.
1541c2aa98e2SPeter WemmWhich one will be forced to suffer the indignity of being
1542c2aa98e2SPeter WemmStephen_R_Bourne_2?  The less famous of the two, or the one that
1543c2aa98e2SPeter Wemmwas hired later?
1544c2aa98e2SPeter Wemm
1545c2aa98e2SPeter WemmFinger should handle full names (and be fuzzy).  Mail should use
1546c2aa98e2SPeter Wemmhandles, and not be fuzzy.  [Not that I expect anyone to pay any
1547c2aa98e2SPeter Wemmattention to my opinions.]
1548c2aa98e2SPeter Wemm
1549c2aa98e2SPeter Wemm
1550c2aa98e2SPeter Wemm+--------------------------------+
1551c2aa98e2SPeter Wemm| MISCELLANEOUS SPECIAL FEATURES |
1552c2aa98e2SPeter Wemm+--------------------------------+
1553c2aa98e2SPeter Wemm
1554c2aa98e2SPeter WemmPlussed users
1555c2aa98e2SPeter Wemm	Sometimes it is convenient to merge configuration on a
1556c2aa98e2SPeter Wemm	centralized mail machine, for example, to forward all
1557c2aa98e2SPeter Wemm	root mail to a mail server.  In this case it might be
1558c2aa98e2SPeter Wemm	useful to be able to treat the root addresses as a class
1559c2aa98e2SPeter Wemm	of addresses with subtle differences.  You can do this
1560c2aa98e2SPeter Wemm	using plussed users.  For example, a client might include
1561c2aa98e2SPeter Wemm	the alias:
1562c2aa98e2SPeter Wemm
1563c2aa98e2SPeter Wemm		root:  root+client1@server
1564c2aa98e2SPeter Wemm
1565c2aa98e2SPeter Wemm	On the server, this will match an alias for "root+client1".
1566c2aa98e2SPeter Wemm	If that is not found, the alias "root+*" will be tried,
1567c2aa98e2SPeter Wemm	then "root".
1568c2aa98e2SPeter Wemm
1569c2aa98e2SPeter WemmLDAP
1570c2aa98e2SPeter Wemm	For notes on use LDAP in sendmail, see
1571c2aa98e2SPeter Wemm	http://www.stanford.edu/~bbense/Inst.html
1572c2aa98e2SPeter Wemm
1573c2aa98e2SPeter Wemm
1574c2aa98e2SPeter Wemm
1575c2aa98e2SPeter Wemm+----------------+
1576c2aa98e2SPeter Wemm| SECURITY NOTES |
1577c2aa98e2SPeter Wemm+----------------+
1578c2aa98e2SPeter Wemm
1579c2aa98e2SPeter WemmA lot of sendmail security comes down to you.  Sendmail 8 is much
1580c2aa98e2SPeter Wemmmore careful about checking for security problems than previous
1581c2aa98e2SPeter Wemmversions, but there are some things that you still need to watch
1582c2aa98e2SPeter Wemmfor.  In particular:
1583c2aa98e2SPeter Wemm
1584c2aa98e2SPeter Wemm* Make sure the aliases file isn't writable except by trusted
1585c2aa98e2SPeter Wemm  system personnel.  This includes both the text and database
1586c2aa98e2SPeter Wemm  version.
1587c2aa98e2SPeter Wemm
1588c2aa98e2SPeter Wemm* Make sure that other files that sendmail reads, such as the
1589c2aa98e2SPeter Wemm  mailertable, are only writable by trusted system personnel.
1590c2aa98e2SPeter Wemm
1591c2aa98e2SPeter Wemm* The queue directory should not be world writable PARTICULARLY
1592c2aa98e2SPeter Wemm  if your system allows "file giveaways" (that is, if a non-root
1593c2aa98e2SPeter Wemm  user can chown any file they own to any other user).
1594c2aa98e2SPeter Wemm
1595c2aa98e2SPeter Wemm* If your system allows file giveaways, DO NOT create a publically
1596c2aa98e2SPeter Wemm  writable directory for forward files.  This will allow anyone
1597c2aa98e2SPeter Wemm  to steal anyone else's e-mail.  Instead, create a script that
1598c2aa98e2SPeter Wemm  copies the .forward file from users' home directories once a
1599c2aa98e2SPeter Wemm  night (if you want the non-NFS-mounted forward directory).
1600c2aa98e2SPeter Wemm
1601c2aa98e2SPeter Wemm* If your system allows file giveaways, you'll find that
1602c2aa98e2SPeter Wemm  sendmail is much less trusting of :include: files -- in
1603c2aa98e2SPeter Wemm  particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
1604c2aa98e2SPeter Wemm  /etc/shells before they will be trusted (that is, before
1605c2aa98e2SPeter Wemm  files and programs listed in them will be honored).
1606c2aa98e2SPeter Wemm
1607c2aa98e2SPeter WemmIn general, file giveaways are a mistake -- if you can turn them
1608c2aa98e2SPeter Wemmoff I recommend you do so.
1609c2aa98e2SPeter Wemm
1610c2aa98e2SPeter Wemm
1611c2aa98e2SPeter Wemm+--------------------------------+
1612c2aa98e2SPeter Wemm| TWEAKING CONFIGURATION OPTIONS |
1613c2aa98e2SPeter Wemm+--------------------------------+
1614c2aa98e2SPeter Wemm
1615c2aa98e2SPeter WemmThere are a large number of configuration options that don't normally
1616c2aa98e2SPeter Wemmneed to be changed.  However, if you feel you need to tweak them, you
1617c2aa98e2SPeter Wemmcan define the following M4 variables.  This list is shown in four
1618c2aa98e2SPeter Wemmcolumns:  the name you define, the default value for that definition,
1619c2aa98e2SPeter Wemmthe option or macro that is affected (either Ox for an option or Dx
1620c2aa98e2SPeter Wemmfor a macro), and a brief description.  Greater detail of the semantics
1621c2aa98e2SPeter Wemmcan be found in the Installation and Operations Guide.
1622c2aa98e2SPeter Wemm
1623c2aa98e2SPeter WemmSome options are likely to be deprecated in future versions -- that is,
1624c2aa98e2SPeter Wemmthe option is only included to provide back-compatibility.  These are
1625c2aa98e2SPeter Wemmmarked with "*".
1626c2aa98e2SPeter Wemm
1627c2aa98e2SPeter WemmRemember that these options are M4 variables, and hence may need to
1628c2aa98e2SPeter Wemmbe quoted.  In particular, arguments with commas will usually have to
1629c2aa98e2SPeter Wemmbe ``double quoted, like this phrase'' to avoid having the comma
1630c2aa98e2SPeter Wemmconfuse things.  This is common for alias file definitions and for
1631c2aa98e2SPeter Wemmthe read timeout.
1632c2aa98e2SPeter Wemm
1633c2aa98e2SPeter WemmM4 Variable Name	Configuration	Description & [Default]
1634c2aa98e2SPeter Wemm================	=============	=======================
1635c2aa98e2SPeter WemmconfMAILER_NAME		$n macro	[MAILER-DAEMON] The sender name used
1636c2aa98e2SPeter Wemm					for internally generated outgoing
1637c2aa98e2SPeter Wemm					messages.
1638c2aa98e2SPeter WemmconfDOMAIN_NAME		$j macro	If defined, sets $j.  This should
1639c2aa98e2SPeter Wemm					only be done if your system cannot
1640c2aa98e2SPeter Wemm					determine your local domain name,
1641c2aa98e2SPeter Wemm					and then it should be set to
1642c2aa98e2SPeter Wemm					$w.Foo.COM, where Foo.COM is your
1643c2aa98e2SPeter Wemm					domain name.
1644c2aa98e2SPeter WemmconfCF_VERSION		$Z macro	If defined, this is appended to the
1645c2aa98e2SPeter Wemm					configuration version name.
1646c2aa98e2SPeter WemmconfFROM_HEADER		From:		[$?x$x <$g>$|$g$.] The format of an
1647c2aa98e2SPeter Wemm					internally generated From: address.
1648c2aa98e2SPeter WemmconfRECEIVED_HEADER	Received:
1649c2aa98e2SPeter Wemm		[$?sfrom $s $.$?_($?s$|from $.$_)
1650c2aa98e2SPeter Wemm			$.by $j ($v/$Z)$?r with $r$. id $i$?u
1651c2aa98e2SPeter Wemm			for $u; $|;
1652c2aa98e2SPeter Wemm			$.$b]
1653c2aa98e2SPeter Wemm					The format of the Received: header
1654c2aa98e2SPeter Wemm					in messages passed through this host.
1655c2aa98e2SPeter Wemm					It is unwise to try to change this.
1656c2aa98e2SPeter WemmconfCW_FILE		Fw class	[/etc/sendmail.cw] Name of file used
1657c2aa98e2SPeter Wemm					to get the local additions to the $=w
1658c2aa98e2SPeter Wemm					(local host names) class.
1659c2aa98e2SPeter WemmconfCT_FILE		Ft class	[/etc/sendmail.ct] Name of file used
1660c2aa98e2SPeter Wemm					to get the local additions to the $=t
1661c2aa98e2SPeter Wemm					(trusted users) class.
1662c2aa98e2SPeter WemmconfCR_FILE		FR class	[/etc/mail/relay-domains] Name of
1663c2aa98e2SPeter Wemm					file used to get the local additions
1664c2aa98e2SPeter Wemm					to the $=R (hosts allowed to relay)
1665c2aa98e2SPeter Wemm					class.
1666c2aa98e2SPeter WemmconfTRUSTED_USERS	Ct class	[no default] Names of users to add to
1667c2aa98e2SPeter Wemm					the list of trusted users.  This list
1668c2aa98e2SPeter Wemm					always includes root, uucp, and daemon.
1669c2aa98e2SPeter Wemm					See also FEATURE(use_ct_file).
1670c2aa98e2SPeter WemmconfSMTP_MAILER		-		[esmtp] The mailer name used when
1671c2aa98e2SPeter Wemm					SMTP connectivity is required.
1672c2aa98e2SPeter Wemm					One of "smtp", "smtp8", or "esmtp".
1673c2aa98e2SPeter WemmconfUUCP_MAILER		-		[uucp-old] The mailer to be used by
1674c2aa98e2SPeter Wemm					default for bang-format recipient
1675c2aa98e2SPeter Wemm					addresses.  See also discussion of
1676c2aa98e2SPeter Wemm					$=U, $=Y, and $=Z in the MAILER(uucp)
1677c2aa98e2SPeter Wemm					section.
1678c2aa98e2SPeter WemmconfLOCAL_MAILER	-		[local] The mailer name used when
1679c2aa98e2SPeter Wemm					local connectivity is required.
1680c2aa98e2SPeter Wemm					Almost always "local".
1681c2aa98e2SPeter WemmconfRELAY_MAILER	-		[relay] The default mailer name used
1682c2aa98e2SPeter Wemm					for relaying any mail (e.g., to a
1683c2aa98e2SPeter Wemm					BITNET_RELAY, a SMART_HOST, or
1684c2aa98e2SPeter Wemm					whatever).  This can reasonably be
1685c2aa98e2SPeter Wemm					"uucp-new" if you are on a
1686c2aa98e2SPeter Wemm					UUCP-connected site.
1687c2aa98e2SPeter WemmconfSEVEN_BIT_INPUT	SevenBitInput	[False] Force input to seven bits?
1688c2aa98e2SPeter WemmconfEIGHT_BIT_HANDLING	EightBitMode	[pass8] 8-bit data handling
1689c2aa98e2SPeter WemmconfALIAS_WAIT		AliasWait	[10m] Time to wait for alias file
1690c2aa98e2SPeter Wemm					rebuild until you get bored and
1691c2aa98e2SPeter Wemm					decide that the apparently pending
1692c2aa98e2SPeter Wemm					rebuild failed.
1693c2aa98e2SPeter WemmconfMIN_FREE_BLOCKS	MinFreeBlocks	[100] Minimum number of free blocks on
1694c2aa98e2SPeter Wemm					queue filesystem to accept SMTP mail.
1695c2aa98e2SPeter Wemm					(Prior to 8.7 this was minfree/maxsize,
1696c2aa98e2SPeter Wemm					where minfree was the number of free
1697c2aa98e2SPeter Wemm					blocks and maxsize was the maximum
1698c2aa98e2SPeter Wemm					message size.  Use confMAX_MESSAGE_SIZE
1699c2aa98e2SPeter Wemm					for the second value now.)
1700c2aa98e2SPeter WemmconfMAX_MESSAGE_SIZE	MaxMessageSize	[infinite] The maximum size of messages
1701c2aa98e2SPeter Wemm					that will be accepted (in bytes).
1702c2aa98e2SPeter WemmconfBLANK_SUB		BlankSub	[.] Blank (space) substitution
1703c2aa98e2SPeter Wemm					character.
1704c2aa98e2SPeter WemmconfCON_EXPENSIVE	HoldExpensive	[False] Avoid connecting immediately
1705c2aa98e2SPeter Wemm					to mailers marked expensive?
1706c2aa98e2SPeter WemmconfCHECKPOINT_INTERVAL	CheckpointInterval
1707c2aa98e2SPeter Wemm					[10] Checkpoint queue files every N
1708c2aa98e2SPeter Wemm					recipients.
1709c2aa98e2SPeter WemmconfDELIVERY_MODE	DeliveryMode	[background] Default delivery mode.
1710c2aa98e2SPeter WemmconfAUTO_REBUILD	AutoRebuildAliases
1711c2aa98e2SPeter Wemm					[False] Automatically rebuild alias
1712c2aa98e2SPeter Wemm					file if needed.
1713c2aa98e2SPeter WemmconfERROR_MODE		ErrorMode	[print] Error message mode.
1714c2aa98e2SPeter WemmconfERROR_MESSAGE	ErrorHeader	[undefined] Error message header/file.
1715c2aa98e2SPeter WemmconfSAVE_FROM_LINES	SafeFromLine	Save extra leading From_ lines.
1716c2aa98e2SPeter WemmconfTEMP_FILE_MODE	TempFileMode	[0600] Temporary file mode.
1717c2aa98e2SPeter WemmconfMATCH_GECOS		MatchGECOS	[False] Match GECOS field.
1718c2aa98e2SPeter WemmconfMAX_HOP		MaxHopCount	[25] Maximum hop count.
1719c2aa98e2SPeter WemmconfIGNORE_DOTS*	IgnoreDots	[False; always False in -bs or -bd mode]
1720c2aa98e2SPeter Wemm					Ignore dot as terminator for incoming
1721c2aa98e2SPeter Wemm					messages?
1722c2aa98e2SPeter WemmconfBIND_OPTS		ResolverOptions	[undefined] Default options for DNS
1723c2aa98e2SPeter Wemm					resolver.
1724c2aa98e2SPeter WemmconfMIME_FORMAT_ERRORS*	SendMimeErrors	[True] Send error messages as MIME-
1725c2aa98e2SPeter Wemm					encapsulated messages per RFC 1344.
1726c2aa98e2SPeter WemmconfFORWARD_PATH	ForwardPath	[$z/.forward.$w:$z/.forward]
1727c2aa98e2SPeter Wemm					The colon-separated list of places to
1728c2aa98e2SPeter Wemm					search for .forward files.  N.B.: see
1729c2aa98e2SPeter Wemm					the Security Notes section.
1730c2aa98e2SPeter WemmconfMCI_CACHE_SIZE	ConnectionCacheSize
1731c2aa98e2SPeter Wemm					[2] Size of open connection cache.
1732c2aa98e2SPeter WemmconfMCI_CACHE_TIMEOUT	ConnectionCacheTimeout
1733c2aa98e2SPeter Wemm					[5m] Open connection cache timeout.
1734c2aa98e2SPeter WemmconfHOST_STATUS_DIRECTORY HostStatusDirectory
1735c2aa98e2SPeter Wemm					[undefined] If set, host status is kept
1736c2aa98e2SPeter Wemm					on disk between sendmail runs in the
1737c2aa98e2SPeter Wemm					named directory tree.  This need not be
1738c2aa98e2SPeter Wemm					a full pathname, in which case it is
1739c2aa98e2SPeter Wemm					interpreted relative to the queue
1740c2aa98e2SPeter Wemm					directory.
1741c2aa98e2SPeter WemmconfSINGLE_THREAD_DELIVERY  SingleThreadDelivery
1742c2aa98e2SPeter Wemm					[False] If this option and the
1743c2aa98e2SPeter Wemm					HostStatusDirectory option are both
1744c2aa98e2SPeter Wemm					set, single thread deliveries to other
1745c2aa98e2SPeter Wemm					hosts.  That is, don't allow any two
1746c2aa98e2SPeter Wemm					sendmails on this host to connect
1747c2aa98e2SPeter Wemm					simultaneously to any other single
1748c2aa98e2SPeter Wemm					host.  This can slow down delivery in
1749c2aa98e2SPeter Wemm					some cases, in particular since a
1750c2aa98e2SPeter Wemm					cached but otherwise idle connection
1751c2aa98e2SPeter Wemm					to a host will prevent other sendmails
1752c2aa98e2SPeter Wemm					from connecting to the other host.
1753c2aa98e2SPeter WemmconfUSE_ERRORS_TO*	UserErrorsTo	[False] Use the Errors-To: header to
1754c2aa98e2SPeter Wemm					deliver error messages.  This should
1755c2aa98e2SPeter Wemm					not be necessary because of general
1756c2aa98e2SPeter Wemm					acceptance of the envelope/header
1757c2aa98e2SPeter Wemm					distinction.
1758c2aa98e2SPeter WemmconfLOG_LEVEL		LogLevel	[9] Log level.
1759c2aa98e2SPeter WemmconfME_TOO		MeToo		[False] Include sender in group
1760c2aa98e2SPeter Wemm					expansions.
1761c2aa98e2SPeter WemmconfCHECK_ALIASES	CheckAliases	[False] Check RHS of aliases when
1762c2aa98e2SPeter Wemm					running newaliases.  Since this does
1763c2aa98e2SPeter Wemm					DNS lookups on every address, it can
1764c2aa98e2SPeter Wemm					slow down the alias rebuild process
1765c2aa98e2SPeter Wemm					considerably on large alias files.
1766c2aa98e2SPeter WemmconfOLD_STYLE_HEADERS*	OldStyleHeaders	[True] Assume that headers without
1767c2aa98e2SPeter Wemm					special chars are old style.
1768c2aa98e2SPeter WemmconfDAEMON_OPTIONS	DaemonPortOptions
1769c2aa98e2SPeter Wemm					[none] SMTP daemon options.
1770c2aa98e2SPeter WemmconfPRIVACY_FLAGS	PrivacyOptions	[authwarnings] Privacy flags.
1771c2aa98e2SPeter WemmconfCOPY_ERRORS_TO	PostmasterCopy	[undefined] Address for additional
1772c2aa98e2SPeter Wemm					copies of all error messages.
1773c2aa98e2SPeter WemmconfQUEUE_FACTOR	QueueFactor	[600000] Slope of queue-only function.
1774c2aa98e2SPeter WemmconfDONT_PRUNE_ROUTES	DontPruneRoutes	[False] Don't prune down route-addr
1775c2aa98e2SPeter Wemm					syntax addresses to the minimum
1776c2aa98e2SPeter Wemm					possible.
1777c2aa98e2SPeter WemmconfSAFE_QUEUE*		SuperSafe	[True] Commit all messages to disk
1778c2aa98e2SPeter Wemm					before forking.
1779c2aa98e2SPeter WemmconfTO_INITIAL		Timeout.initial	[5m] The timeout waiting for a response
1780c2aa98e2SPeter Wemm					on the initial connect.
1781c2aa98e2SPeter WemmconfTO_CONNECT		Timeout.connect	[0] The timeout waiting for an initial
1782c2aa98e2SPeter Wemm					connect() to complete.  This can only
1783c2aa98e2SPeter Wemm					shorten connection timeouts; the kernel
1784c2aa98e2SPeter Wemm					silently enforces an absolute maximum
1785c2aa98e2SPeter Wemm					(which varies depending on the system).
1786c2aa98e2SPeter WemmconfTO_ICONNECT		Timeout.iconnect
1787c2aa98e2SPeter Wemm					[undefined] Like Timeout.connect, but
1788c2aa98e2SPeter Wemm					applies only to the very first attempt
1789c2aa98e2SPeter Wemm					to connect to a host in a message.
1790c2aa98e2SPeter Wemm					This allows a single very fast pass
1791c2aa98e2SPeter Wemm					followed by more careful delivery
1792c2aa98e2SPeter Wemm					attempts in the future.
1793c2aa98e2SPeter WemmconfTO_HELO		Timeout.helo	[5m] The timeout waiting for a response
1794c2aa98e2SPeter Wemm					to a HELO or EHLO command.
1795c2aa98e2SPeter WemmconfTO_MAIL		Timeout.mail	[10m] The timeout waiting for a
1796c2aa98e2SPeter Wemm					response to the MAIL command.
1797c2aa98e2SPeter WemmconfTO_RCPT		Timeout.rcpt	[1h] The timeout waiting for a response
1798c2aa98e2SPeter Wemm					to the RCPT command.
1799c2aa98e2SPeter WemmconfTO_DATAINIT		Timeout.datainit
1800c2aa98e2SPeter Wemm					[5m] The timeout waiting for a 354
1801c2aa98e2SPeter Wemm					response from the DATA command.
1802c2aa98e2SPeter WemmconfTO_DATABLOCK	Timeout.datablock
1803c2aa98e2SPeter Wemm					[1h] The timeout waiting for a block
1804c2aa98e2SPeter Wemm					during DATA phase.
1805c2aa98e2SPeter WemmconfTO_DATAFINAL	Timeout.datafinal
1806c2aa98e2SPeter Wemm					[1h] The timeout waiting for a response
1807c2aa98e2SPeter Wemm					to the final "." that terminates a
1808c2aa98e2SPeter Wemm					message.
1809c2aa98e2SPeter WemmconfTO_RSET		Timeout.rset	[5m] The timeout waiting for a response
1810c2aa98e2SPeter Wemm					to the RSET command.
1811c2aa98e2SPeter WemmconfTO_QUIT		Timeout.quit	[2m] The timeout waiting for a response
1812c2aa98e2SPeter Wemm					to the QUIT command.
1813c2aa98e2SPeter WemmconfTO_MISC		Timeout.misc	[2m] The timeout waiting for a response
1814c2aa98e2SPeter Wemm					to other SMTP commands.
1815c2aa98e2SPeter WemmconfTO_COMMAND		Timeout.command	[1h] In server SMTP, the timeout waiting
1816c2aa98e2SPeter Wemm					for a command to be issued.
1817c2aa98e2SPeter WemmconfTO_IDENT		Timeout.ident	[30s] The timeout waiting for a response
1818c2aa98e2SPeter Wemm					to an IDENT query.
1819c2aa98e2SPeter WemmconfTO_FILEOPEN		Timeout.fileopen
1820c2aa98e2SPeter Wemm					[60s] The timeout waiting for a file
1821c2aa98e2SPeter Wemm					(e.g., :include: file) to be opened.
1822c2aa98e2SPeter WemmconfTO_QUEUERETURN	Timeout.queuereturn
1823c2aa98e2SPeter Wemm					[5d] The timeout before a message is
1824c2aa98e2SPeter Wemm					returned as undeliverable.
1825c2aa98e2SPeter WemmconfTO_QUEUERETURN_NORMAL
1826c2aa98e2SPeter Wemm			Timeout.queuereturn.normal
1827c2aa98e2SPeter Wemm					[undefined] As above, for normal
1828c2aa98e2SPeter Wemm					priority messages.
1829c2aa98e2SPeter WemmconfTO_QUEUERETURN_URGENT
1830c2aa98e2SPeter Wemm			Timeout.queuereturn.urgent
1831c2aa98e2SPeter Wemm					[undefined] As above, for urgent
1832c2aa98e2SPeter Wemm					priority messages.
1833c2aa98e2SPeter WemmconfTO_QUEUERETURN_NONURGENT
1834c2aa98e2SPeter Wemm			Timeout.queuereturn.non-urgent
1835c2aa98e2SPeter Wemm					[undefined] As above, for non-urgent
1836c2aa98e2SPeter Wemm					(low) priority messages.
1837c2aa98e2SPeter WemmconfTO_QUEUEWARN	Timeout.queuewarn
1838c2aa98e2SPeter Wemm					[4h] The timeout before a warning
1839c2aa98e2SPeter Wemm					message is sent to the sender telling
1840c2aa98e2SPeter Wemm					them that the message has been deferred.
1841c2aa98e2SPeter WemmconfTO_QUEUEWARN_NORMAL	Timeout.queuewarn.normal
1842c2aa98e2SPeter Wemm					[undefined] As above, for normal
1843c2aa98e2SPeter Wemm					priority messages.
1844c2aa98e2SPeter WemmconfTO_QUEUEWARN_URGENT	Timeout.queuewarn.urgent
1845c2aa98e2SPeter Wemm					[undefined] As above, for urgent
1846c2aa98e2SPeter Wemm					priority messages.
1847c2aa98e2SPeter WemmconfTO_QUEUEWARN_NONURGENT
1848c2aa98e2SPeter Wemm			Timeout.queuewarn.non-urgent
1849c2aa98e2SPeter Wemm					[undefined] As above, for non-urgent
1850c2aa98e2SPeter Wemm					(low) priority messages.
1851c2aa98e2SPeter WemmconfTO_HOSTSTATUS	Timeout.hoststatus
1852c2aa98e2SPeter Wemm					[30m] How long information about host
1853c2aa98e2SPeter Wemm					statuses will be maintained before it
1854c2aa98e2SPeter Wemm					is considered stale and the host should
1855c2aa98e2SPeter Wemm					be retried.  This applies both within
1856c2aa98e2SPeter Wemm					a single queue run and to persistent
1857c2aa98e2SPeter Wemm					information (see below).
1858c2aa98e2SPeter WemmconfTIME_ZONE		TimeZoneSpec	[USE_SYSTEM] Time zone info -- can be
1859c2aa98e2SPeter Wemm					USE_SYSTEM to use the system's idea,
1860c2aa98e2SPeter Wemm					USE_TZ to use the user's TZ envariable,
1861c2aa98e2SPeter Wemm					or something else to force that value.
1862c2aa98e2SPeter WemmconfDEF_USER_ID		DefaultUser	[1:1] Default user id.
1863c2aa98e2SPeter WemmconfUSERDB_SPEC		UserDatabaseSpec
1864c2aa98e2SPeter Wemm					[undefined] User database specification.
1865c2aa98e2SPeter WemmconfFALLBACK_MX		FallbackMXhost	[undefined] Fallback MX host.
1866c2aa98e2SPeter WemmconfTRY_NULL_MX_LIST	TryNullMXList	[False] If we are the best MX for a
1867c2aa98e2SPeter Wemm					host and haven't made other
1868c2aa98e2SPeter Wemm					arrangements, try connecting to the
1869c2aa98e2SPeter Wemm					host directly; normally this would be
1870c2aa98e2SPeter Wemm					a config error.
1871c2aa98e2SPeter WemmconfQUEUE_LA		QueueLA		[8] Load average at which queue-only
1872c2aa98e2SPeter Wemm					function kicks in.
1873c2aa98e2SPeter WemmconfREFUSE_LA		RefuseLA	[12] Load average at which incoming
1874c2aa98e2SPeter Wemm					SMTP connections are refused.
1875c2aa98e2SPeter WemmconfMAX_DAEMON_CHILDREN	MaxDaemonChildren
1876c2aa98e2SPeter Wemm					[undefined] The maximum number of
1877c2aa98e2SPeter Wemm					children the daemon will permit.  After
1878c2aa98e2SPeter Wemm					this number, connections will be
1879c2aa98e2SPeter Wemm					rejected.  If not set or <= 0, there is
1880c2aa98e2SPeter Wemm					no limit.
1881c2aa98e2SPeter WemmconfCONNECTION_RATE_THROTTLE ConnectionRateThrottle
1882c2aa98e2SPeter Wemm					[undefined] The maximum number of
1883c2aa98e2SPeter Wemm					connections permitted per second.
1884c2aa98e2SPeter Wemm					After this many connections are
1885c2aa98e2SPeter Wemm					accepted, further connections will be
1886c2aa98e2SPeter Wemm					delayed.  If not set or <= 0, there is
1887c2aa98e2SPeter Wemm					no limit.
1888c2aa98e2SPeter WemmconfWORK_RECIPIENT_FACTOR
1889c2aa98e2SPeter Wemm			RecipientFactor	[30000] Cost of each recipient.
1890c2aa98e2SPeter WemmconfSEPARATE_PROC	ForkEachJob	[False] Run all deliveries in a separate
1891c2aa98e2SPeter Wemm					process.
1892c2aa98e2SPeter WemmconfWORK_CLASS_FACTOR	ClassFactor	[1800] Priority multiplier for class.
1893c2aa98e2SPeter WemmconfWORK_TIME_FACTOR	RetryFactor	[90000] Cost of each delivery attempt.
1894c2aa98e2SPeter WemmconfQUEUE_SORT_ORDER	QueueSortOrder	[Priority] Queue sort algorithm:
1895c2aa98e2SPeter Wemm					Priority, Host, or Time.
1896c2aa98e2SPeter WemmconfMIN_QUEUE_AGE	MinQueueAge	[0] The minimum amount of time a job
1897c2aa98e2SPeter Wemm					must sit in the queue between queue
1898c2aa98e2SPeter Wemm					runs.  This allows you to set the
1899c2aa98e2SPeter Wemm					queue run interval low for better
1900c2aa98e2SPeter Wemm					responsiveness without trying all
1901c2aa98e2SPeter Wemm					jobs in each run.
1902c2aa98e2SPeter WemmconfDEF_CHAR_SET	DefaultCharSet	[unknown-8bit] When converting
1903c2aa98e2SPeter Wemm					unlabeled 8 bit input to MIME, the
1904c2aa98e2SPeter Wemm					character set to use by default.
1905c2aa98e2SPeter WemmconfSERVICE_SWITCH_FILE	ServiceSwitchFile
1906c2aa98e2SPeter Wemm					[/etc/service.switch] The file to use
1907c2aa98e2SPeter Wemm					for the service switch on systems that
1908c2aa98e2SPeter Wemm					do not have a system-defined switch.
1909c2aa98e2SPeter WemmconfHOSTS_FILE		HostsFile	[/etc/hosts] The file to use when doing
1910c2aa98e2SPeter Wemm					"file" type access of hosts names.
1911c2aa98e2SPeter WemmconfDIAL_DELAY		DialDelay	[0s] If a connection fails, wait this
1912c2aa98e2SPeter Wemm					long and try again.  Zero means "don't
1913c2aa98e2SPeter Wemm					retry".  This is to allow "dial on
1914c2aa98e2SPeter Wemm					demand" connections to have enough time
1915c2aa98e2SPeter Wemm					to complete a connection.
1916c2aa98e2SPeter WemmconfNO_RCPT_ACTION	NoRecipientAction
1917c2aa98e2SPeter Wemm					[none] What to do if there are no legal
1918c2aa98e2SPeter Wemm					recipient fields (To:, Cc: or Bcc:)
1919c2aa98e2SPeter Wemm					in the message.  Legal values can
1920c2aa98e2SPeter Wemm					be "none" to just leave the
1921c2aa98e2SPeter Wemm					nonconforming message as is, "add-to"
1922c2aa98e2SPeter Wemm					to add a To: header with all the
1923c2aa98e2SPeter Wemm					known recipients (which may expose
1924c2aa98e2SPeter Wemm					blind recipients), "add-apparently-to"
1925c2aa98e2SPeter Wemm					to do the same but use Apparently-To:
1926c2aa98e2SPeter Wemm					instead of To:, "add-bcc" to add an
1927c2aa98e2SPeter Wemm					empty Bcc: header, or
1928c2aa98e2SPeter Wemm					"add-to-undisclosed" to add the header
1929c2aa98e2SPeter Wemm					``To: undisclosed-recipients:;''.
1930c2aa98e2SPeter WemmconfSAFE_FILE_ENV	SafeFileEnvironment
1931c2aa98e2SPeter Wemm					[undefined] If set, sendmail will do a
1932c2aa98e2SPeter Wemm					chroot() into this directory before
1933c2aa98e2SPeter Wemm					writing files.
1934c2aa98e2SPeter WemmconfCOLON_OK_IN_ADDR	ColonOkInAddr	[True unless Configuration Level > 6]
1935c2aa98e2SPeter Wemm					If set, colons are treated as a regular
1936c2aa98e2SPeter Wemm					character in addresses.  If not set,
1937c2aa98e2SPeter Wemm					they are treated as the introducer to
1938c2aa98e2SPeter Wemm					the RFC 822 "group" syntax.  Colons are
1939c2aa98e2SPeter Wemm					handled properly in route-addrs.  This
1940c2aa98e2SPeter Wemm					option defaults on for V5 and lower
1941c2aa98e2SPeter Wemm					configuration files.
1942c2aa98e2SPeter WemmconfMAX_QUEUE_RUN_SIZE	MaxQueueRunSize	[0] If set, limit the maximum size of
1943c2aa98e2SPeter Wemm					any given queue run to this number of
1944c2aa98e2SPeter Wemm					entries.  Essentially, this will stop
1945c2aa98e2SPeter Wemm					reading the queue directory after this
1946c2aa98e2SPeter Wemm					number of entries are reached; it does
1947c2aa98e2SPeter Wemm					_not_ pick the highest priority jobs,
1948c2aa98e2SPeter Wemm					so this should be as large as your
1949c2aa98e2SPeter Wemm					system can tolerate.  If not set, there
1950c2aa98e2SPeter Wemm					is no limit.
1951c2aa98e2SPeter WemmconfDONT_EXPAND_CNAMES	DontExpandCnames
1952c2aa98e2SPeter Wemm					[False] If set, $[ ... $] lookups that
1953c2aa98e2SPeter Wemm					do DNS based lookups do not expand
1954c2aa98e2SPeter Wemm					CNAME records.  This currently violates
1955c2aa98e2SPeter Wemm					the published standards, but the IETF
1956c2aa98e2SPeter Wemm					seems to be moving toward legalizing
1957c2aa98e2SPeter Wemm					this.  For example, if "FTP.Foo.ORG"
1958c2aa98e2SPeter Wemm					is a CNAME for "Cruft.Foo.ORG", then
1959c2aa98e2SPeter Wemm					with this option set a lookup of
1960c2aa98e2SPeter Wemm					"FTP" will return "FTP.Foo.ORG"; if
1961c2aa98e2SPeter Wemm					clear it returns "Cruft.FOO.ORG".  N.B.
1962c2aa98e2SPeter Wemm					you may not see any effect until your
1963c2aa98e2SPeter Wemm					downstream neighbors stop doing CNAME
1964c2aa98e2SPeter Wemm					lookups as well.
1965c2aa98e2SPeter WemmconfFROM_LINE		UnixFromLine	[From $g  $d] The From_ line used
1966c2aa98e2SPeter Wemm					when sending to files or programs.
1967c2aa98e2SPeter WemmconfSINGLE_LINE_FROM_HEADER  SingleLineFromHeader
1968c2aa98e2SPeter Wemm					[False] From: lines that have
1969c2aa98e2SPeter Wemm					embedded newlines are unwrapped
1970c2aa98e2SPeter Wemm					onto one line.
1971c2aa98e2SPeter WemmconfALLOW_BOGUS_HELO	AllowBogusHELO	[False] Allow HELO SMTP command that
1972c2aa98e2SPeter Wemm					does not include a host name.
1973c2aa98e2SPeter WemmconfMUST_QUOTE_CHARS	MustQuoteChars	[.'] Characters to be quoted in a full
1974c2aa98e2SPeter Wemm					name phrase (@,;:\()[] are automatic).
1975c2aa98e2SPeter WemmconfOPERATORS		OperatorChars	[.:%@!^/[]+] Address operator
1976c2aa98e2SPeter Wemm					characters.
1977c2aa98e2SPeter WemmconfSMTP_LOGIN_MSG	SmtpGreetingMessage
1978c2aa98e2SPeter Wemm					[$j Sendmail $v/$Z; $b]
1979c2aa98e2SPeter Wemm					The initial (spontaneous) SMTP
1980c2aa98e2SPeter Wemm					greeting message.  The word "ESMTP"
1981c2aa98e2SPeter Wemm					will be inserted between the first and
1982c2aa98e2SPeter Wemm					second words to convince other
1983c2aa98e2SPeter Wemm					sendmails to try to speak ESMTP.
1984c2aa98e2SPeter WemmconfDONT_INIT_GROUPS	DontInitGroups	[False] If set, the initgroups(3)
1985c2aa98e2SPeter Wemm					routine will never be invoked.  You
1986c2aa98e2SPeter Wemm					might want to do this if you are
1987c2aa98e2SPeter Wemm					running NIS and you have a large group
1988c2aa98e2SPeter Wemm					map, since this call does a sequential
1989c2aa98e2SPeter Wemm					scan of the map; in a large site this
1990c2aa98e2SPeter Wemm					can cause your ypserv to run
1991c2aa98e2SPeter Wemm					essentially full time.  If you set
1992c2aa98e2SPeter Wemm					this, agents run on behalf of users
1993c2aa98e2SPeter Wemm					will only have their primary
1994c2aa98e2SPeter Wemm					(/etc/passwd) group permissions.
1995c2aa98e2SPeter WemmconfUNSAFE_GROUP_WRITES	UnsafeGroupWrites
1996c2aa98e2SPeter Wemm					[False] If set, group-writable
1997c2aa98e2SPeter Wemm					:include: and .forward files are
1998c2aa98e2SPeter Wemm					considered "unsafe", that is, programs
1999c2aa98e2SPeter Wemm					and files cannot be directly referenced
2000c2aa98e2SPeter Wemm					from such files.  World-writable files
2001c2aa98e2SPeter Wemm					are always considered unsafe.
2002c2aa98e2SPeter WemmconfDOUBLE_BOUNCE_ADDRESS  DoubleBounceAddress
2003c2aa98e2SPeter Wemm					[postmaster] If an error occurs when
2004c2aa98e2SPeter Wemm					sending an error message, send that
2005c2aa98e2SPeter Wemm					"double bounce" error message to this
2006c2aa98e2SPeter Wemm					address.
2007c2aa98e2SPeter WemmconfRUN_AS_USER		RunAsUser	[undefined] If set, become this user
2008c2aa98e2SPeter Wemm					when reading and delivering mail.
2009c2aa98e2SPeter Wemm					Causes all file reads (e.g., .forward
2010c2aa98e2SPeter Wemm					and :include: files) to be done as
2011c2aa98e2SPeter Wemm					this user.  Also, all programs will
2012c2aa98e2SPeter Wemm					be run as this user, and all output
2013c2aa98e2SPeter Wemm					files will be written as this user.
2014c2aa98e2SPeter Wemm					Intended for use only on firewalls
2015c2aa98e2SPeter Wemm					where users do not have accounts.
2016c2aa98e2SPeter WemmconfMAX_RCPTS_PER_MESSAGE  MaxRecipientsPerMessage
2017c2aa98e2SPeter Wemm					[infinite] If set, allow no more than
2018c2aa98e2SPeter Wemm					the specified number of recipients in
2019c2aa98e2SPeter Wemm					an SMTP envelope.  Further recipients
2020c2aa98e2SPeter Wemm					receive a 452 error code (i.e., they
2021c2aa98e2SPeter Wemm					are deferred for the next delivery
2022c2aa98e2SPeter Wemm					attempt).
2023c2aa98e2SPeter WemmconfDONT_PROBE_INTERFACES  DontProbeInterfaces
2024c2aa98e2SPeter Wemm					[False] If set, sendmail will _not_
2025c2aa98e2SPeter Wemm					insert the names and addresses of any
2026c2aa98e2SPeter Wemm					local interfaces into the $=w class
2027c2aa98e2SPeter Wemm					(list of known "equivalent" addresses).
2028c2aa98e2SPeter Wemm					If you set this, you must also include
2029c2aa98e2SPeter Wemm					some support for these addresses (e.g.,
2030c2aa98e2SPeter Wemm					in a mailertable entry) -- otherwise,
2031c2aa98e2SPeter Wemm					mail to addresses in this list will
2032c2aa98e2SPeter Wemm					bounce with a configuration error.
2033c2aa98e2SPeter WemmconfDONT_BLAME_SENDMAIL	DontBlameSendmail
2034c2aa98e2SPeter Wemm					[safe] Override sendmail's file
2035c2aa98e2SPeter Wemm					safety checks.  This will definitely
2036c2aa98e2SPeter Wemm					compromise system security and should
2037c2aa98e2SPeter Wemm					not be used unless absolutely
2038c2aa98e2SPeter Wemm					necessary.
2039c2aa98e2SPeter WemmconfREJECT_MSG		-		[550 Access denied] The message
2040c2aa98e2SPeter Wemm					given if the access database contains
2041c2aa98e2SPeter Wemm					REJECT in the value portion.
2042c2aa98e2SPeter Wemm
2043c2aa98e2SPeter WemmSee also the description of OSTYPE for some parameters that can be
2044c2aa98e2SPeter Wemmtweaked (generally pathnames to mailers).
2045c2aa98e2SPeter Wemm
2046c2aa98e2SPeter Wemm
2047c2aa98e2SPeter Wemm+-----------+
2048c2aa98e2SPeter Wemm| HIERARCHY |
2049c2aa98e2SPeter Wemm+-----------+
2050c2aa98e2SPeter Wemm
2051c2aa98e2SPeter WemmWithin this directory are several subdirectories, to wit:
2052c2aa98e2SPeter Wemm
2053c2aa98e2SPeter Wemmm4		General support routines.  These are typically
2054c2aa98e2SPeter Wemm		very important and should not be changed without
2055c2aa98e2SPeter Wemm		very careful consideration.
2056c2aa98e2SPeter Wemm
2057c2aa98e2SPeter Wemmcf		The configuration files themselves.  They have
2058c2aa98e2SPeter Wemm		".mc" suffixes, and must be run through m4 to
2059c2aa98e2SPeter Wemm		become complete.  The resulting output should
2060c2aa98e2SPeter Wemm		have a ".cf" suffix.
2061c2aa98e2SPeter Wemm
2062c2aa98e2SPeter Wemmostype		Definitions describing a particular operating
2063c2aa98e2SPeter Wemm		system type.  These should always be referenced
2064c2aa98e2SPeter Wemm		using the OSTYPE macro in the .mc file.  Examples
2065c2aa98e2SPeter Wemm		include "bsd4.3", "bsd4.4", "sunos3.5", and
2066c2aa98e2SPeter Wemm		"sunos4.1".
2067c2aa98e2SPeter Wemm
2068c2aa98e2SPeter Wemmdomain		Definitions describing a particular domain, referenced
2069c2aa98e2SPeter Wemm		using the DOMAIN macro in the .mc file.  These are
2070c2aa98e2SPeter Wemm		site dependent; for example, "CS.Berkeley.EDU.m4"
2071c2aa98e2SPeter Wemm		describes hosts in the CS.Berkeley.EDU subdomain.
2072c2aa98e2SPeter Wemm
2073c2aa98e2SPeter Wemmmailer		Descriptions of mailers.   These are referenced using
2074c2aa98e2SPeter Wemm		the MAILER macro in the .mc file.
2075c2aa98e2SPeter Wemm
2076c2aa98e2SPeter Wemmsh		Shell files used when building the .cf file from the
2077c2aa98e2SPeter Wemm		.mc file in the cf subdirectory.
2078c2aa98e2SPeter Wemm
2079c2aa98e2SPeter Wemmfeature		These hold special orthogonal features that you might
2080c2aa98e2SPeter Wemm		want to include.  They should be referenced using
2081c2aa98e2SPeter Wemm		the FEATURE macro.
2082c2aa98e2SPeter Wemm
2083c2aa98e2SPeter Wemmhack		Local hacks.  These can be referenced using the HACK
2084c2aa98e2SPeter Wemm		macro.  They shouldn't be of more than voyeuristic
2085c2aa98e2SPeter Wemm		interest outside the .Berkeley.EDU domain, but who knows?
2086c2aa98e2SPeter Wemm		We've all got our own peccadillos.
2087c2aa98e2SPeter Wemm
2088c2aa98e2SPeter Wemmsiteconfig	Site configuration -- e.g., tables of locally connected
2089c2aa98e2SPeter Wemm		UUCP sites.
2090c2aa98e2SPeter Wemm
2091c2aa98e2SPeter Wemm
2092c2aa98e2SPeter Wemm+------------------------+
2093c2aa98e2SPeter Wemm| ADMINISTRATIVE DETAILS |
2094c2aa98e2SPeter Wemm+------------------------+
2095c2aa98e2SPeter Wemm
2096c2aa98e2SPeter WemmThe following sections detail usage of certain internal parts of the
2097c2aa98e2SPeter Wemmsendmail.cf file.  Read them carefully if you are trying to modify
2098c2aa98e2SPeter Wemmthe current model.  If you find the above descriptions adequate, these
2099c2aa98e2SPeter Wemmshould be {boring, confusing, tedious, ridiculous} (pick one or more).
2100c2aa98e2SPeter Wemm
2101c2aa98e2SPeter WemmRULESETS (* means built in to sendmail)
2102c2aa98e2SPeter Wemm
2103c2aa98e2SPeter Wemm   0 *	Parsing
2104c2aa98e2SPeter Wemm   1 *	Sender rewriting
2105c2aa98e2SPeter Wemm   2 *	Recipient rewriting
2106c2aa98e2SPeter Wemm   3 *	Canonicalization
2107c2aa98e2SPeter Wemm   4 *	Post cleanup
2108c2aa98e2SPeter Wemm   5 *	Local address rewrite (after aliasing)
2109c2aa98e2SPeter Wemm  1x	mailer rules (sender qualification)
2110c2aa98e2SPeter Wemm  2x	mailer rules (recipient qualification)
2111c2aa98e2SPeter Wemm  3x	mailer rules (sender header qualification)
2112c2aa98e2SPeter Wemm  4x	mailer rules (recipient header qualification)
2113c2aa98e2SPeter Wemm  5x	mailer subroutines (general)
2114c2aa98e2SPeter Wemm  6x	mailer subroutines (general)
2115c2aa98e2SPeter Wemm  7x	mailer subroutines (general)
2116c2aa98e2SPeter Wemm  8x	reserved
2117c2aa98e2SPeter Wemm  90	Mailertable host stripping
2118c2aa98e2SPeter Wemm  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
2119c2aa98e2SPeter Wemm  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
2120c2aa98e2SPeter Wemm  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
2121c2aa98e2SPeter Wemm  99	Guaranteed null (for debugging)
2122c2aa98e2SPeter Wemm
2123c2aa98e2SPeter Wemm
2124c2aa98e2SPeter WemmMAILERS
2125c2aa98e2SPeter Wemm
2126c2aa98e2SPeter Wemm   0	local, prog	local and program mailers
2127c2aa98e2SPeter Wemm   1	[e]smtp, relay	SMTP channel
2128c2aa98e2SPeter Wemm   2	uucp-*		UNIX-to-UNIX Copy Program
2129c2aa98e2SPeter Wemm   3	netnews		Network News delivery
2130c2aa98e2SPeter Wemm   4	fax		Sam Leffler's HylaFAX software
2131c2aa98e2SPeter Wemm   5	mail11		DECnet mailer
2132c2aa98e2SPeter Wemm
2133c2aa98e2SPeter Wemm
2134c2aa98e2SPeter WemmMACROS
2135c2aa98e2SPeter Wemm
2136c2aa98e2SPeter Wemm   A
2137c2aa98e2SPeter Wemm   B	Bitnet Relay
2138c2aa98e2SPeter Wemm   C	DECnet Relay
2139c2aa98e2SPeter Wemm   D	The local domain -- usually not needed
2140c2aa98e2SPeter Wemm   E	reserved for X.400 Relay
2141c2aa98e2SPeter Wemm   F	FAX Relay
2142c2aa98e2SPeter Wemm   G
2143c2aa98e2SPeter Wemm   H	mail Hub (for mail clusters)
2144c2aa98e2SPeter Wemm   I
2145c2aa98e2SPeter Wemm   J
2146c2aa98e2SPeter Wemm   K
2147c2aa98e2SPeter Wemm   L	Luser Relay
2148c2aa98e2SPeter Wemm   M	Masquerade (who I claim to be)
2149c2aa98e2SPeter Wemm   N
2150c2aa98e2SPeter Wemm   O
2151c2aa98e2SPeter Wemm   P
2152c2aa98e2SPeter Wemm   Q
2153c2aa98e2SPeter Wemm   R	Relay (for unqualified names)
2154c2aa98e2SPeter Wemm   S	Smart Host
2155c2aa98e2SPeter Wemm   T
2156c2aa98e2SPeter Wemm   U	my UUCP name (if I have a UUCP connection)
2157c2aa98e2SPeter Wemm   V	UUCP Relay (class V hosts)
2158c2aa98e2SPeter Wemm   W	UUCP Relay (class W hosts)
2159c2aa98e2SPeter Wemm   X	UUCP Relay (class X hosts)
2160c2aa98e2SPeter Wemm   Y	UUCP Relay (all other hosts)
2161c2aa98e2SPeter Wemm   Z	Version number
2162c2aa98e2SPeter Wemm
2163c2aa98e2SPeter Wemm
2164c2aa98e2SPeter WemmCLASSES
2165c2aa98e2SPeter Wemm
2166c2aa98e2SPeter Wemm   A
2167c2aa98e2SPeter Wemm   B	domains that are candidates for bestmx lookup
2168c2aa98e2SPeter Wemm   C
2169c2aa98e2SPeter Wemm   D
2170c2aa98e2SPeter Wemm   E	addresses that should not seem to come from $M
2171c2aa98e2SPeter Wemm   F	hosts we forward for
2172c2aa98e2SPeter Wemm   G	domains that should be looked up in genericstable
2173c2aa98e2SPeter Wemm   H
2174c2aa98e2SPeter Wemm   I
2175c2aa98e2SPeter Wemm   J
2176c2aa98e2SPeter Wemm   K
2177c2aa98e2SPeter Wemm   L	addresses that should not be forwarded to $R
2178c2aa98e2SPeter Wemm   M	domains that should be mapped to $M
2179c2aa98e2SPeter Wemm   N
2180c2aa98e2SPeter Wemm   O	operators that indicate network operations (cannot be in local names)
2181c2aa98e2SPeter Wemm   P	top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc.
2182c2aa98e2SPeter Wemm   Q
2183c2aa98e2SPeter Wemm   R	domains we are willing to relay (pass anti-spam filters)
2184c2aa98e2SPeter Wemm   S
2185c2aa98e2SPeter Wemm   T
2186c2aa98e2SPeter Wemm   U	locally connected UUCP hosts
2187c2aa98e2SPeter Wemm   V	UUCP hosts connected to relay $V
2188c2aa98e2SPeter Wemm   W	UUCP hosts connected to relay $W
2189c2aa98e2SPeter Wemm   X	UUCP hosts connected to relay $X
2190c2aa98e2SPeter Wemm   Y	locally connected smart UUCP hosts
2191c2aa98e2SPeter Wemm   Z	locally connected domain-ized UUCP hosts
2192c2aa98e2SPeter Wemm   .	the class containing only a dot
2193c2aa98e2SPeter Wemm   [	the class containing only a left bracket
2194c2aa98e2SPeter Wemm
2195c2aa98e2SPeter Wemm
2196c2aa98e2SPeter WemmM4 DIVERSIONS
2197c2aa98e2SPeter Wemm
2198c2aa98e2SPeter Wemm   1	Local host detection and resolution
2199c2aa98e2SPeter Wemm   2	Local Ruleset 3 additions
2200c2aa98e2SPeter Wemm   3	Local Ruleset 0 additions
2201c2aa98e2SPeter Wemm   4	UUCP Ruleset 0 additions
2202c2aa98e2SPeter Wemm   5	locally interpreted names (overrides $R)
2203c2aa98e2SPeter Wemm   6	local configuration (at top of file)
2204c2aa98e2SPeter Wemm   7	mailer definitions
2205c2aa98e2SPeter Wemm   8
2206c2aa98e2SPeter Wemm   9	special local rulesets (1 and 2)
2207