xref: /original-bsd/usr.sbin/sendmail/cf/README (revision 9a35f7df)
1
2
3		NEW SENDMAIL CONFIGURATION FILES
4
5		Eric Allman <eric@CS.Berkeley.EDU>
6
7		@(#)README	8.60 (Berkeley) 05/24/95
8
9
10This document describes the sendmail configuration files being used
11at Berkeley.  These use features in the new (R8) sendmail; they will
12not work on other versions.
13
14These configuration files are probably not as general as previous
15versions, and don't handle as many of the weird cases automagically.
16I was able to simplify by them for two reasons.  First, the network
17has become more consistent -- for example, at this point, everyone
18on the internet is supposed to be running a name server, so hacks to
19handle NIC-registered hosts can go away.  Second, I assumed that a
20subdomain would be running SMTP internally -- UUCP is presumed to be
21a long-haul protocol.  I realize that this is not universal, but it
22does describe the vast majority of sites with which I am familiar,
23including those outside the US.
24
25Of course, the downside of this is that if you do live in a weird
26world, things are going to get weirder for you.  I'm sorry about that,
27but at the time we at Berkeley had a problem, and it seemed like the
28right thing to do.
29
30This package requires a post-V7 version of m4; if you are running the
314.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with
32a newer version.  You can m4-expand on their system, then run locally.
33SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work.  GNU m4 version 1.1
34also works.  Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't
35work -- you'll have to use a Net/2 or GNU version.
36
37IF YOU DON'T HAVE A BERKELEY MAKE, don't despair!  Just run
38"m4 foo.mc > foo.cf" -- that should be all you need.  There is also
39a fairly crude (but functional) Makefile.dist that works on the
40old version of make.
41
42To get started, you may want to look at tcpproto.mc (for TCP-only
43sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for
44clusters of clients using a single mail host).  Others are versions
45that we use at Berkeley, although not all are in current use.  For
46example, ucbarpa has gone away, but I've left ucbarpa.mc in because
47it demonstrates some interesting techniques.
48
49I'm not pretending that this README describes everything that these
50configuration files can do; clever people can probably tweak them
51to great effect.  But it should get you started.
52
53*******************************************************************
54***  BE SURE YOU CUSTOMIZE THESE FILES!  They have some		***
55***  Berkeley-specific assumptions built in, such as the name	***
56***  of our UUCP-relay.  You'll want to create your own domain	***
57***  description, and use that in place of domain/Berkeley.m4.	***
58*******************************************************************
59
60
61+--------------------------+
62| INTRODUCTION AND EXAMPLE |
63+--------------------------+
64
65Configuration files are contained in the subdirectory "cf", with a
66suffix ".mc".  They must be run through "m4" to produce a ".cf" file.
67
68Let's examine a typical .mc file (cf/cs-hpux9.mc):
69
70	divert(-1)
71	#
72	# Copyright (c) 1983 Eric P. Allman
73	# Copyright (c) 1988, 1993
74	#	The Regents of the University of California.  All rights reserved.
75	#
76	# Redistribution and use in source and binary forms, with or without
77	# modification, are permitted provided that the following conditions
78	# are met:
79	# 1. Redistributions of source code must retain the above copyright
80	#    notice, this list of conditions and the following disclaimer.
81	# 2. Redistributions in binary form must reproduce the above copyright
82	#    notice, this list of conditions and the following disclaimer in
83	#    the documentation and/or other materials provided with the
84	#    distribution.
85	# 3. All advertising materials mentioning features or use of this
86	#    software #    must display the following acknowledgement:
87	#	This product includes software developed by the University of
88	#	California, Berkeley and its contributors.
89	# 4. Neither the name of the University nor the names of its
90	#    contributors may be used to endorse or promote products derived
91	#    from this software without specific prior written permission.
92	#
93	# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS''
94	# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
95	# THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
96	# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS
97	# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
98	# OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
99	# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
100	# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
101	# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
102	# OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
103	# EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
104	#
105
106	#
107	#  This is a Berkeley-specific configuration file for HP-UX 9.x.
108	#  It applies only the the Computer Science Division at Berkeley,
109	#  and should not be used elsewhere.   It is provided on the sendmail
110	#  distribution as a sample only.  To create your own configuration
111	#  file, create an appropriate domain file in ../domain, change the
112	#  `DOMAIN' macro below to reference that file, and copy the result
113	#  to a name of your own choosing.
114	#
115
116The divert(-1) will delete the crud in the resulting output file.
117The copyright notice can be replace by whatever your lawyers require;
118our lawyers require the one that I've included in my files.  A copyleft
119is a copyright by another name.
120
121The next line MUST be
122
123	include(`../m4/cf.m4')
124
125This will pull in the M4 macros you will need to make sense of
126everything else.  As the saying goes, don't think about it, just
127do it.  If you don't do it, don't bother reading the rest of this
128file.
129
130	VERSIONID(`<SCCS or RCS version id>')
131
132VERSIONID is a macro that stuffs the version information into the
133resulting file.  We use SCCS; you could use RCS, something else, or
134omit it completely.  This is not the same as the version id included
135in SMTP greeting messages -- this is defined in m4/version.m4.
136
137	OSTYPE(hpux9)dnl
138
139You must specify an OSTYPE to properly configure things such as the
140pathname of the help and status files, the flags needed for the local
141mailer, and other important things.  If you omit it, you will get an
142error when you try to build the configuration.  Look at the ostype
143directory for the list of known operating system types.
144
145	DOMAIN(CS.Berkeley.EDU)dnl
146
147This example is specific to the Computer Science Division at Berkeley.
148You can use "DOMAIN(generic)" to get a sufficiently bland definition
149that may well work for you, or you can create a customized domain
150definition appropriate for your environment.
151
152	MAILER(local)
153	MAILER(smtp)
154
155These describe the mailers used at the default CS site site.  The
156local mailer is always included automatically.
157
158
159+--------+
160| OSTYPE |
161+--------+
162
163You MUST define an operating system environment, or the configuration
164file build will puke.  There are several environments available; look
165at the "ostype" directory for the current list.  This macro changes
166things like the location of the alias file and queue directory.  Some
167of these files are identical to one another.
168
169Operating system definitions are usually easy to write.  They may define
170the following variables (everything defaults, so an ostype file may be
171empty).  Unfortunately, the list of configuration-supported systems is
172not as broad as the list of source-supported systems, since many of
173the source contributors do not include corresponding ostype files.
174
175ALIAS_FILE		[/etc/aliases] The location of the text version
176			of the alias file(s).  It can be a comma-separated
177			list of names (but be sure you quote values with
178			commas in them -- for example, use
179				define(`ALIAS_FILE', `a,b')
180			to get "a" and "b" both listed as alias files;
181			otherwise the define() primitive only sees "a").
182HELP_FILE		[/usr/lib/sendmail.hf] The name of the file
183			containing information printed in response to
184			the SMTP HELP command.
185QUEUE_DIR		[/var/spool/mqueue] The directory containing
186			queue files.
187STATUS_FILE		[/etc/sendmail.st] The file containing status
188			information.
189LOCAL_MAILER_PATH	[/bin/mail] The program used to deliver local mail.
190LOCAL_MAILER_FLAGS	[rmn] The flags used by the local mailer.  The
191			flags lsDFM are always included.
192LOCAL_MAILER_ARGS	[mail -d $u] The arguments passed to deliver local
193			mail.
194LOCAL_MAILER_MAX	[undefined] If defined, the maximum size of local
195			mail that you are willing to accept.
196LOCAL_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
197			that ARRIVE from an address that resolves to the
198			local mailer and which are converted to MIME will be
199			labelled with this character set.
200LOCAL_SHELL_PATH	[/bin/sh] The shell used to deliver piped email.
201LOCAL_SHELL_FLAGS	[eu] The flags used by the shell mailer.  The
202			flags lsDFM are always included.
203LOCAL_SHELL_ARGS	[sh -c $u] The arguments passed to deliver "prog"
204			mail.
205LOCAL_SHELL_DIR		[$z:/] The directory search path in which the
206			shell should run.
207USENET_MAILER_PATH	[/usr/lib/news/inews] The name of the program
208			used to submit news.
209USENET_MAILER_FLAGS	[rlsDFMmn] The mailer flags for the usenet mailer.
210USENET_MAILER_ARGS	[-m -h -n] The command line arguments for the
211			usenet mailer.
212USENET_MAILER_MAX	[100000] The maximum size of messages that will
213			be accepted by the usenet mailer.
214SMTP_MAILER_FLAGS	[undefined] Flags added to SMTP mailer.  Default
215			flags are `mDFMUX' for all SMTP-based mailers; the
216			"esmtp" mailer adds `a' and "smtp8" adds `8'.
217SMTP_MAILER_MAX		[undefined] The maximum size of messages that will
218			be transported using the smtp, smtp8, or esmtp
219			mailers.
220SMTP_MAILER_ARGS	[IPC $h] The arguments passed to the smtp mailer.
221			About the only reason you would want to change this
222			would be to change the default port.
223ESMTP_MAILER_ARGS	[IPC $h] The arguments passed to the esmtp mailer.
224SMTP8_MAILER_ARGS	[IPC $h] The arguments passed to the smtp8 mailer.
225RELAY_MAILER_ARGS	[IPC $h] The arguments passed to the relay mailer.
226SMTP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
227			that ARRIVE from an address that resolves to one of
228			the SMTP mailers and which are converted to MIME will
229			be labelled with this character set.
230UUCP_MAILER_FLAGS	[undefined] Flags added to UUCP mailer.  Default
231			flags are `DFMhuU' (and `m' for uucp-new mailer,
232			minus `U' for uucp-dom mailer).
233UUCP_MAILER_ARGS	[uux - -r -z -a$g -gC $h!rmail ($u)] The arguments
234			passed to the UUCP mailer.
235UUCP_MAILER_MAX		[100000] The maximum size message accepted for
236			transmission by the UUCP mailers.
237UUCP_MAILER_CHARSET	[undefined] If defined, messages containing 8-bit data
238			that ARRIVE from an address that resolves to one of
239			the UUCP mailers and which are converted to MIME will
240			be labelled with this character set.
241FAX_MAILER_PATH		[/usr/local/lib/fax/mailfax] The program used to
242			submit FAX messages.
243FAX_MAILER_MAX		[100000] The maximum size message accepted for
244			transmission by FAX.
245POP_MAILER_PATH		[/usr/lib/mh/spop] The pathname of the POP mailer.
246POP_MAILER_FLAGS	[Penu] Flags added to POP mailer.  Flags "lsDFM"
247			are always added.
248POP_MAILER_ARGS		[pop $u] The arguments passed to the POP mailer.
249PROCMAIL_MAILER_FLAGS	[Shu] Flags added to Procmail mailer.  Flags
250			``DFMmn'' are always set.
251PROCMAIL_MAILER_ARGS	[procmail -m $h $f $u] The arguments passed to
252			the Procmail mailer.
253PROCMAIL_MAILER_MAX	[undefined] If set, the maximum size message that
254			will be accepted by the procmail mailer.
255MAIL11_MAILER_PATH	[/usr/etc/mail11] The path to the mail11 mailer.
256MAIL11_MAILER_FLAGS	[nsFx] Flags for the mail11 mailer.
257MAIL11_MAILER_ARGS	[mail11 $g $x $h $u] Arguments passed to the mail11
258			mailer.
259
260+---------+
261| DOMAINS |
262+---------+
263
264You will probably want to collect domain-dependent defines into one
265file, referenced by the DOMAIN macro.  For example, our Berkeley
266domain file includes definitions for several internal distinguished
267hosts:
268
269UUCP_RELAY	The host that will accept UUCP-addressed email.
270		If not defined, all UUCP sites must be directly
271		connected.
272BITNET_RELAY	The host that will accept BITNET-addressed email.
273		If not defined, the .BITNET pseudo-domain won't work.
274DECNET_RELAY	The host that will accept DECNET-addressed email.
275		If not defined, the .DECNET pseudo-domain and addresses
276		of the form node::user will not work.
277FAX_RELAY	The host that will accept mail to the .FAX pseudo-domain.
278		The "fax" mailer overrides this value.
279LOCAL_RELAY	DEPRECATED.  The site that will handle unqualified
280		names -- that is, names with out an @domain extension.
281		If not set, they are assumed to belong on this machine.
282		This allows you to have a central site to store a
283		company- or department-wide alias database.  This
284		only works at small sites, and only with some user
285		agents.
286LUSER_RELAY	The site that will handle lusers -- that is, apparently
287		local names that aren't local accounts or aliases.
288
289Any of these can be either ``mailer:hostname'' (in which case the
290mailer is the internal mailer name, such as ``uucp-new'' and the hostname
291is the name of the host as appropriate for that mailer) or just a
292``hostname'', in which case a default mailer type (usually ``relay'',
293a variant on SMTP) is used.  WARNING: if you have a wildcard MX
294record matching your domain, you probably want to define these to
295have a trailing dot so that you won't get the mail diverted back
296to yourself.
297
298The domain file can also be used to define a domain name, if needed
299(using "DD<domain>") and set certain site-wide features.  If all hosts
300at your site masquerade behind one email name, you could also use
301MASQUERADE_AS here.
302
303You do not have to define a domain -- in particular, if you are a
304single machine sitting off somewhere, it is probably more work than
305it's worth.  This is just a mechanism for combining "domain dependent
306knowledge" into one place.
307
308+---------+
309| MAILERS |
310+---------+
311
312There are fewer mailers supported in this version than the previous
313version, owing mostly to a simpler world.
314
315local		The local and prog mailers.  You will almost always
316		need these; the only exception is if you relay ALL
317		your mail to another site.  This mailer is included
318		automatically.
319
320smtp		The Simple Mail Transport Protocol mailer.  This does
321		not hide hosts behind a gateway or another other
322		such hack; it assumes a world where everyone is
323		running the name server.  This file actually defines
324		four mailers: "smtp" for regular (old-style) SMTP to
325		other servers, "esmtp" for extended SMTP to other
326		servers, "smtp8" to do SMTP to other servers without
327		converting 8-bit data to MIME (essentially, this is
328		your statement that you know the other end is 8-bit
329		clean even if it doesn't say so), and "relay" for
330		transmission to our RELAY_HOST, LUSER_RELAY, or
331		MAILER_HUB.
332
333uucp		The Unix-to-Unix Copy Program mailer.  Actually, this
334		defines two mailers, "uucp-old" (a.k.a. "uucp") and
335		"uucp-new" (a.k.a. "suucp").  The latter is for when you
336		know that the UUCP mailer at the other end can handle
337		multiple recipients in one transfer.  If the smtp mailer
338		is also included in your configuration, two other mailers
339		("uucp-dom" and "uucp-uudom") are also defined [warning:
340		you MUST specify MAILER(smtp) before MAILER(uucp)].  When you
341		include the uucp mailer, sendmail looks for all names in
342		the $=U class and sends them to the uucp-old mailer; all
343		names in the $=Y class are sent to uucp-new; and all
344		names in the $=Z class are sent to uucp-uudom.  Note that
345		this is a function of what version of rmail runs on
346		the receiving end, and hence may be out of your control.
347		See the section below describing UUCP mailers in more
348		detail.
349
350usenet		Usenet (network news) delivery.  If this is specified,
351		an extra rule is added to ruleset 0 that forwards all
352		local email for users named ``group.usenet'' to the
353		``inews'' program.  Note that this works for all groups,
354		and may be considered a security problem.
355
356fax		Facsimile transmission.  This is experimental and based
357		on Sam Leffler's FlexFAX software.  For more information,
358		see below.
359
360pop		Post Office Protocol.
361
362procmail	An interface to procmail (does not come with sendmail).
363		This is designed to be used in mailertables.  For example,
364		a common question is "how do I forward all mail for a given
365		domain to a single person?".  If you have this mailer
366		defined, you could set up a mailertable reading:
367
368			host.com	procmail:/etc/procmailrcs/host.com
369
370		with the file /etc/procmailrcs/host.com reading:
371
372			:0	# forward mail for host.com
373			! -oi -f $1 person@other.host
374
375		This would arrange for (anything)@host.com to be sent
376		to person@other.host.  Within the procmail script, $1 is
377		the name of the sender and $2 is the name of the recipient.
378		If you use this with FEATURE(local_procmail), the FEATURE
379		should be listed first.
380
381mail11		The DECnet mail11 mailer, useful only if you have the mail11
382		program from gatekeeper.dec.com:/pub/DEC/gwtools (and
383		DECnet, of course).
384
385The local mailer accepts addresses of the form "user+detail", where
386the "+detail" is not used for mailbox matching but is available
387to certain local mail programs (in particular, see FEATURE(local_procmail)).
388For example, "eric", "eric+sendmail", and "eric+sww" all indicate
389the same user, but additional arguments <null>, "sendmail", and "sww"
390may be provided for use in sorting mail.
391
392
393+----------+
394| FEATURES |
395+----------+
396
397Special features can be requested using the "FEATURE" macro.  For
398example, the .mc line:
399
400	FEATURE(use_cw_file)
401
402tells sendmail that you want to have it read an /etc/sendmail.cw
403file to get values for class $=w.  The FEATURE may contain a single
404optional parameter -- for example:
405
406	FEATURE(mailertable, dbm /usr/lib/mailertable)
407
408Available features are:
409
410use_cw_file	Read the file /etc/sendmail.cw file to get alternate
411		names for this host.  This might be used if you were
412		on a host that MXed for a dynamic set of other
413		hosts.  If the set is static, just including the line
414		"Cw<name1> <name2> ..." is probably superior.
415		The actual filename can be overridden by redefining
416		confCW_FILE.
417
418redirect	Reject all mail addressed to "address.REDIRECT" with
419		a ``551 User not local; please try <address>'' message.
420		If this is set, you can alias people who have left
421		to their new address with ".REDIRECT" appended.
422
423nouucp		Don't do anything special with UUCP addresses at all.
424
425nocanonify	Don't pass addresses to $[ ... $] for canonification.
426		This would generally only be used by sites that only
427		act as mail gateways or which have user agents that do
428		full canonification themselves.  You may also want to
429		use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to
430		turn off the usual resolver options that do a similar
431		thing.
432
433stickyhost	If set, email sent to "user@local.host" are marked
434		as "sticky" -- that is, the local addresses aren't
435		matched against UDB and don't go through ruleset 5.
436		This is used if you want a set up where "user" is
437		not necessarily the same as "user@local.host", e.g.,
438		to make a distinct domain-wide namespace.  Prior to
439		8.7 this was the default, and notsticky was used to
440		turn this off.
441
442mailertable	Include a "mailer table" which can be used to override
443		routing for particular domains.  The argument of the
444		FEATURE may be the key definition.  If none is specified,
445		the definition used is:
446			hash -o /etc/mailertable
447		Keys in this database are fully qualified domain names
448		or partial domains preceded by a dot -- for example,
449		"vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU".
450		Values must be of the form:
451			mailer:domain
452		where "mailer" is the internal mailer name, and "domain"
453		is where to send the message.  These maps are not
454		reflected into the message header.
455
456domaintable	Include a "domain table" which can be used to provide
457		domain name mapping.  Use of this should really be
458		limited to your own domains.  It may be useful if you
459		change names (e.g., your company changes names from
460		oldname.com to newname.com).  The argument of the
461		FEATURE may be the key definition.  If none is specified,
462		the definition used is:
463			hash -o /etc/domaintable
464		The key in this table is the domain name; the value is
465		the new (fully qualified) domain.  Anything in the
466		domaintable is reflected into headers; that is, this
467		is done in ruleset 3.
468
469bitdomain	Look up bitnet hosts in a table to try to turn them into
470		internet addresses.  The table can be built using the
471		bitdomain program contributed by John Gardiner Myers.
472		The argument of the FEATURE may be the key definition; if
473		none is specified, the definition used is:
474			hash -o /etc/bitdomain.db
475		Keys are the bitnet hostname; values are the corresponding
476		internet hostname.
477
478uucpdomain	Similar feature for UUCP hosts.  The default map definition
479		is:
480			hash -o /etc/uudomain.db
481		At the moment there is no automagic tool to build this
482		database.
483
484always_add_domain
485		Include the local host domain even on locally delivered
486		mail.  Normally it is not added unless it is already
487		present.
488
489allmasquerade	If masquerading is enabled (using MASQUERADE_AS), this
490		feature will cause recipient addresses to also masquerade
491		as being from the masquerade host.  Normally they get
492		the local hostname.  Although this may be right for
493		ordinary users, it can break local aliases.  For example,
494		if you send to "localalias", the originating sendmail will
495		find that alias and send to all members, but send the
496		message with "To: localalias@masqueradehost".  Since that
497		alias likely does not exist, replies will fail.  Use this
498		feature ONLY if you can guarantee that the ENTIRE
499		namespace on your masquerade host supersets all the
500		local entries.
501
502nodns		We aren't running DNS at our site (for example,
503		we are UUCP-only connected).  It's hard to consider
504		this a "feature", but hey, it had to go somewhere.
505
506nullclient	This is a special case -- it creates a stripped down
507		configuration file containing nothing but support for
508		forwarding all mail to a central hub via a local
509		SMTP-based network.  The argument is the name of that
510		hub.
511
512		The only other feature that should be used in conjunction
513		with this one is "nocanonify" (this causes addresses to
514		be sent unqualified via the SMTP connection; normally
515		they are qualifed with the masquerade name, which
516		defaults to the name of the hub machine).  No mailers
517		should be defined.  No aliasing or forwarding is done.
518
519local_procmail	Use procmail as the local mailer.  This mailer can
520		make use of the "user+indicator@local.host" syntax;
521		normally the +indicator is just tossed, but by default
522		it is passed as the -a argument to procmail.  The
523		argument to this feature is the pathname of procmail,
524		which defaults to /usr/local/bin/procmail.
525
526bestmx_is_local	Accept mail as though locally addressed for any host that
527		lists us as the best possible MX record.  This generates
528		additional DNS traffic, but should be OK for low to
529		medium traffic hosts.
530
531smrsh		Use the SendMail Restricted SHell (smrsh) provided
532		with the distribution instead of /bin/sh for mailing
533		to programs.  This improves the ability of the local
534		system administrator to control what gets run via
535		e-mail.  If an argument is provided it is used as the
536		pathname to smrsh; otherwise, /usr/local/etc/smrsh is
537		assumed.
538
539
540+-------+
541| HACKS |
542+-------+
543
544Some things just can't be called features.  To make this clear,
545they go in the hack subdirectory and are referenced using the HACK
546macro.  These will tend to be site-dependent.  The release
547includes the Berkeley-dependent "cssubdomain" hack (that makes
548sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU;
549this is intended as a short-term aid while we move hosts into
550subdomains.
551
552
553+--------------------+
554| SITE CONFIGURATION |
555+--------------------+
556
557    *****************************************************
558    * This section is really obsolete, and is preserved	*
559    * only for back compatibility.  You should plan on	*
560    * using mailertables for new installations.	  In	*
561    * particular, it doesn't work for the newer forms	*
562    * of UUCP mailers, such as uucp-uudom.		*
563    *****************************************************
564
565Complex sites will need more local configuration information, such as
566lists of UUCP hosts they speak with directly.  This can get a bit more
567tricky.  For an example of a "complex" site, see cf/ucbvax.mc.
568
569If your host is known by several different names, you need to augment
570the $=w class.  This is a list of names by which you are known, and
571anything sent to an address using a host name in this list will be
572treated as local mail.  You can do this in two ways: either create
573the file /etc/sendmail.cw containing a list of your aliases (one per
574line), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the
575line:
576
577	Cw alias.host.name
578
579at the end of that file.  See the ``vangogh.mc'' file for an example.
580Be sure you use the fully-qualified name of the host, rather than a
581short name.
582
583The SITECONFIG macro allows you to indirectly reference site-dependent
584configuration information stored in the siteconfig subdirectory.  For
585example, the line
586
587	SITECONFIG(uucp.ucbvax, ucbvax, U)
588
589reads the file uucp.ucbvax for local connection information.  The
590second parameter is the local name (in this case just "ucbvax" since
591it is locally connected, and hence a UUCP hostname).  The third
592parameter is the name of both a macro to store the local name (in
593this case, $U) and the name of the class (e.g., $=U) in which to store
594the host information read from the file.  Another SITECONFIG line reads
595
596	SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W)
597
598This says that the file uucp.ucbarpa contains the list of UUCP sites
599connected to ucbarpa.Berkeley.EDU.  The $=W class will be used to
600store this list, and $W is defined to be ucbarpa.Berkeley.EDU, that
601is, the name of the relay to which the hosts listed in uucp.ucbarpa
602are connected.  [The machine ucbarpa is gone now, but I've left
603this out-of-date configuration file around to demonstrate how you
604might do this.]
605
606Note that the case of SITECONFIG with a third parameter of ``U'' is
607special; the second parameter is assumed to be the UUCP name of the
608local site, rather than the name of a remote site, and the UUCP name
609is entered into $=w (the list of local hostnames) as $U.UUCP.
610
611The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing
612more than a sequence of SITE macros describing connectivity.  For
613example:
614
615	SITE(cnmat)
616	SITE(sgi olympus)
617
618The second example demonstrates that you can use two names on the
619same line; these are usually aliases for the same host (or are at
620least in the same company).
621
622
623+--------------------+
624| USING UUCP MAILERS |
625+--------------------+
626
627It's hard to get UUCP mailers right because of the extremely ad hoc
628nature of UUCP addressing.  These config files are really designed
629for domain-based addressing, even for UUCP sites.
630
631There are four UUCP mailers available.  The choice of which one to
632use is partly a matter of local preferences and what is running at
633the other end of your UUCP connection.  Unlike good protocols that
634define what will go over the wire, UUCP uses the policy that you
635should do what is right for the other end; if they change, you have
636to change.  This makes it hard to do the right thing, and discourages
637people from updating their software.  In general, if you can avoid
638UUCP, please do.
639
640The major choice is whether to go for a domainized scheme or a
641non-domainized scheme.  This depends entirely on what the other
642end will recognize.  If at all possible, you should encourage the
643other end to go to a domain-based system -- non-domainized addresses
644don't work entirely properly.
645
646The four mailers are:
647
648    uucp-old (obsolete name: "uucp")
649	This is the oldest, the worst (but the closest to UUCP) way of
650	sending messages accros UUCP connections.  It does bangify
651	everything and prepends $U (your UUCP name) to the sender's
652	address (which can already be a bang path itself).  It can
653	only send to one address at a time, so it spends a lot of
654	time copying duplicates of messages.  Avoid this if at all
655	possible.
656
657    uucp-new (obsolete name: "suucp")
658	The same as above, except that it assumes that in one rmail
659	command you can specify several recipients.  It still has a
660	lot of other problems.
661
662    uucp-dom
663	This UUCP mailer keeps everything as domain addresses.
664	Basically, it uses the SMTP mailer rewriting rules.  This mailer
665	is only included if MAILER(smtp) is also specified.
666
667	Unfortunately, a lot of UUCP mailer transport agents require
668	bangified addresses in the envelope, although you can use
669	domain-based addresses in the message header.  (The envelope
670	shows up as the From_ line on UNIX mail.)  So....
671
672    uucp-uudom
673	This is a cross between uucp-new (for the envelope addresses)
674	and uucp-dom (for the header addresses).  It bangifies the
675	envelope sender (From_ line in messages) without adding the
676	local hostname, unless there is no host name on the address
677	at all (e.g., "wolf") or the host component is a UUCP host name
678	instead of a domain name ("somehost!wolf" instead of
679	"some.dom.ain!wolf").  This is also included only if MAILER(smtp)
680	is also specified.
681
682Examples:
683
684We are on host grasp.insa-lyon.fr (UUCP host name "grasp").  The
685following summarizes the sender rewriting for various mailers.
686
687Mailer          sender		rewriting in the envelope
688------		------		-------------------------
689uucp-{old,new}	wolf		grasp!wolf
690uucp-dom	wolf		wolf@grasp.insa-lyon.fr
691uucp-uudom	wolf		grasp.insa-lyon.fr!wolf
692
693uucp-{old,new}	wolf@fr.net	grasp!fr.net!wolf
694uucp-dom	wolf@fr.net	wolf@fr.net
695uucp-uudom	wolf@fr.net	fr.net!wolf
696
697uucp-{old,new}	somehost!wolf	grasp!somehost!wolf
698uucp-dom	somehost!wolf	somehost!wolf@grasp.insa-lyon.fr
699uucp-uudom	somehost!wolf	grasp.insa-lyon.fr!somehost!wolf
700
701If you are using one of the domainized UUCP mailers, you really want
702to convert all UUCP addresses to domain format -- otherwise, it will
703do it for you (and probably not the way you expected).  For example,
704if you have the address foo!bar!baz (and you are not sending to foo),
705the heuristics will add the @uucp.relay.name or @local.host.name to
706this address.  However, if you map foo to foo.host.name first, it
707will not add the local hostname.  You can do this using the uucpdomain
708feature.
709
710
711+-------------------+
712| TWEAKING RULESETS |
713+-------------------+
714
715For more complex configurations, you can define special rules.
716The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
717the names.  Any modifications made here are reflected in the header.
718
719A common use is to convert old UUCP addreses to SMTP addresses using
720the UUCPSMTP macro.  For example:
721
722	LOCAL_RULE_3
723	UUCPSMTP(decvax,	decvax.dec.com)
724	UUCPSMTP(research,	research.att.com)
725
726will cause addresses of the form "decvax!user" and "research!user"
727to be converted to "user@decvax.dec.com" and "user@research.att.com"
728respectively.
729
730This could also be used to look up hosts in a database map:
731
732	LOCAL_RULE_3
733	R$* < @ $+ > $*		$: $1 < @ $(hostmap $2 $) > $3
734
735This map would be defined in the LOCAL_CONFIG portion, as shown below.
736
737Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
738For example, new rules are needed to parse hostnames that you accept
739via MX records.  For example, you might have:
740
741	LOCAL_RULE_0
742	R$+ <@ host.dom.ain.>	$#uucp $@ cnmat $: $1 < @ host.dom.ain.>
743
744You would use this if you had installed an MX record for cnmat.Berkeley.EDU
745pointing at this host; this rule catches the message and forwards it on
746using UUCP.
747
748You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2.
749These rulesets are normally empty.
750
751A similar macro is LOCAL_CONFIG.  This introduces lines added after the
752boilerplate option setting but before rulesets, and can be used to
753declare local database maps or whatever.  For example:
754
755	LOCAL_CONFIG
756	Khostmap hash /etc/hostmap.db
757	Kyplocal nis -m hosts.byname
758
759
760+---------------------------+
761| MASQUERADING AND RELAYING |
762+---------------------------+
763
764You can have your host masquerade as another using
765
766	MASQUERADE_AS(host.domain)
767
768This causes outgoing SMTP mail to be labeled as coming from the
769indicated domain, rather than $j.  One normally masquerades as one
770of one's own subdomains (for example, it's unlikely that I would
771choose to masquerade as an MIT site).
772
773The masquerade name is not normally canonified, so it is important
774that it be your One True Name, that is, fully qualified and not a
775CNAME.
776
777there are always users that need to be "exposed" -- that is, their
778internal site name should be displayed instead of the masquerade name.
779Root is an example.  You can add users to this list using
780
781	EXPOSED_USER(usernames)
782
783This adds users to class E; you could also use something like
784
785	FE/etc/sendmail.cE
786
787You can also arrange to relay all unqualified names (that is, names
788without @host) to a relay host.  For example, if you have a central
789email server, you might relay to that host so that users don't have
790to have .forward files or aliases.  You can do this using
791
792	define(`LOCAL_RELAY', mailer:hostname)
793
794The ``mailer:'' can be omitted, in which case the mailer defaults to
795"smtp".  There are some user names that you don't want relayed, perhaps
796because of local aliases.  A common example is root, which may be
797locally aliased.  You can add entries to this list using
798
799	LOCAL_USER(usernames)
800
801This adds users to class L; you could also use something like
802
803	FL/etc/sendmail.cL
804
805If you want all incoming mail sent to a centralized hub, as for a
806shared /var/spool/mail scheme, use
807
808	define(`MAIL_HUB', mailer:hostname)
809
810Again, ``mailer:'' defaults to "smtp".  If you define both LOCAL_RELAY
811and MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will
812be sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB.
813Names in $=L will be delivered locally, so you MUST have aliases or
814.forward files for them.
815
816For example, if are on machine mastodon.CS.Berkeley.EDU and you have
817FEATURE(stickyhost), the following combinations of settings will have the
818indicated effects:
819
820email sent to....	eric			  eric@mastodon.CS.Berkeley.EDU
821
822LOCAL_RELAY set to	mail.CS.Berkeley.EDU	  (delivered locally)
823mail.CS.Berkeley.EDU	  (no local aliasing)	    (aliasing done)
824
825MAIL_HUB set to		mammoth.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
826mammoth.CS.Berkeley.EDU	  (aliasing done)	    (aliasing done)
827
828Both LOCAL_RELAY and	mail.CS.Berkeley.EDU	  mammoth.CS.Berkeley.EDU
829MAIL_HUB set as above	  (no local aliasing)	    (aliasing done)
830
831If you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and
832MAIL_HUB act identically, with MAIL_HUB taking precedence.
833
834If you want all outgoing mail to go to a central relay site, define
835SMART_HOST as well.  Briefly:
836
837	LOCAL_RELAY applies to unqualifed names (e.g., "eric").
838	MAIL_HUB applies to names qualified with the name of the
839		local host (e.g., "eric@mastodon.CS.Berkeley.EDU").
840	SMART_HOST applies to names qualified with other hosts.
841
842However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY,
843DECNET_RELAY, and FAX_RELAY) take precedence over SMART_HOST, so if you
844really want absolutely everything to go to a single central site you will
845need to unset all the other relays -- or better yet, find or build a
846minimal config file that does this.
847
848
849+-------------------------------+
850| NON-SMTP BASED CONFIGURATIONS |
851+-------------------------------+
852
853These configuration files are designed primarily for use by SMTP-based
854sites.  I don't pretend that they are well tuned for UUCP-only or
855UUCP-primarily nodes (the latter is defined as a small local net
856connected to the rest of the world via UUCP).  However, there is one
857hook to handle some special cases.
858
859You can define a ``smart host'' that understands a richer address syntax
860using:
861
862	define(`SMART_HOST', mailer:hostname)
863
864In this case, the ``mailer:'' defaults to "relay".  Any messages that
865can't be handled using the usual UUCP rules are passed to this host.
866
867If you are on a local SMTP-based net that connects to the outside
868world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules.
869For example:
870
871	define(`SMART_HOST', suucp:uunet)
872	LOCAL_NET_CONFIG
873	R$* < @ $* .$m. > $*	$#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3
874
875This will cause all names that end in your domain name ($m) via
876SMTP; anything else will be sent via suucp (smart UUCP) to uunet.
877If you have FEATURE(nocanonify), you may need to omit the dots after
878the $m.  If you are running a local DNS inside your domain which is
879not otherwise connected to the outside world, you probably want to
880use:
881
882	define(`SMART_HOST', smtp:fire.wall.com)
883	LOCAL_NET_CONFIG
884	R$* < @ $* . > $*	$#smtp $@ $2. $: $1 < @ $2. > $3
885
886That is, send directly only to things you found in your DNS lookup;
887anything else goes through SMART_HOST.
888
889If you are not running DNS at all, it is important to use
890FEATURE(nodns) to avoid having sendmail queue everything waiting
891for the name server to come up.
892
893
894+-----------+
895| WHO AM I? |
896+-----------+
897
898Normally, the $j macro is automatically defined to be your fully
899qualified domain name (FQDN).  Sendmail does this by getting your
900host name using gethostname and then calling gethostbyname on the
901result.  For example, in some environments gethostname returns
902only the root of the host name (such as "foo"); gethostbyname is
903supposed to return the FQDN ("foo.bar.com").  In some (fairly rare)
904cases, gethostbyname may fail to return the FQDN.  In this case
905you MUST define confDOMAIN_NAME to be your fully qualified domain
906name.  This is usually done using:
907
908	Dmbar.com
909	define(`confDOMAIN_NAME', `$w.$m')dnl
910
911
912+--------------------+
913| USING MAILERTABLES |
914+--------------------+
915
916To use FEATURE(mailertable), you will have to create an external
917database containing the routing information for various domains.
918For example, a mailertable file in text format might be:
919
920	.my.domain		xnet:%1.my.domain
921	uuhost1.my.domain	suucp:uuhost1
922	.bitnet			smtp:relay.bit.net
923
924This should normally be stored in /etc/mailertable.  The actual
925database version of the mailertable is built using:
926
927	makemap hash /etc/mailertable.db < /etc/mailertable
928
929The semantics are simple.  Any LHS entry that does not begin with
930a dot matches the full host name indicated.  LHS entries beginning
931with a dot match anything ending with that domain name -- that is,
932they can be thought of as having a leading "*" wildcard.  Matching
933is done in order of most-to-least qualified -- for example, even
934though ".my.domain" is listed first in the above example, an entry
935of "uuhost1.my.domain" will match the second entry since it is
936more explicit.
937
938The RHS should always be a "mailer:host" pair.  The mailer is the
939configuration name of a mailer (that is, an `M' line in the
940sendmail.cf file).  The "host" will be the hostname passed to
941that mailer.  In domain-based matches (that is, those with leading
942dots) the "%1" may be used to interpolate the wildcarded part of
943the host name.  For example, the first line above sends everything
944addressed to "anything.my.domain" to that same host name, but using
945the (presumably experimental) xnet mailer.
946
947In some cases you may want to temporarily turn off MX records,
948particularly on gateways.  For example, you may want to MX
949everything in a domain to one machine that then forwards it
950directly.  To do this, you might use the DNS configuration:
951
952	*.domain.	IN	MX	0	relay.machine
953
954and on relay.machine use the mailertable:
955
956	.domain		smtp:[gateway.domain]
957
958The [square brackets] turn off MX records for this host only.
959If you didn't do this, the mailertable would use the MX record
960again, which would give you an MX loop.
961
962
963+--------------------------------+
964| USING USERDB TO MAP FULL NAMES |
965+--------------------------------+
966
967The user database was not originally intended for mapping full names
968to login names (e.g., Eric.Allman => eric), but some people are using
969it that way.  (I would recommend that you set up aliases for this
970purpose instead -- since you can specify multiple alias files, this
971is fairly easy.)  The intent was to locate the default maildrop at
972a site, but allow you to override this by sending to a specific host.
973
974If you decide to set up the user database in this fashion, it is
975imperative that you not use FEATURE(stickyhost) -- otherwise,
976e-mail sent to Full.Name@local.host.name will be rejected.
977
978To build the internal form of the user database, use:
979
980	makemap btree /usr/data/base.db < /usr/data/base.txt
981
982As a general rule, I am adamantly opposed to using full names as
983e-mail addresses, since they are not in any sense unique.  For example,
984the Unix software-development community has two Andy Tannenbaums,
985at least two well-known Peter Deutsches, and at one time Bell Labs
986had two Stephen R. Bournes with offices along the same hallway.
987Which one will be forced to suffer the indignity of being
988Stephen_R_Bourne_2?  The less famous of the two, or the one that
989was hired later?
990
991Finger should handle full names (and be fuzzy).  Mail should use
992handles, and not be fuzzy.  [Not that I expect anyone to pay any
993attention to my opinions.]
994
995
996+--------------------------------+
997| MISCELLANEOUS SPECIAL FEATURES |
998+--------------------------------+
999
1000Plussed users
1001	Sometimes it is convenient to merge configuration on a
1002	centralized mail machine, for example, to forward all
1003	root mail to a mail server.  In this case it might be
1004	useful to be able to treat the root addresses as a class
1005	of addresses with subtle differences.  You can do this
1006	using plussed users.  For example, a client might include
1007	the alias:
1008
1009		root:  root+client1@server
1010
1011	On the server, this will match an alias for "root+client1".
1012	If that is not found, the alias "root+*" will be tried,
1013	then "root".
1014
1015
1016+----------------+
1017| SECURITY NOTES |
1018+----------------+
1019
1020A lot of sendmail security comes down to you.  Sendmail 8 is much
1021more careful about checking for security problems than previous
1022versions, but there are some things that you still need to watch
1023for.  In particular:
1024
1025* Make sure the aliases file isn't writable except by trusted
1026  system personnel.  This includes both the text and database
1027  version.
1028
1029* Make sure that other files that sendmail reads, such as the
1030  mailertable, is only writable by trusted system personnel.
1031
1032* The queue directory should not be world writable PARTICULARLY
1033  if your system allows "file giveaways" (that is, if a non-root
1034  user can chown any file they own to any other user).
1035
1036* If your system allows file giveaways, DO NOT create a publically
1037  writable directory for forward files.  This will allow anyone
1038  to steal anyone else's e-mail.  Instead, create a script that
1039  copies the .forward file from users' home directories once a
1040  night (if you want the non-NFS-mounted forward directory).
1041
1042* If your system allows file giveaways, you'll find that
1043  sendmail is much less trusting of :include: files -- in
1044  particular, you'll have to have /SENDMAIL/ANY/SHELL/ in
1045  /etc/shells before they will be trusted (that is, before
1046  files and programs listed in them will be honored).
1047
1048In general, file giveaways are a mistake -- if you can turn them
1049off I recommend you do so.
1050
1051
1052+------------------+
1053| FlexFAX SOFTWARE |
1054+------------------+
1055
1056Sam Leffler's FlexFAX software is still in beta test -- but he expects a
1057public version out "later this week" [as of 3/1/93].  The following
1058blurb is direct from Sam:
1059
1060	$Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $
1061
1062	How To Obtain This Software (in case all you get is this file)
1063	--------------------------------------------------------------
1064	The source code is available for public ftp on
1065	    sgi.com			sgi/fax/v2.1.src.tar.Z
1066		(192.48.153.1)
1067
1068	You can also obtain inst'able images for Silicon Graphics machines from
1069	    sgi.com			sgi/fax/v2.1.inst.tar
1070		(192.48.153.1)
1071
1072	For example,
1073	    % ftp -n sgi.com
1074	    ....
1075	    ftp> user anonymous
1076	    ... <type in password>
1077	    ftp> cd sgi/fax
1078	    ftp> binary
1079	    ftp> get v2.1.src.tar.Z
1080
1081	In general, the latest version of the 2.1 release of the software is
1082	always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp
1083	directory.  This file is a link to the appropriate released version (so
1084	don't waste your time retrieving the linked file as well!) Any files of
1085	the form v2.1.*.patch are shell scripts that can be used to patch older
1086	versions of the source code.  For example, the file v2.1.0.patch would
1087	contain patches to update v2.1.0.tar.Z.  (Note to beta testers: this is
1088	different than the naming conventions used during beta testing.) Patch
1089	files only work to go between consecutive versions, so if you are
1090	multiple versions behind the latest release, you will need to apply
1091	each patch file between your current version and the latest.
1092
1093
1094	Obtaining the Software by Electronic Mail
1095	-----------------------------------------
1096	Do not send me requests for the software; they will be ignored (without
1097	response).  If you cannot use FTP at all, there is a service called
1098	"ftpmail" available from gatekeeper.dec.com:  you can send e-mail to
1099	this machine and it will use FTP to retrieve files for you and send you
1100	the files back again via e-mail.  To find out more about the ftpmail
1101	service, send a message to "ftpmail@gatekeeper.dec.com" whose body
1102	consists of the single line "help".
1103
1104
1105	Obtaining the Software Within Silicon Graphics
1106	----------------------------------------------
1107	Internal to Silicon Graphics there are inst'able images on the host
1108	flake.asd in the directory /usr/dist.  Thus you can do something like:
1109
1110	    % inst -f flake.asd.sgi.com:/usr/dist/flexfax
1111
1112	to install the latest version of the software on your machine.
1113
1114
1115	What to do Once You've Retrieved Stuff
1116	--------------------------------------
1117	The external distributions come in a compressed or uncompressed tar
1118	file.  To extract the source distribution:
1119
1120	    % zcat v2.1.src.tar.Z | tar xf -
1121
1122	(uncompress and extract individual files in current directory).  To
1123	unpack and install the client portion of the inst'able distribution:
1124
1125	    % mkdir dist
1126	    % cd dist; tar xf ../v2.1.inst.tar; cd ..
1127	    % inst -f dist/flexfax
1128	    ...
1129	    inst> go
1130
1131	(Note, the dist subdirectory is because some versions of inst fail if
1132	the files are in the current directory.) Server binaries are also
1133	included in the inst'able images as flexfax.server.*.  They are not
1134	installed by default, so to get them also you need to do:
1135
1136	    % inst -f flexfax
1137	    ...
1138	    inst> install flexfax.server.*
1139	    inst> go
1140
1141	The SGI binaries were built for Version 4.0.5H of the IRIX operating
1142	system.  They should work w/o problem on earlier versions of the
1143	system, but I have not fully tested this.  Also, note that to install a
1144	server on an SGI machine, you need to have installed the Display
1145	PostScript execution environment product (dps_eoe).  Otherwise, the fax
1146	server will not be able to convert PostScript to facsimile for
1147	transmission.
1148
1149	If you are working from the source distribution, look at the file
1150	README in the top of the source tree.  If you are working from the inst
1151	images, the subsystem flexfax.man.readme contains the README file and
1152	other useful pieces of information--the installed files are placed in
1153	the directory /usr/local/doc/flexfax).  Basically you will need to run
1154	the faxaddmodem script to setup and configure your fax modem.  Consult
1155	the README file and the manual page for faxaddmodem for information.
1156
1157
1158	FlexFAX Mail List
1159	-----------------
1160	A mailing list for users of this software is located on sgi.com.
1161	If you want to join this mailing list or have a list-related request
1162	such as getting your name removed from it, send a request to
1163
1164	    majordomo@whizzer.wpd.sgi.com
1165
1166	For example, to subscribe, send the line "subscribe flexfax" in
1167	the body of your message.  The line "help" will return a list of
1168	the commands understood by the mailing list management software.
1169
1170	Submissions (including bug reports) should be directed to:
1171
1172	    flexfax@sgi.com
1173
1174	When corresponding about this software please always specify what
1175	version you have, what system you're running on, and, if the problem is
1176	specific to your modem, identify the modem and firmware revision.
1177
1178
1179+--------------------------------+
1180| TWEAKING CONFIGURATION OPTIONS |
1181+--------------------------------+
1182
1183There are a large number of configuration options that don't normally
1184need to be changed.  However, if you feel you need to tweak them, you
1185can define the following M4 variables.  This list is shown in four
1186columns:  the name you define, the default value for that definition,
1187the option or macro that is affected (either Ox for an option or Dx
1188for a macro), and a brief description.  Greater detail of the semantics
1189can be found in the Installation and Operations Guide.
1190
1191Some options are likely to be deprecated in future versions -- that is,
1192the option is only included to provide back-compatibility.  These are
1193marked with "*".
1194
1195Remember that these options are M4 variables, and hence may need to
1196be quoted.  In particular, arguments with commas will usually have to
1197be ``double quoted, like this phrase'' to avoid having the comma
1198confuse things.  This is common for alias file definitions and for
1199the read timeout.
1200
1201M4 Variable Name	Configuration	Description & [Default]
1202================	=============	=======================
1203confMAILER_NAME		$n macro	[MAILER-DAEMON] The sender name used
1204					for internally generated outgoing
1205					messages.
1206confFROM_LINE		$l macro	[From $g  $d] The From_ line used
1207					when sending to files or programs.
1208confFROM_HEADER		$q macro	[$?x$x <$g>$|$g$.] The format of an
1209					internally generated From: address.
1210confOPERATORS		$o macro	[.:%@!^/[]+] Address operator
1211					characters.
1212confSMTP_LOGIN_MSG	$e macro	[$j Sendmail $v/$Z; $b]
1213					The initial (spontaneous) SMTP
1214					greeting message.  The word "ESMTP"
1215					will be inserted between the first and
1216					second words to convince other
1217					sendmails to try to speak ESMTP.
1218confDOMAIN_NAME		$j macro	If defined, sets $j.  This should
1219					only be done if your system cannot
1220					determine your local domain name,
1221					and then it should be set to
1222					$w.Foo.COM, where Foo.COM is your
1223					domain name.
1224confRECEIVED_HEADER	Received:
1225      [.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b]
1226					The format of the Received: header
1227					in messages passed through this host.
1228					It is unwise to try to change this.
1229confCW_FILE		Fw class	[/etc/sendmail.cw] Name of file used
1230					to get the local additions to the $=w
1231					class.
1232confSMTP_MAILER		-		[smtp] The mailer name used when
1233					SMTP connectivity is required.
1234					One of "smtp", "smtp8", or "esmtp".
1235confLOCAL_MAILER	-		[local] The mailer name used when
1236					local connectivity is required.
1237					Almost always "local".
1238confRELAY_MAILER	-		[relay] The default mailer name used
1239					for relaying any mail (e.g., to a
1240					BITNET_RELAY, a SMART_HOST, or
1241					whatever).  This can reasonably be
1242					"uucp-new" if you are on a
1243					UUCP-connected site.
1244confSEVEN_BIT_INPUT	SevenBitInput	[False] Force input to seven bits?
1245confEIGHT_BIT_HANDLING	EightBitMode	[pass8] 8-bit data handling
1246confALIAS_WAIT		AliasWait	[10m] Time to wait for alias file
1247					rebuild until you get bored and
1248					decide that the apparently pending
1249					rebuild failed.
1250confMIN_FREE_BLOCKS	MinFreeBlocks	[100] Minimum number of free blocks on
1251					queue filesystem to accept SMTP mail.
1252					(Prior to 8.7 this was minfree/maxsize,
1253					where minfree was the number of free
1254					blocks and maxsize was the maximum
1255					message size.  Use confMAX_MESSAGE_SIZE
1256					for the second value now.)
1257confMAX_MESSAGE_SIZE	MaxMessageSize	The maximum size of messages that will
1258					be accepted (in bytes).
1259confBLANK_SUB		BlankSub	[.] Blank (space) substitution
1260					character.
1261confCON_EXPENSIVE	HoldExpensive	[False] Avoid connecting immediately
1262					to mailers marked expensive?
1263confCHECKPOINT_INTERVAL	CheckpointInterval
1264					Checkpoint queue files every N
1265					recipients.
1266confDELIVERY_MODE	DeliveryMode	[background] Default delivery mode.
1267confAUTO_REBUILD	AutoRebuildAliases
1268					Automatically rebuild alias
1269					file if needed.
1270confERROR_MODE		ErrorMode	Error message mode.
1271confERROR_MESSAGE	ErrorHeader	Error message header/file.
1272confSAVE_FROM_LINES	SafeFromLine	Save extra leading From_ lines.
1273confTEMP_FILE_MODE	TempFileMode	[0600] Temporary file mode.
1274confMATCH_GECOS		MatchGECOS	Match GECOS field.
1275confMAX_HOP		MaxHopCount	Maximum hop count.
1276confIGNORE_DOTS*	IgnoreDots	Ignore dot as terminator for incoming
1277					messages?
1278confBIND_OPTS		ResolverOptions	Default options for DNS resolver.
1279confMIME_FORMAT_ERRORS*	SendMimeErrors	[True] Send error messages as MIME-
1280					encapsulated messages per RFC 1344.
1281confFORWARD_PATH	ForwardPath	[$z/.forward.$w:$z/.forward]
1282					The colon-separated list of places to
1283					search for .forward files.  N.B.: see
1284					the Security Notes section.
1285confMCI_CACHE_SIZE	ConnectionCacheSize
1286					[2] Size of open connection cache.
1287confMCI_CACHE_TIMEOUT	ConnectionCacheTimeout
1288					[5m] Open connection cache timeout.
1289confUSE_ERRORS_TO*	UserErrorsTo	[False] Use the Errors-To: header to deliver
1290					error messages.  This should not be
1291					necessary because of general acceptance
1292					of the envelope/header distinction.
1293confLOG_LEVEL		LogLevel	[9] Log level.
1294confME_TOO		MeToo		Include sender in group expansions.
1295confCHECK_ALIASES	CheckAliases	[False] Check RHS of aliases when
1296					running newaliases.  Since this does
1297					DNS lookups on every address, it can
1298					slow down the alias rebuild process
1299					considerably on large alias files.
1300confOLD_STYLE_HEADERS*	OldStyleHeaders	[True] Assume that headers without
1301					special chars are old style.
1302confDAEMON_OPTIONS	DaemonPortOptions
1303					SMTP daemon options.
1304confPRIVACY_FLAGS	PrivacyOptions	[authwarnings] Privacy flags.
1305confCOPY_ERRORS_TO	PostmasterCopy	Address for additional copies of all
1306					error messages.
1307confQUEUE_FACTOR	QueueFactor	Slope of queue-only function.
1308confDONT_PRUNE_ROUTES	DontPruneRoutes	Don't prune down route-addr syntax
1309					addresses to the minimum possible.
1310confSAFE_QUEUE*		SuperSafe	[True] Commit all messages to disk
1311					before forking.
1312confTIME_ZONE		TimeZoneSpec	[USE_SYSTEM] Time zone info -- can be
1313					USE_SYSTEM to use the system's idea,
1314					USE_TZ to use the user's TZ envariable,
1315					or something else to force that value.
1316confDEF_USER_ID		DefaultUser	[1:1] Default user id.
1317confUSERDB_SPEC		UserDatabaseSpec
1318					User database specification.
1319confFALLBACK_MX		FallbackMXhost	Fallback MX host.
1320confTRY_NULL_MX_LIST	TryNullMXList	If we are the best MX for a host and
1321					haven't made other arrangements, try
1322					connecting to the host directly;
1323					normally this would be a config error.
1324confQUEUE_LA		QueueLA		Load average at which queue-only
1325					function kicks in.
1326confREFUSE_LA		RefuseLA	Load average at which incoming
1327					SMTP connections are refused.
1328confWORK_RECIPIENT_FACTOR
1329			RecipientFactor	Cost of each recipient.
1330confSEPARATE_PROC	ForkEachJob	Run all deliveries in a separate
1331					process.
1332confWORK_CLASS_FACTOR	ClassFactor	Priority multiplier for class.
1333confWORK_TIME_FACTOR	RetryFactor	Cost of each delivery attempt.
1334confQUEUE_SORT_ORDER	QueueSortOrder	Queue sort algorithm: Priority or Host.
1335confMIN_QUEUE_AGE	MinQueueAge	The minimum amount of time a job
1336					must sit in the queue between queue
1337					runs.  This allows you to set the
1338					queue run interval low for better
1339					resposiveness without trying all
1340					jobs in each run.
1341confDEF_CHAR_SET	DefaultCharSet	When converting unlabelled 8 bit
1342					input to MIME, the character set to
1343					use by default.
1344confSERVICE_SWITCH_FILE	ServiceSwitchFile
1345					The file to use for the service switch
1346					on systems that do not have a system-
1347					defined switch.
1348confDIAL_DELAY		DialDelay	If a connection fails, wait this long
1349					and try again.  This is to allow
1350					"dial on demand" connections to have
1351					enough time to complete a connection.
1352confNO_RCPT_ACTION	NoRecipientAction
1353					What to do if there are no legal
1354					recipient fields (To:, Cc: or Bcc:)
1355					in the message.  Legal values can
1356					be "none" to just leave the
1357					nonconforming message as is, "add-to"
1358					to add a To: header with all the
1359					known recipients (which may expose
1360					blind recipients), "add-apparently-to"
1361					to do the same but use Apparently-To:
1362					instead of To:, "add-bcc" to add an
1363					empty Bcc: header, or
1364					"add-to-undisclosed" to add the header
1365					``To: undisclosed-recipients:;''.
1366					Default is "none".
1367confSAFE_FILE_ENV	SafeFileEnvironment
1368					If set, sendmail will do a chroot()
1369					into this directory before writing
1370					files.
1371confCOLON_OK_IN_ADDR	ColonOkInAddr	If set, colons are treated as a regular
1372					character in addresses.  If not set,
1373					they are treated as the introducer to
1374					the RFC 822 "group" syntax.  Colons are
1375					handled properly in route-addrs.  This
1376					option defaults on for V5 and lower
1377					configuration files.
1378
1379
1380+-----------+
1381| HIERARCHY |
1382+-----------+
1383
1384Within this directory are several subdirectories, to wit:
1385
1386m4		General support routines.  These are typically
1387		very important and should not be changed without
1388		very careful consideration.
1389
1390cf		The configuration files themselves.  They have
1391		".mc" suffixes, and must be run through m4 to
1392		become complete.  The resulting output should
1393		have a ".cf" suffix.
1394
1395ostype		Definitions describing a particular operating
1396		system type.  These should always be referenced
1397		using the OSTYPE macro in the .mc file.  Examples
1398		include "bsd4.3", "bsd4.4", "sunos3.5", and
1399		"sunos4.1".
1400
1401domain		Definitions describing a particular domain, referenced
1402		using the DOMAIN macro in the .mc file.  These are
1403		site dependent; for example, "CS.Berkeley.EDU.m4"
1404		describes hosts in the CS.Berkeley.EDU subdomain.
1405
1406mailer		Descriptions of mailers.   These are referenced using
1407		the MAILER macro in the .mc file.
1408
1409sh		Shell files used when building the .cf file from the
1410		.mc file in the cf subdirectory.
1411
1412feature		These hold special orthogonal features that you might
1413		want to include.  They should be referenced using
1414		the FEATURE macro.
1415
1416hack		Local hacks.  These can be referenced using the HACK
1417		macro.  They shouldn't be of more than voyeuristic
1418		interest outside the .Berkeley.EDU domain, but who knows?
1419		We've all got our own peccadillos.
1420
1421siteconfig	Site configuration -- e.g., tables of locally connected
1422		UUCP sites.
1423
1424
1425+------------------------+
1426| ADMINISTRATIVE DETAILS |
1427+------------------------+
1428
1429The following sections detail usage of certain internal parts of the
1430sendmail.cf file.  Read them carefully if you are trying to modify
1431the current model.  If you find the above descriptions adequate, these
1432should be {boring, confusing, tedious, ridiculous} (pick one or more).
1433
1434RULESETS (* means built in to sendmail)
1435
1436   0 *	Parsing
1437   1 *	Sender rewriting
1438   2 *	Recipient rewriting
1439   3 *	Canonicalization
1440   4 *	Post cleanup
1441   5 *	Local address rewrite (after aliasing)
1442  1x	mailer rules (sender qualification)
1443  2x	mailer rules (recipient qualification)
1444  3x	mailer rules (sender header qualification)
1445  4x	mailer rules (recipient header qualification)
1446  5x	mailer subroutines (general)
1447  6x	mailer subroutines (general)
1448  7x	mailer subroutines (general)
1449  8x	reserved
1450  90	Mailertable host stripping
1451  96	Bottom half of Ruleset 3 (ruleset 6 in old sendmail)
1452  97	Hook for recursive ruleset 0 call (ruleset 7 in old sendmail)
1453  98	Local part of ruleset 0 (ruleset 8 in old sendmail)
1454
1455
1456MAILERS
1457
1458   0	local, prog	local and program mailers
1459   1	[e]smtp, relay	SMTP channel
1460   2	uucp-*		UNIX-to-UNIX Copy Program
1461   3	netnews		Network News delivery
1462   4	fax		Sam Leffler's FlexFAX software
1463   5	mail11		DECnet mailer
1464
1465
1466MACROS
1467
1468   A
1469   B	Bitnet Relay
1470   C	DECnet Relay
1471   D	The local domain -- usually not needed
1472   E
1473   F	FAX Relay
1474   G
1475   H	mail Hub (for mail clusters)
1476   I
1477   J
1478   K
1479   L	Luser Relay
1480   M	Masquerade (who I claim to be)
1481   N
1482   O
1483   P
1484   Q
1485   R	Relay (for unqualified names)
1486   S	Smart Host
1487   T
1488   U	my UUCP name (if I have a UUCP connection)
1489   V	UUCP Relay (class V hosts)
1490   W	UUCP Relay (class W hosts)
1491   X	UUCP Relay (class X hosts)
1492   Y	UUCP Relay (all other hosts)
1493   Z	Version number
1494
1495
1496CLASSES
1497
1498   A
1499   B
1500   C
1501   D
1502   E	addresses that should not seem to come from $M
1503   F	hosts we forward for
1504   G
1505   H
1506   I
1507   J
1508   K
1509   L	addresses that should not be forwarded to $R
1510   M
1511   N
1512   O	operators that indicate network operations (cannot be in local names)
1513   P	top level pseudo-domains: BITNET, DECNET, FAX, UUCP, etc.
1514   Q
1515   R
1516   S
1517   T
1518   U	locally connected UUCP hosts
1519   V	UUCP hosts connected to relay $V
1520   W	UUCP hosts connected to relay $W
1521   X	UUCP hosts connected to relay $X
1522   Y	locally connected smart UUCP hosts
1523   Z	locally connected domain-ized UUCP hosts
1524   .	the class containing only a dot
1525
1526
1527M4 DIVERSIONS
1528
1529   1	Local host detection and resolution
1530   2	Local Ruleset 3 additions
1531   3	Local Ruleset 0 additions
1532   4	UUCP Ruleset 0 additions
1533   5	locally interpreted names (overrides $R)
1534   6	local configuration (at top of file)
1535   7	mailer definitions
1536   8
1537   9	special local rulesets (1 and 2)
1538