xref: /csrg-svn/usr.sbin/sendmail/cf/README (revision 51268)
1*51268Seric@(#)README	2.2 (Berkeley) 10/02/91
251220Seric
351220SericThis document describes the sendmail configuration files being used
451220Sericat Berkeley.  There have been several previous versions.  This file
551220Sericis being written on 24 July 1991, and will probably not be generally
651220Sericavailable for several months.
751220Seric
851220SericINSTALLING A NEW SITE CONFIGURATION
951220Seric
1051220SericConfiguration files are contained in the subdirectory "cf", with a
1151220Sericsuffix ".mc".  They must be run through "m4" to produce a ".cf" file.
1251220Seric
1351220SericEvery .mc file SHOULD begin with:
1451220Seric
1551220Seric	divert(-1)
1651220Seric	COPYRIGHT NOTICE
1751220Seric	divert(0)
1851220Seric
1951220SericIf you don't care about copyrights, you can omit this.  If you try
2051220Sericto patent this, I'll be very, very pissed.  I haven't patented a lot
2151220Sericof hot ideas so that you can use them; I expect reciprocal courtesy.
2251220SericA copyleft is a copyright by another name.
2351220Seric
2451220SericThe copyright, if any, MUST be followed by:
2551220Seric
2651220Seric	include(../m4/cf.m4)
2751220Seric
2851220SericThis will pull in the M4 macros you will need to make sense of
2951220Sericeverything else.  As the saying goes, don't think about it, just
3051220Sericdo it.  If you don't do it, don't bother reading the rest of this
3151220Sericfile.
3251220Seric
3351220SericAt this point, let me make one thing perfectly clear.  I am a rope
3451220Sericsalesman.  I sell you rope.  I haven't produced a new M4 system
3551220Sericthat detects latent bugs, nor have I tried to fix the old one.
3651220Seric(However, I have decided to rely on a post-V7 version; if you
3751220Sericare running the 4.2bsd, SysV.2, or 7th Edition version, I suggest
3851220Sericfinding a friend with a newer version.  You can m4-expand on
3951220Serictheir system, then run locally.)
4051220Seric
4151220SericLet's examine a typical .mc file (cf/cs-exposed.mc):
4251220Seric
4351220Seric	divert(-1)
4451220Seric	#
4551220Seric	# Copyright (c) 1983 Eric P. Allman
4651220Seric	# Copyright (c) 1988 The Regents of the University of California.
4751220Seric	# All rights reserved.
4851220Seric	#
4951220Seric	# Redistribution and use in source and binary forms are permitted
5051220Seric	# provided that the above copyright notice and this paragraph are
5151220Seric	# duplicated in all such forms and that any documentation,
5251220Seric	# advertising materials, and other materials related to such
5351220Seric	# distribution and use acknowledge that the software was developed
5451220Seric	# by the University of California, Berkeley.  The name of the
5551220Seric	# University may not be used to endorse or promote products derived
5651220Seric	# from this software without specific prior written permission.
5751220Seric	# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
5851220Seric	# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
5951220Seric	# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
6051220Seric	#
6151220Seric
6251220SericIf you copy this file and modify it, you should maintain this copyright
6351220Sericnotice.  If you actually start from scratch you can delete it -- but be
6451220Serichonest!
6551220Seric
6651220Seric	include(`../m4/cf.m4')
6751220Seric
6851220SericYou need this line!
6951220Seric
70*51268Seric	VERSIONID(<SCCS or RCS version id>)
7151220Seric
7251220SericVERSIONID is a macro that stuffs the version information into the
7351220Sericresulting file.  We use SCCS; you could use RCS, something else, or
7451220Sericomit it completely.
7551220Seric
76*51268Seric	DOMAIN(cs.exposed)
7751220Seric
7851220SericThis example exposes the host inside of the CS subdomain -- that is,
7951220Sericit doesn't try to hide the name of the workstation to the outside
8051220Sericworld.  Changing this to DOMAIN(cs.hidden) would have made outgoing
8151220Sericmessages refer to "<username>@CS.Berkeley.EDU" instead of using the
8251220Sericlocal hostname.  This can also be effected by using:
8351220Seric
8451220Seric	define(`MASQUERADE_AS', `masquerade.host.name.domain.name')dnl
8551220Seric
8651220Sericin the ".mc" file.
8751220Seric
88*51268Seric	MAILER(local)
89*51268Seric	MAILER(smtp)
9051220Seric
9151220SericThese describe the mailers used at the default CS site site.
9251220Seric
9351220SericNote that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes
9451220Sericdefault Computer Science Division environment.  There are several
9551220Sericenvironments available: bsd4.3, bsd4.4, riscos4.5, sunos3.5,
9651220Sericsunos4.1, and ultrix4.1.  These change things like the location
9751220Sericof the alias file and queue directory.
9851220Seric
9951220SericMAILERS
10051220Seric
10151220SericThere are fewer mailers supported in this version than the previous
10251220Sericversion, owing mostly to a simpler world.
10351220Seric
10451220Sericlocal		The local and prog mailers.  You will almost always
10551220Seric		need these; the only exception is if you relay ALL
10651220Seric		your mail to another site.
10751220Seric
10851220Sericsmtp		The Simple Mail Transport Protocol mailer.  This does
10951220Seric		not hide hosts behind a gateway or another other
11051220Seric		such hack; it assumes a world where everyone is
11151220Seric		running the name server.
11251220Seric
11351220Sericuucp		The Unix-to-Unix Copy Program mailer.  Actually, this
11451220Seric		defines two mailers, "uucp" and "suucp".  The latter
11551220Seric		is for when you know that the UUCP mailer at the other
11651220Seric		end can handle multiple recipients in one transfer.
11751220Seric
118*51268SericEXTENSIONS
119*51268Seric
120*51268SericFor more complex configurations, you can define special rules.
121*51268SericThe macro LOCAL_RULE_3 introduces rules that are used in canonicalizing
122*51268Sericthe names.  Any modifications made here are reflected in the header.
123*51268Seric
124*51268SericA common use is to convert old UUCP addreses to SMTP addresses using
125*51268Sericthe UUCPSMTP macro.  For example:
126*51268Seric
127*51268Seric	LOCAL_RULE_3
128*51268Seric	UUCPSMTP(decvax,	decvax.dec.com)
129*51268Seric	UUCPSMTP(research,	research.att.com)
130*51268Seric
131*51268Sericwill cause addresses of the form "decvax!user" and "research!user"
132*51268Sericto be converted to "user@decvax.dec.com" and "user@research.att.com"
133*51268Sericrespectively.
134*51268Seric
135*51268SericSimilarly, LOCAL_RULE_0 can be used to introduce new parsing rules.
136*51268SericFor example, new rules are needed to parse hostnames that you accept
137*51268Sericvia MX records.
138*51268Seric
139*51268Seric????
140*51268Seric
14151220SericHIERARCHY
14251220Seric
14351220SericWithin this directory are several subdirectories, to wit:
14451220Seric
14551220Sericm4		General support routines.  These are typically
14651220Seric		very important and should not be changed without
14751220Seric		contacting your lawyer.
14851220Seric
14951220Sericcf		The configuration files themselves.  They have
15051220Seric		".mc" suffixes, and must be run through m4 to
15151220Seric		become complete.  The resulting output should
15251220Seric		have a ".cf" suffix.
15351220Seric
15451220Sericostype		Definitions describing a particular operating
15551220Seric		system type.  These should always be referenced
15651220Seric		using the OSTYPE macro in the .mc file.  Examples
15751220Seric		include "bsd4.3", "bsd4.4", "sunos3.5", and
15851220Seric		"sunos4.1".
15951220Seric
16051220Sericdomain		Definitions describing a particular domain, referenced
16151220Seric		using the DOMAIN macro in the .mc file.  These are
16251220Seric		site dependent; for example, we contribute "cs.exposed.m4"
16351220Seric		and "cs.hidden.m4" which both describe hosts in the
16451220Seric		CS.Berkeley.EDU subdomain; the former displays the local
16551220Seric		hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the
16651220Seric		latter does its best to hide the identity of the local
16751220Seric		workstation inside the CS subdomain.
16851220Seric
16951220Sericmailer		Descriptions of mailers.   These are referenced using
17051220Seric		the MAILER macro in the .mc file.
17151220Seric
17251220Sericsh		Shell files used when building the .cf file from the
17351220Seric		.mc file in the cf subdirectory.
17451220Seric
17551220Sericfeature		These hold special orthogonal features that you might
17651220Seric		want to include.  They should be referenced using
17751220Seric		the FEATURE macro.
17851220Seric
17951220Serichack		Local hacks.  These can be referenced using the HACK
18051220Seric		macro.  They shouldn't be of more than voyeuristic
18151220Seric		interest outside the .Berkeley.EDU domain, but who knows?
18251220Seric		We've all got our own peccadilloes.
18351220Seric
184*51268Sericsiteconfig	Site configuration -- e.g., tables of locally connected
185*51268Seric		UUCP sites.
18651220Seric
187*51268Seric
18851220SericADMINISTRATIVE DETAILS
18951220Seric
19051220SericThe following sections detail usage of certain internal parts of the
19151220Sericsendmail.cf file.  Read them carefully if you are trying to modify
19251220Sericthe current model.  If you find the above descriptions adequate, these
19351220Sericshould be {boring, confusing, tedious, ridiculous} (pick one or more).
19451220Seric
19551220SericRULESETS (* means built in to sendmail)
19651220Seric
19751220Seric   0 *	Parsing
19851220Seric   1 *	Sender rewriting
19951220Seric   2 *	Recipient rewriting
20051220Seric   3 *	Canonicalization
20151220Seric   4 *	Post cleanup
20251220Seric   5	Back compatibility for UUCP
20351220Seric   6	Bottom half of Ruleset 3
20451220Seric   7	--unused--
20551220Seric   8	"host dependent cleanup" -- unused?
20651220Seric   9	change rightmost % to @ -- needed?
20751220Seric
20851220Seric
20951220SericMAILERS
21051220Seric
21151220Seric   0	local, prog	local and program mailers
21251220Seric   1	smtp		SMTP channel
21351220Seric   2	uucp
21451220Seric
21551220Seric
21651220SericMACROS
21751220Seric
21851220Seric   A
21951220Seric   B	Bitnet Relay
22051220Seric   C	CSNET Relay
22151220Seric   D
22251220Seric   E
22351220Seric   F
22451220Seric   G
22551220Seric   H
22651220Seric   I
22751220Seric   J
22851220Seric   K
22951220Seric   L
23051220Seric   M	Masquerade (who I claim to be)
23151220Seric   N
23251220Seric   O
23351220Seric   P
23451220Seric   Q
23551220Seric   R	Relay (for unqualified names)
23651220Seric   S
23751220Seric   T
23851220Seric   U	UUCP Relay (all hosts)
239*51268Seric   V	my UUCP name (if I have a UUCP connection)
24051220Seric   W	UUCP Relay (class W hosts)
24151220Seric   X	UUCP Relay (class X hosts)
24251220Seric   Y	UUCP Relay (class Y hosts)
24351220Seric   Z	Version number
24451220Seric
24551220Seric
24651220SericCLASSES
24751220Seric
24851220Seric   A
24951220Seric   B
25051220Seric   C
25151220Seric   D
25251220Seric   E
25351220Seric   F
25451220Seric   G
25551220Seric   H
25651220Seric   I
25751220Seric   J
25851220Seric   K
25951220Seric   L	addresses that should not be forwarded to $R
26051220Seric   M
26151220Seric   N
26251220Seric   O	operators that indicate network operations (cannot be in local names)
26351220Seric   P
26451220Seric   Q
26551220Seric   R
26651220Seric   S
26751220Seric   T
26851220Seric   U	locally connected UUCP hosts
269*51268Seric   V	locally connected smart UUCP hosts
270*51268Seric   W	UUCP hosts connected to host $W
271*51268Seric   X	UUCP hosts connected to host $X
272*51268Seric   Y	UUCP hosts connected to host $Y
27351220Seric   Z
27451220Seric
27551220Seric
27651220SericM4 DIVERSIONS
27751220Seric
27851220Seric   1	Versions
27951220Seric   2	Local Ruleset 0 additions
28051220Seric   3	Local Ruleset 3 additions
281*51268Seric   4	UUCP Ruleset 0 additions
28251220Seric   5
28351220Seric   6
28451220Seric   7	mailer definitions
28551220Seric   8
28651220Seric   9
287