Commit | Line | Data |
---|---|---|
9df1b56b | 1 | @(#)README 2.2 (Berkeley) %G% |
7ace9d88 EA |
2 | |
3 | This document describes the sendmail configuration files being used | |
4 | at Berkeley. There have been several previous versions. This file | |
5 | is being written on 24 July 1991, and will probably not be generally | |
6 | available for several months. | |
7 | ||
8 | INSTALLING A NEW SITE CONFIGURATION | |
9 | ||
10 | Configuration files are contained in the subdirectory "cf", with a | |
11 | suffix ".mc". They must be run through "m4" to produce a ".cf" file. | |
12 | ||
13 | Every .mc file SHOULD begin with: | |
14 | ||
15 | divert(-1) | |
16 | COPYRIGHT NOTICE | |
17 | divert(0) | |
18 | ||
19 | If you don't care about copyrights, you can omit this. If you try | |
20 | to patent this, I'll be very, very pissed. I haven't patented a lot | |
21 | of hot ideas so that you can use them; I expect reciprocal courtesy. | |
22 | A copyleft is a copyright by another name. | |
23 | ||
24 | The copyright, if any, MUST be followed by: | |
25 | ||
26 | include(../m4/cf.m4) | |
27 | ||
28 | This will pull in the M4 macros you will need to make sense of | |
29 | everything else. As the saying goes, don't think about it, just | |
30 | do it. If you don't do it, don't bother reading the rest of this | |
31 | file. | |
32 | ||
33 | At this point, let me make one thing perfectly clear. I am a rope | |
34 | salesman. I sell you rope. I haven't produced a new M4 system | |
35 | that detects latent bugs, nor have I tried to fix the old one. | |
36 | (However, I have decided to rely on a post-V7 version; if you | |
37 | are running the 4.2bsd, SysV.2, or 7th Edition version, I suggest | |
38 | finding a friend with a newer version. You can m4-expand on | |
39 | their system, then run locally.) | |
40 | ||
41 | Let's examine a typical .mc file (cf/cs-exposed.mc): | |
42 | ||
43 | divert(-1) | |
44 | # | |
45 | # Copyright (c) 1983 Eric P. Allman | |
46 | # Copyright (c) 1988 The Regents of the University of California. | |
47 | # All rights reserved. | |
48 | # | |
49 | # Redistribution and use in source and binary forms are permitted | |
50 | # provided that the above copyright notice and this paragraph are | |
51 | # duplicated in all such forms and that any documentation, | |
52 | # advertising materials, and other materials related to such | |
53 | # distribution and use acknowledge that the software was developed | |
54 | # by the University of California, Berkeley. The name of the | |
55 | # University may not be used to endorse or promote products derived | |
56 | # from this software without specific prior written permission. | |
57 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
58 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
59 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
60 | # | |
61 | ||
62 | If you copy this file and modify it, you should maintain this copyright | |
63 | notice. If you actually start from scratch you can delete it -- but be | |
64 | honest! | |
65 | ||
66 | include(`../m4/cf.m4') | |
67 | ||
68 | You need this line! | |
69 | ||
9df1b56b | 70 | VERSIONID(<SCCS or RCS version id>) |
7ace9d88 EA |
71 | |
72 | VERSIONID is a macro that stuffs the version information into the | |
73 | resulting file. We use SCCS; you could use RCS, something else, or | |
74 | omit it completely. | |
75 | ||
9df1b56b | 76 | DOMAIN(cs.exposed) |
7ace9d88 EA |
77 | |
78 | This example exposes the host inside of the CS subdomain -- that is, | |
79 | it doesn't try to hide the name of the workstation to the outside | |
80 | world. Changing this to DOMAIN(cs.hidden) would have made outgoing | |
81 | messages refer to "<username>@CS.Berkeley.EDU" instead of using the | |
82 | local hostname. This can also be effected by using: | |
83 | ||
84 | define(`MASQUERADE_AS', `masquerade.host.name.domain.name')dnl | |
85 | ||
86 | in the ".mc" file. | |
87 | ||
9df1b56b EA |
88 | MAILER(local) |
89 | MAILER(smtp) | |
7ace9d88 EA |
90 | |
91 | These describe the mailers used at the default CS site site. | |
92 | ||
93 | Note that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes | |
94 | default Computer Science Division environment. There are several | |
95 | environments available: bsd4.3, bsd4.4, riscos4.5, sunos3.5, | |
96 | sunos4.1, and ultrix4.1. These change things like the location | |
97 | of the alias file and queue directory. | |
98 | ||
99 | MAILERS | |
100 | ||
101 | There are fewer mailers supported in this version than the previous | |
102 | version, owing mostly to a simpler world. | |
103 | ||
104 | local The local and prog mailers. You will almost always | |
105 | need these; the only exception is if you relay ALL | |
106 | your mail to another site. | |
107 | ||
108 | smtp The Simple Mail Transport Protocol mailer. This does | |
109 | not hide hosts behind a gateway or another other | |
110 | such hack; it assumes a world where everyone is | |
111 | running the name server. | |
112 | ||
113 | uucp The Unix-to-Unix Copy Program mailer. Actually, this | |
114 | defines two mailers, "uucp" and "suucp". The latter | |
115 | is for when you know that the UUCP mailer at the other | |
116 | end can handle multiple recipients in one transfer. | |
117 | ||
9df1b56b EA |
118 | EXTENSIONS |
119 | ||
120 | For more complex configurations, you can define special rules. | |
121 | The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing | |
122 | the names. Any modifications made here are reflected in the header. | |
123 | ||
124 | A common use is to convert old UUCP addreses to SMTP addresses using | |
125 | the UUCPSMTP macro. For example: | |
126 | ||
127 | LOCAL_RULE_3 | |
128 | UUCPSMTP(decvax, decvax.dec.com) | |
129 | UUCPSMTP(research, research.att.com) | |
130 | ||
131 | will cause addresses of the form "decvax!user" and "research!user" | |
132 | to be converted to "user@decvax.dec.com" and "user@research.att.com" | |
133 | respectively. | |
134 | ||
135 | Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. | |
136 | For example, new rules are needed to parse hostnames that you accept | |
137 | via MX records. | |
138 | ||
139 | ???? | |
140 | ||
7ace9d88 EA |
141 | HIERARCHY |
142 | ||
143 | Within this directory are several subdirectories, to wit: | |
144 | ||
145 | m4 General support routines. These are typically | |
146 | very important and should not be changed without | |
147 | contacting your lawyer. | |
148 | ||
149 | cf The configuration files themselves. They have | |
150 | ".mc" suffixes, and must be run through m4 to | |
151 | become complete. The resulting output should | |
152 | have a ".cf" suffix. | |
153 | ||
154 | ostype Definitions describing a particular operating | |
155 | system type. These should always be referenced | |
156 | using the OSTYPE macro in the .mc file. Examples | |
157 | include "bsd4.3", "bsd4.4", "sunos3.5", and | |
158 | "sunos4.1". | |
159 | ||
160 | domain Definitions describing a particular domain, referenced | |
161 | using the DOMAIN macro in the .mc file. These are | |
162 | site dependent; for example, we contribute "cs.exposed.m4" | |
163 | and "cs.hidden.m4" which both describe hosts in the | |
164 | CS.Berkeley.EDU subdomain; the former displays the local | |
165 | hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the | |
166 | latter does its best to hide the identity of the local | |
167 | workstation inside the CS subdomain. | |
168 | ||
169 | mailer Descriptions of mailers. These are referenced using | |
170 | the MAILER macro in the .mc file. | |
171 | ||
172 | sh Shell files used when building the .cf file from the | |
173 | .mc file in the cf subdirectory. | |
174 | ||
175 | feature These hold special orthogonal features that you might | |
176 | want to include. They should be referenced using | |
177 | the FEATURE macro. | |
178 | ||
179 | hack Local hacks. These can be referenced using the HACK | |
180 | macro. They shouldn't be of more than voyeuristic | |
181 | interest outside the .Berkeley.EDU domain, but who knows? | |
182 | We've all got our own peccadilloes. | |
183 | ||
9df1b56b EA |
184 | siteconfig Site configuration -- e.g., tables of locally connected |
185 | UUCP sites. | |
186 | ||
7ace9d88 EA |
187 | |
188 | ADMINISTRATIVE DETAILS | |
189 | ||
190 | The following sections detail usage of certain internal parts of the | |
191 | sendmail.cf file. Read them carefully if you are trying to modify | |
192 | the current model. If you find the above descriptions adequate, these | |
193 | should be {boring, confusing, tedious, ridiculous} (pick one or more). | |
194 | ||
195 | RULESETS (* means built in to sendmail) | |
196 | ||
197 | 0 * Parsing | |
198 | 1 * Sender rewriting | |
199 | 2 * Recipient rewriting | |
200 | 3 * Canonicalization | |
201 | 4 * Post cleanup | |
202 | 5 Back compatibility for UUCP | |
203 | 6 Bottom half of Ruleset 3 | |
204 | 7 --unused-- | |
205 | 8 "host dependent cleanup" -- unused? | |
206 | 9 change rightmost % to @ -- needed? | |
207 | ||
208 | ||
209 | MAILERS | |
210 | ||
211 | 0 local, prog local and program mailers | |
212 | 1 smtp SMTP channel | |
213 | 2 uucp | |
214 | ||
215 | ||
216 | MACROS | |
217 | ||
218 | A | |
219 | B Bitnet Relay | |
220 | C CSNET Relay | |
221 | D | |
222 | E | |
223 | F | |
224 | G | |
225 | H | |
226 | I | |
227 | J | |
228 | K | |
229 | L | |
230 | M Masquerade (who I claim to be) | |
231 | N | |
232 | O | |
233 | P | |
234 | Q | |
235 | R Relay (for unqualified names) | |
236 | S | |
237 | T | |
238 | U UUCP Relay (all hosts) | |
9df1b56b | 239 | V my UUCP name (if I have a UUCP connection) |
7ace9d88 EA |
240 | W UUCP Relay (class W hosts) |
241 | X UUCP Relay (class X hosts) | |
242 | Y UUCP Relay (class Y hosts) | |
243 | Z Version number | |
244 | ||
245 | ||
246 | CLASSES | |
247 | ||
248 | A | |
249 | B | |
250 | C | |
251 | D | |
252 | E | |
253 | F | |
254 | G | |
255 | H | |
256 | I | |
257 | J | |
258 | K | |
259 | L addresses that should not be forwarded to $R | |
260 | M | |
261 | N | |
262 | O operators that indicate network operations (cannot be in local names) | |
263 | P | |
264 | Q | |
265 | R | |
266 | S | |
267 | T | |
268 | U locally connected UUCP hosts | |
9df1b56b EA |
269 | V locally connected smart UUCP hosts |
270 | W UUCP hosts connected to host $W | |
271 | X UUCP hosts connected to host $X | |
272 | Y UUCP hosts connected to host $Y | |
7ace9d88 EA |
273 | Z |
274 | ||
275 | ||
276 | M4 DIVERSIONS | |
277 | ||
278 | 1 Versions | |
279 | 2 Local Ruleset 0 additions | |
280 | 3 Local Ruleset 3 additions | |
9df1b56b | 281 | 4 UUCP Ruleset 0 additions |
7ace9d88 EA |
282 | 5 |
283 | 6 | |
284 | 7 mailer definitions | |
285 | 8 | |
286 | 9 |