Commit | Line | Data |
---|---|---|
c573210d | 1 | @(#)README 2.3 (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 | 88 | MAILER(smtp) |
7ace9d88 | 89 | |
c573210d EA |
90 | These describe the mailers used at the default CS site site. The |
91 | local mailer is always included automatically. | |
7ace9d88 EA |
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 | |
c573210d EA |
137 | via MX records. For example, you might have: |
138 | ||
139 | LOCAL_RULE_0 | |
140 | R$+ < @ cnmat.Berkeley.EDU > $#uucp $@ cnmat $: $1 | |
141 | ||
142 | You would use this if you had installed an MX record for cnmat.Berkeley.EDU | |
143 | pointing at this host; this rule catches the message and forwards it on | |
144 | using UUCP. | |
9df1b56b EA |
145 | |
146 | ???? | |
147 | ||
7ace9d88 EA |
148 | HIERARCHY |
149 | ||
150 | Within this directory are several subdirectories, to wit: | |
151 | ||
152 | m4 General support routines. These are typically | |
153 | very important and should not be changed without | |
154 | contacting your lawyer. | |
155 | ||
156 | cf The configuration files themselves. They have | |
157 | ".mc" suffixes, and must be run through m4 to | |
158 | become complete. The resulting output should | |
159 | have a ".cf" suffix. | |
160 | ||
161 | ostype Definitions describing a particular operating | |
162 | system type. These should always be referenced | |
163 | using the OSTYPE macro in the .mc file. Examples | |
164 | include "bsd4.3", "bsd4.4", "sunos3.5", and | |
165 | "sunos4.1". | |
166 | ||
167 | domain Definitions describing a particular domain, referenced | |
168 | using the DOMAIN macro in the .mc file. These are | |
169 | site dependent; for example, we contribute "cs.exposed.m4" | |
170 | and "cs.hidden.m4" which both describe hosts in the | |
171 | CS.Berkeley.EDU subdomain; the former displays the local | |
172 | hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the | |
173 | latter does its best to hide the identity of the local | |
174 | workstation inside the CS subdomain. | |
175 | ||
176 | mailer Descriptions of mailers. These are referenced using | |
177 | the MAILER macro in the .mc file. | |
178 | ||
179 | sh Shell files used when building the .cf file from the | |
180 | .mc file in the cf subdirectory. | |
181 | ||
182 | feature These hold special orthogonal features that you might | |
183 | want to include. They should be referenced using | |
184 | the FEATURE macro. | |
185 | ||
186 | hack Local hacks. These can be referenced using the HACK | |
187 | macro. They shouldn't be of more than voyeuristic | |
188 | interest outside the .Berkeley.EDU domain, but who knows? | |
189 | We've all got our own peccadilloes. | |
190 | ||
9df1b56b EA |
191 | siteconfig Site configuration -- e.g., tables of locally connected |
192 | UUCP sites. | |
193 | ||
7ace9d88 EA |
194 | |
195 | ADMINISTRATIVE DETAILS | |
196 | ||
197 | The following sections detail usage of certain internal parts of the | |
198 | sendmail.cf file. Read them carefully if you are trying to modify | |
199 | the current model. If you find the above descriptions adequate, these | |
200 | should be {boring, confusing, tedious, ridiculous} (pick one or more). | |
201 | ||
202 | RULESETS (* means built in to sendmail) | |
203 | ||
204 | 0 * Parsing | |
205 | 1 * Sender rewriting | |
206 | 2 * Recipient rewriting | |
207 | 3 * Canonicalization | |
208 | 4 * Post cleanup | |
209 | 5 Back compatibility for UUCP | |
210 | 6 Bottom half of Ruleset 3 | |
211 | 7 --unused-- | |
212 | 8 "host dependent cleanup" -- unused? | |
213 | 9 change rightmost % to @ -- needed? | |
214 | ||
215 | ||
216 | MAILERS | |
217 | ||
218 | 0 local, prog local and program mailers | |
219 | 1 smtp SMTP channel | |
220 | 2 uucp | |
221 | ||
222 | ||
223 | MACROS | |
224 | ||
225 | A | |
226 | B Bitnet Relay | |
227 | C CSNET Relay | |
228 | D | |
229 | E | |
230 | F | |
231 | G | |
232 | H | |
233 | I | |
234 | J | |
235 | K | |
236 | L | |
237 | M Masquerade (who I claim to be) | |
238 | N | |
239 | O | |
240 | P | |
241 | Q | |
242 | R Relay (for unqualified names) | |
243 | S | |
244 | T | |
c573210d EA |
245 | U my UUCP name (if I have a UUCP connection) |
246 | V UUCP Relay (class V hosts) | |
7ace9d88 EA |
247 | W UUCP Relay (class W hosts) |
248 | X UUCP Relay (class X hosts) | |
c573210d | 249 | Y UUCP Relay (all other hosts) |
7ace9d88 EA |
250 | Z Version number |
251 | ||
252 | ||
253 | CLASSES | |
254 | ||
255 | A | |
256 | B | |
257 | C | |
258 | D | |
259 | E | |
260 | F | |
261 | G | |
262 | H | |
263 | I | |
264 | J | |
265 | K | |
266 | L addresses that should not be forwarded to $R | |
267 | M | |
268 | N | |
269 | O operators that indicate network operations (cannot be in local names) | |
270 | P | |
271 | Q | |
272 | R | |
273 | S | |
274 | T | |
275 | U locally connected UUCP hosts | |
c573210d EA |
276 | V UUCP hosts connected to relay $V |
277 | W UUCP hosts connected to relay $W | |
278 | X UUCP hosts connected to relay $X | |
279 | Y locally connected smart UUCP hosts | |
7ace9d88 EA |
280 | Z |
281 | ||
282 | ||
283 | M4 DIVERSIONS | |
284 | ||
285 | 1 Versions | |
286 | 2 Local Ruleset 0 additions | |
287 | 3 Local Ruleset 3 additions | |
9df1b56b | 288 | 4 UUCP Ruleset 0 additions |
c573210d | 289 | 5 locally interpreted names (overrides $R) |
7ace9d88 EA |
290 | 6 |
291 | 7 mailer definitions | |
292 | 8 | |
293 | 9 |