Commit | Line | Data |
---|---|---|
7ace9d88 | 1 | |
7ace9d88 | 2 | |
4a51b074 | 3 | NEW SENDMAIL CONFIGURATION FILES |
7ace9d88 | 4 | |
4a51b074 | 5 | Eric Allman <eric@CS.Berkeley.EDU> |
7ace9d88 | 6 | |
a33031f5 | 7 | @(#)README 6.8 (Berkeley) %G% |
7ace9d88 | 8 | |
7ace9d88 | 9 | |
4a51b074 EA |
10 | This document describes the sendmail configuration files being used |
11 | at Berkeley. These use features in the new (R6) sendmail, and although | |
12 | there is an ``OLDSENDMAIL'' mode, they haven't really been tested on | |
fd82c288 | 13 | old versions of sendmail and cannot be expected to work well. |
4a51b074 EA |
14 | |
15 | These configuration files are probably not as general as previous | |
16 | versions, and don't handle as many of the wierd cases automagically. | |
17 | I was able to simplify by them for two reasons. First, the network | |
18 | has become more consistent -- for example, at this point, everyone | |
19 | on the internet is supposed to be running a name server, so hacks to | |
20 | handle NIC-registered hosts can go away. Second, I assumed that a | |
21 | subdomain would be running SMTP internally -- UUCP is presumed to be | |
22 | a long-haul protocol. I realize that this is not universal, but it | |
23 | does describe the vast majority of sites with which I am familiar, | |
24 | including those outside the US. | |
25 | ||
26 | Of course, the downside of this is that if you do live in a wierd | |
27 | world, things are going to get wierder for you. I'm sorry about that, | |
28 | but at the time we at Berkeley had a problem, and it seemed like the | |
29 | right thing to do. | |
30 | ||
fd82c288 EA |
31 | This package requires a post-V7 version of m4; if you are running the |
32 | 4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with | |
33 | a newer version. You can m4-expand on their system, then run locally. | |
34 | SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 (which is a | |
35 | language unto itself) also works, but I don't intend to work so hard | |
36 | to keep this up in the future. [Note to GNU folks: the construct | |
4a51b074 | 37 | "define(`FOO')" should work without my having to add a null value.] |
7ace9d88 | 38 | |
a33031f5 EA |
39 | IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run |
40 | "m4 foo.mc > foo.cf" -- that should be all you need. | |
41 | ||
42 | To get started, you may want to look at tcpproto.mc (for TCP-only | |
43 | sites) and uucpproto.m4 (for UUCP-only sites). Others are versions | |
44 | that we use at Berkeley, although not all are in current use. For | |
45 | example, ucbarpa has gone away, but I've left ucbarpa.mc in because | |
46 | it demonstrates some interesting techniques. | |
47 | ||
4a51b074 EA |
48 | I'm not pretending that this README describes everything that these |
49 | configuration files can do; clever people can probably tweak them | |
50 | to great effect. But it should get you started. | |
51 | ||
bee9d799 | 52 | |
4a51b074 EA |
53 | +--------------------------+ |
54 | | INTRODUCTION AND EXAMPLE | | |
55 | +--------------------------+ | |
56 | ||
57 | Configuration files are contained in the subdirectory "cf", with a | |
58 | suffix ".mc". They must be run through "m4" to produce a ".cf" file. | |
59 | ||
7ace9d88 EA |
60 | Let's examine a typical .mc file (cf/cs-exposed.mc): |
61 | ||
62 | divert(-1) | |
63 | # | |
64 | # Copyright (c) 1983 Eric P. Allman | |
65 | # Copyright (c) 1988 The Regents of the University of California. | |
66 | # All rights reserved. | |
67 | # | |
68 | # Redistribution and use in source and binary forms are permitted | |
69 | # provided that the above copyright notice and this paragraph are | |
70 | # duplicated in all such forms and that any documentation, | |
71 | # advertising materials, and other materials related to such | |
72 | # distribution and use acknowledge that the software was developed | |
73 | # by the University of California, Berkeley. The name of the | |
74 | # University may not be used to endorse or promote products derived | |
75 | # from this software without specific prior written permission. | |
76 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
77 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
78 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
79 | # | |
80 | ||
4a51b074 | 81 | The divert(-1) will delete the crud in the resulting output file. |
fd82c288 | 82 | The copyright notice is what your lawyers require. Our lawyers require |
4a51b074 EA |
83 | the one that I've included in my files. A copyleft is a copyright by |
84 | another name. | |
85 | ||
86 | The next line MUST be | |
7ace9d88 EA |
87 | |
88 | include(`../m4/cf.m4') | |
89 | ||
4a51b074 EA |
90 | This will pull in the M4 macros you will need to make sense of |
91 | everything else. As the saying goes, don't think about it, just | |
92 | do it. If you don't do it, don't bother reading the rest of this | |
93 | file. | |
7ace9d88 | 94 | |
8897fcb1 | 95 | VERSIONID(`<SCCS or RCS version id>') |
7ace9d88 EA |
96 | |
97 | VERSIONID is a macro that stuffs the version information into the | |
98 | resulting file. We use SCCS; you could use RCS, something else, or | |
4a51b074 EA |
99 | omit it completely. This is not the same as the version id included |
100 | in SMTP greeting messages -- this is defined in m4/version.m4. | |
7ace9d88 | 101 | |
9df1b56b | 102 | DOMAIN(cs.exposed) |
7ace9d88 EA |
103 | |
104 | This example exposes the host inside of the CS subdomain -- that is, | |
105 | it doesn't try to hide the name of the workstation to the outside | |
106 | world. Changing this to DOMAIN(cs.hidden) would have made outgoing | |
107 | messages refer to "<username>@CS.Berkeley.EDU" instead of using the | |
4a51b074 EA |
108 | local hostname. Internaly this is effected by using |
109 | "MASQUERADE_AS(CS.Berkeley.EDU)". | |
7ace9d88 | 110 | |
9df1b56b | 111 | MAILER(smtp) |
7ace9d88 | 112 | |
c573210d EA |
113 | These describe the mailers used at the default CS site site. The |
114 | local mailer is always included automatically. | |
7ace9d88 | 115 | |
bee9d799 | 116 | |
4a51b074 EA |
117 | +--------+ |
118 | | OSTYPE | | |
119 | +--------+ | |
120 | ||
7ace9d88 EA |
121 | Note that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes |
122 | default Computer Science Division environment. There are several | |
fd82c288 EA |
123 | explicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1, |
124 | riscos4.5, sunos3.5, sunos4.1, and ultrix4.1. These change things | |
125 | like the location of the alias file and queue directory. Some of | |
126 | these files are identical to one another. | |
4a51b074 EA |
127 | |
128 | Operating system definitions are easy to write. They may define | |
129 | the following variables (everything defaults, so an ostype file | |
130 | may be empty). | |
131 | ||
132 | ALIAS_FILE [/etc/aliases] The location of the text version | |
133 | of the alias file. | |
134 | HELP_FILE [/usr/lib/sendmail.hf] The name of the file | |
135 | containing information printed in response to | |
136 | the SMTP HELP command. | |
4a51b074 EA |
137 | QUEUE_DIR [/var/spool/mqueue] The directory containing |
138 | queue files. | |
139 | STATUS_FILE [/etc/sendmail.st] The file containing status | |
140 | information. | |
bee9d799 | 141 | LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. |
4a51b074 EA |
142 | LOCAL_MAILER_FLAGS [rn] The flags used by the local mailer. The |
143 | flags lsDFMm are always included. | |
bee9d799 EA |
144 | LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. |
145 | USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program | |
146 | used to submit news. | |
147 | USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. | |
148 | USENET_MAILER_ARGS [-m -h -n] The command line arguments for the | |
149 | usenet mailer. | |
4a51b074 EA |
150 | HOSTMAP_SPEC [dbm -o /etc/hostmap] The value for the builtin |
151 | hostmap key definition. You can redefine this | |
152 | to change the class, flags, and filename of | |
153 | the hostmap. The default flag (-o) makes this | |
154 | map optional. | |
155 | ||
156 | In addition, the following boolean flags may be defined -- the value | |
157 | is ignored. | |
158 | ||
159 | NEED_DOMAIN If set, the $j macro is defined as $w.$D. | |
160 | If not set, $j is defined as $w. If this is | |
161 | set, the domain must be defined using the line | |
162 | DD<domainname> (probably in the domain file, | |
163 | but possibly in the .mc file). You will only | |
164 | need this if you define your system hostname | |
165 | without a domain (type "hostname" -- if it | |
bee9d799 EA |
166 | has no dots in the output, you qualify) AND |
167 | if you are not running the nameserver AND if | |
168 | the first (canonical) name in /etc/hosts for | |
169 | your machine has no domain -- OR if you are | |
170 | running Ultrix or OSF/1 sendmail. Either of | |
171 | these is probably a mistake. | |
4a51b074 EA |
172 | |
173 | +---------+ | |
174 | | DOMAINS | | |
175 | +---------+ | |
176 | ||
177 | You will probably want to collect domain-dependent defines into one | |
178 | file, referenced by the DOMAIN macro. For example, our Berkeley | |
179 | domain file includes definitions for several internal distinguished | |
180 | hosts: | |
181 | ||
182 | UUCP_RELAY The host that will forward UUCP-addressed email. | |
183 | If not defined, all UUCP sites must be directly | |
184 | connected. | |
185 | BITNET_RELAY The host that will forward BITNET-addressed email. | |
186 | If not defined, the .BITNET pseudo-domain won't work. | |
187 | CSNET_RELAY The host that will forward CSNET-addressed email. | |
188 | If not defined, the .CSNET pseudo-domain won't work. | |
189 | LOCAL_RELAY The site that will handle unqualified names -- that | |
190 | is, names with out an @domain extension. If not set, | |
191 | they are assumed to belong on this machine. This | |
192 | allows you to have a central site to store a | |
193 | company- or department-wide alias database. This | |
194 | only works at small sites, and there are better | |
195 | methods. | |
196 | ||
197 | The domain file can also be used to define a domain name, if needed | |
6f02ae2f EA |
198 | (using "DD<domain>") and set certain site-wide features. If all hosts |
199 | at your site masquerade behind one email name, you could also use | |
200 | MASQUERADE_AS here. | |
4a51b074 EA |
201 | |
202 | +---------+ | |
203 | | MAILERS | | |
204 | +---------+ | |
7ace9d88 EA |
205 | |
206 | There are fewer mailers supported in this version than the previous | |
207 | version, owing mostly to a simpler world. | |
208 | ||
209 | local The local and prog mailers. You will almost always | |
210 | need these; the only exception is if you relay ALL | |
fd82c288 EA |
211 | your mail to another site. This mailer is included |
212 | automatically. | |
7ace9d88 EA |
213 | |
214 | smtp The Simple Mail Transport Protocol mailer. This does | |
215 | not hide hosts behind a gateway or another other | |
216 | such hack; it assumes a world where everyone is | |
217 | running the name server. | |
218 | ||
219 | uucp The Unix-to-Unix Copy Program mailer. Actually, this | |
220 | defines two mailers, "uucp" and "suucp". The latter | |
221 | is for when you know that the UUCP mailer at the other | |
222 | end can handle multiple recipients in one transfer. | |
4a51b074 EA |
223 | When you invoke this, sendmail looks for all names in |
224 | the $=U class and sends them to the uucp mailer; all | |
225 | names in the $=Y class are sent to suucp. Note that | |
226 | this is a function of what version of rmail runs on | |
227 | the receiving end, and hence may be out of your control. | |
228 | ||
bee9d799 EA |
229 | usenet Usenet (network news) delivery. If this is specified, |
230 | an extra rule is added to ruleset 0 that forwards all | |
231 | local email for users named ``group.usenet'' to the | |
232 | ``inews'' program. Note that this works for all groups, | |
233 | and may be considered a security problem. | |
234 | ||
235 | ||
4a51b074 EA |
236 | +----------+ |
237 | | FEATURES | | |
238 | +----------+ | |
239 | ||
240 | Special features can be requested using the "FEATURE" macro. For | |
241 | example, the .mc line: | |
242 | ||
243 | FEATURE(use_cw_file) | |
244 | ||
245 | tells sendmail that you want to have it read an /etc/sendmail.cw | |
246 | file to get values for class $=w. Available features are: | |
247 | ||
248 | use_cw_file Read the file /etc/sendmail.cw file to get alternate | |
249 | names for this host. This might be used if you were | |
250 | on a host that MXed for a dynamic set of other | |
251 | hosts. If the set is static, just including the line | |
252 | "Cw<name1> <name2> ..." is probably superior. | |
bee9d799 EA |
253 | redirect Reject all mail addressed to "address.REDIRECT" with |
254 | a ``551 User not local; please try <address>'' message. | |
255 | If this is set, you can alias people who have left | |
256 | to their new address with ".REDIRECT" appended. | |
a33031f5 | 257 | nouucp Don't do anything special with UUCP addresses at all. |
4a51b074 | 258 | |
4a51b074 EA |
259 | Other FEATUREs should be defined, but I was trying to keep these |
260 | config files fairly lean and mean. | |
261 | ||
bee9d799 | 262 | |
4a51b074 EA |
263 | +-------+ |
264 | | HACKS | | |
265 | +-------+ | |
266 | ||
267 | Some things just can't be called features. To make this clear, | |
fd82c288 | 268 | they go in the hack subdirectory and are referenced using the HACK |
4a51b074 EA |
269 | macro. These will tend to be site-dependent. The release |
270 | includes the Berkeley-dependent "cssubdomain" hack (that makes | |
271 | sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; | |
272 | this is intended as a short-term aid while we move hosts into | |
273 | subdomains. | |
274 | ||
bee9d799 | 275 | |
4a51b074 EA |
276 | +--------------------+ |
277 | | SITE CONFIGURATION | | |
278 | +--------------------+ | |
279 | ||
280 | Complex sites will need more local configuration information, such as | |
281 | lists of UUCP hosts they speak with directly. This can get a bit more | |
282 | tricky. For an example of a "complex" site, see cf/ucbvax.mc. | |
283 | ||
284 | The SITECONFIG macro allows you to indirectly reference site-dependent | |
285 | configuration information stored in the siteconfig subdirectory. For | |
286 | example, the line | |
287 | ||
288 | SITECONFIG(uucp.ucbvax, ucbvax, U) | |
289 | ||
290 | reads the file uucp.ucbvax for local connection information. The | |
291 | second parameter is the local name (in this case just "ucbvax" since | |
292 | it is locally connected, and hence a UUCP hostname) and the name of | |
293 | the class in which to store the host information. Another SITECONFIG | |
294 | line reads | |
295 | ||
296 | SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) | |
297 | ||
298 | This says that the file uucp.ucbarpa contains the list of UUCP sites | |
299 | connected to ucbarpa.Berkeley.EDU. The $=W class will be used to | |
300 | store this list. [The machine ucbarpa is gone now, but I've left | |
301 | this out-of-date configuration file around to demonstrate how you | |
302 | might do this.] | |
303 | ||
304 | The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing | |
305 | more than a sequence of SITE macros describing connectivity. For | |
306 | example: | |
307 | ||
308 | SITE(cnmat) | |
309 | SITE(sgi olympus) | |
310 | ||
311 | The second example demonstrates that you can use two names on the | |
312 | same line; these are usually aliases for the same host (or are at | |
313 | least in the same company). | |
314 | ||
bee9d799 | 315 | |
4a51b074 EA |
316 | +-------------------+ |
317 | | TWEAKING RULESETS | | |
318 | +-------------------+ | |
9df1b56b EA |
319 | |
320 | For more complex configurations, you can define special rules. | |
321 | The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing | |
322 | the names. Any modifications made here are reflected in the header. | |
323 | ||
324 | A common use is to convert old UUCP addreses to SMTP addresses using | |
325 | the UUCPSMTP macro. For example: | |
326 | ||
327 | LOCAL_RULE_3 | |
328 | UUCPSMTP(decvax, decvax.dec.com) | |
329 | UUCPSMTP(research, research.att.com) | |
330 | ||
331 | will cause addresses of the form "decvax!user" and "research!user" | |
332 | to be converted to "user@decvax.dec.com" and "user@research.att.com" | |
333 | respectively. | |
334 | ||
4a51b074 EA |
335 | This could also be used to look hosts in a database map: |
336 | ||
337 | LOCAL_RULE_3 | |
338 | R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 | |
339 | ||
340 | This map would be defined in the LOCAL_CONFIG portion, as shown below. | |
341 | ||
9df1b56b EA |
342 | Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. |
343 | For example, new rules are needed to parse hostnames that you accept | |
c573210d EA |
344 | via MX records. For example, you might have: |
345 | ||
346 | LOCAL_RULE_0 | |
347 | R$+ < @ cnmat.Berkeley.EDU > $#uucp $@ cnmat $: $1 | |
348 | ||
349 | You would use this if you had installed an MX record for cnmat.Berkeley.EDU | |
350 | pointing at this host; this rule catches the message and forwards it on | |
351 | using UUCP. | |
9df1b56b | 352 | |
4a51b074 EA |
353 | A similar macro is LOCAL_CONFIG. This introduces lines added after the |
354 | boilerplate option setting but before rulesets, and can be used to | |
a151c868 | 355 | declare local database maps or whatever. For example: |
4a51b074 EA |
356 | |
357 | LOCAL_CONFIG | |
358 | Khostmap hash /etc/hostmap.db | |
359 | Kyplocal nis -m hosts.byname | |
4a51b074 | 360 | |
bee9d799 | 361 | |
4a51b074 EA |
362 | +---------------------------+ |
363 | | MASQUERADING AND RELAYING | | |
364 | +---------------------------+ | |
365 | ||
366 | You can have your host masquerade as another using | |
367 | ||
368 | MASQUERADE_AS(host.domain) | |
9df1b56b | 369 | |
4a51b074 EA |
370 | This causes outgoing SMTP mail to be labelled as coming from the |
371 | indicated domain, rather than $j. One normally masquerades as one | |
372 | of your own subdomains (for example, it's unlikely that I would | |
373 | choose to masquerade as an MIT site). | |
374 | ||
375 | there are always users that need to be "exposed" -- that is, their | |
376 | internal site name should be displayed instead of the masquerade name. | |
377 | Root is an example. You can add users to this list using | |
378 | ||
379 | EXPOSED_USER(usernames) | |
380 | ||
381 | This adds users to class E; you could also use something like | |
382 | ||
383 | FE/etc/sendmail.cE | |
384 | ||
385 | You can also arrange to relay all unqualified names (that is, names | |
386 | without @host) to a relay host. For example, if you have a central | |
387 | email server, you might relay to that host so that users don't have | |
388 | to have .forward files or aliases. You can do this using | |
389 | ||
28b51619 | 390 | define(`LOCAL_RELAY', mailer:hostname) |
4a51b074 | 391 | |
28b51619 EA |
392 | The ``mailer:'' can be omitted, in which case the mailer defaults to |
393 | "smtp". There are some user names that you don't want relayed, perhaps | |
394 | because of local aliases. A common example is root, which may be | |
395 | locally aliased. You can add entries to this list using | |
4a51b074 EA |
396 | |
397 | LOCAL_USER(usernames) | |
398 | ||
399 | This adds users to class L; you could also use something like | |
400 | ||
401 | FL/etc/sendmail.cL | |
402 | ||
34e49bd3 EA |
403 | If you want all mail sent to a centralized hub, as for a shared |
404 | /var/spool/mail scheme, use | |
405 | ||
28b51619 | 406 | define(`MAIL_HUB', mailer:hostname) |
34e49bd3 | 407 | |
28b51619 EA |
408 | Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY |
409 | and MAIL_HUB, unqualified names and names in class L will be sent to | |
410 | the LOCAL_RELAY and other local names will be sent to MAIL_HUB. For | |
411 | example, if are on machine mastodon.CS.Berkeley.EDU, the following | |
412 | combinations of settings will have the indicated effects: | |
34e49bd3 EA |
413 | |
414 | email sent to.... eric eric@mastodon.CS.Berkeley.EDU | |
415 | ||
416 | LOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) | |
417 | mail.CS.Berkeley.EDU | |
418 | ||
419 | MAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU | |
420 | mammoth.CS.Berkeley.EDU | |
421 | ||
422 | Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU | |
423 | MAIL_HUB set as above | |
424 | ||
28b51619 EA |
425 | |
426 | +-------------------------------+ | |
427 | | NON-SMTP BASED CONFIGURATIONS | | |
428 | +-------------------------------+ | |
429 | ||
430 | These configuration files are designed primarily for use by SMTP-based | |
431 | sites. I don't pretend that they are well tuned for UUCP-only or | |
432 | UUCP-primarily nodes (the latter is defined as a small local net | |
433 | connected to the rest of the world via UUCP). However, there is one | |
434 | hook to handle some special cases. | |
435 | ||
436 | You can define a ``smart host'' that understands a richer address syntax | |
437 | using: | |
438 | ||
439 | define(`SMART_HOST', mailer:hostname) | |
440 | ||
441 | In this case, the ``mailer:'' defaults to "suucp". Any messages that | |
442 | can't be handled using the usual UUCP rules are passed to this host. | |
443 | ||
444 | If you are on a local SMTP-based net that connects to the outside | |
445 | world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. | |
446 | For example: | |
447 | ||
448 | define(`SMART_HOST', suucp:uunet) | |
449 | LOCAL_NET_CONFIG | |
450 | R$* < @ $* .$m > $* $#smtp $@ $2.$m $: $1 < @ $2.$m > $3 | |
451 | ||
452 | This will cause all names that end in your domain name ($m) via | |
453 | SMTP; anything else will be sent via suucp (smart UUCP) to uunet. | |
454 | ||
455 | ||
a151c868 EA |
456 | +--------------------------------+ |
457 | | TWEAKING CONFIGURATION OPTIONS | | |
458 | +--------------------------------+ | |
459 | ||
460 | There are a large number of configuration options that don't normally | |
461 | need to be changed. However, if you feel you need to tweak them, you | |
462 | can define the following M4 variables. This list is shown in four | |
463 | columns: the name you define, the default value for that definition, | |
464 | the option or macro that is affected (either Ox for an option or Dx | |
465 | for a macro), and a brief description. Greater detail of the semantics | |
466 | can be found in the Installation and Operations Guide. | |
467 | ||
468 | M4 Variable Name Default Mac/Opt Description | |
469 | confMAILER_NAME MAILER-DAEMON Dn The sender name used for | |
470 | internally generated | |
471 | outgoing messages. | |
472 | confFROM_LINE From $?<$<$|$g$. $d The From_ line used when | |
473 | Dl sending to files or programs. | |
474 | confFROM_HEADER $?x$x <$g>$|$g$. The format of an internally | |
475 | Dq generated From: address. | |
476 | confOPERATORS .:%@!^/[] Do Address operator characters. | |
477 | confSTMP_LOGIN_MSG $j Sendmail $v/$Z ready at $b | |
478 | De The initial (spontaneous) | |
479 | SMTP greeting message. | |
480 | confEIGHT_BIT_INPUT False O8 Use 8-bit input? | |
481 | confALIAS_WAIT 10 Oa Wait (in minutes) for alias | |
482 | file rebuild. | |
bee9d799 EA |
483 | confMIN_FREE_BLOCKS 4 Ob Minimum number of free blocks |
484 | on queue filesystem to accept | |
485 | SMTP mail. | |
a151c868 EA |
486 | confBLANK_SUB . OB Blank (space) substitution |
487 | character. | |
488 | confCON_EXPENSIVE False Oc Connect immediately to | |
489 | mailers marked expensive? | |
490 | confCHECKPOINT_INTERVAL 10 OC Checkpoint queue files | |
491 | every N recipients. | |
492 | confDELIVERY_MODE background Od Default delivery mode. | |
493 | confAUTO_REBUILD False OD Automatically rebuild | |
494 | alias file if needed. | |
495 | confERROR_MODE (undefined) Oe Error message mode. | |
496 | confERROR_MESSAGE (undefined) OE Error message header/file. | |
497 | confSAVE_FROM_LINES False Of Save extra leading | |
498 | From_ lines. | |
499 | confTEMP_FILE_MODE 0600 OF Temporary file mode. | |
500 | confDEF_GROUP_ID 1 Og Default group id. | |
501 | confMATCH_GECOS False OG Match GECOS field. | |
502 | confMAX_HOP 17 Oh Maximum hop count. | |
503 | confIGNORE_DOTS False Oi Ignore dot as terminator | |
504 | for incoming messages? | |
505 | confBIND_OPTS (empty) OI Default options for BIND. | |
506 | confMCI_CACHE_SIZE 2 Ok Size of open connection cache. | |
507 | confMCI_CACHE_TIMEOUT 5m OK Open connection cache timeout. | |
508 | confLOG_LEVEL 9 OL Log level. | |
509 | confME_TOO False Om Include sender in group | |
510 | expansions. | |
511 | confCHECK_ALIASES True On Check RHS of aliases when | |
512 | running newaliases. | |
513 | confOLD_STYLE_HEADERS True Oo Assume that headers without | |
514 | special chars are old style. | |
bee9d799 | 515 | confPRIVACY_FLAGS public Op Privacy flags. |
a151c868 EA |
516 | confCOPY_ERRORS_TO (undefined) OP Address for additional copies |
517 | of all error messages. | |
518 | confQUEUE_FACTOR (undefined) Oq Slope of queue-only function | |
33f90dbe | 519 | confREAD_TIMEOUT (undefined) Or SMTP read timeouts. |
a151c868 EA |
520 | confSAFE_QUEUE True Os Commit all messages to disk |
521 | before forking. | |
522 | confMESSAGE_TIMEOUT 3d OT Timeout for messages before | |
523 | sending error message. | |
524 | confTIME_ZONE USE_SYSTEM Oz Time zone info -- can be | |
525 | USE_SYSTEM to use the system's | |
526 | idea, USE_TZ to use the user's | |
527 | TZ envariable, or something | |
528 | else to force that value. | |
529 | confDEF_USER_ID 1 Ou Default user id. | |
530 | confNO_WILDCARD_MX False Ow No wildcard MX records matches | |
531 | our domain. | |
532 | confQUEUE_LA 8 Ox Load average at which queue-only | |
533 | function kicks in. | |
534 | confREFUSE_LA 12 OX Load average at which incoming | |
535 | SMTP connections are refused. | |
536 | confSEPARATE_PROC False Oy Run all deliveries in a | |
537 | separate process. | |
538 | confWORK_RECIPIENT_FACTOR | |
539 | (undefined) OY Cost of each recipient. | |
540 | confWORK_CLASS_FACTOR (undefined) Oz Priority multiplier for class. | |
541 | confWORK_TIME_FACTOR (undefined) OZ Cost of each delivery attempt. | |
542 | ||
bee9d799 | 543 | |
4a51b074 EA |
544 | +-----------+ |
545 | | HIERARCHY | | |
546 | +-----------+ | |
7ace9d88 EA |
547 | |
548 | Within this directory are several subdirectories, to wit: | |
549 | ||
550 | m4 General support routines. These are typically | |
551 | very important and should not be changed without | |
fd82c288 | 552 | very careful consideration. |
7ace9d88 EA |
553 | |
554 | cf The configuration files themselves. They have | |
555 | ".mc" suffixes, and must be run through m4 to | |
556 | become complete. The resulting output should | |
557 | have a ".cf" suffix. | |
558 | ||
559 | ostype Definitions describing a particular operating | |
560 | system type. These should always be referenced | |
561 | using the OSTYPE macro in the .mc file. Examples | |
562 | include "bsd4.3", "bsd4.4", "sunos3.5", and | |
563 | "sunos4.1". | |
564 | ||
565 | domain Definitions describing a particular domain, referenced | |
566 | using the DOMAIN macro in the .mc file. These are | |
567 | site dependent; for example, we contribute "cs.exposed.m4" | |
568 | and "cs.hidden.m4" which both describe hosts in the | |
569 | CS.Berkeley.EDU subdomain; the former displays the local | |
570 | hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the | |
571 | latter does its best to hide the identity of the local | |
572 | workstation inside the CS subdomain. | |
573 | ||
574 | mailer Descriptions of mailers. These are referenced using | |
575 | the MAILER macro in the .mc file. | |
576 | ||
577 | sh Shell files used when building the .cf file from the | |
578 | .mc file in the cf subdirectory. | |
579 | ||
580 | feature These hold special orthogonal features that you might | |
581 | want to include. They should be referenced using | |
582 | the FEATURE macro. | |
583 | ||
584 | hack Local hacks. These can be referenced using the HACK | |
585 | macro. They shouldn't be of more than voyeuristic | |
586 | interest outside the .Berkeley.EDU domain, but who knows? | |
587 | We've all got our own peccadilloes. | |
588 | ||
9df1b56b EA |
589 | siteconfig Site configuration -- e.g., tables of locally connected |
590 | UUCP sites. | |
591 | ||
7ace9d88 | 592 | |
4a51b074 EA |
593 | +------------------------+ |
594 | | ADMINISTRATIVE DETAILS | | |
595 | +------------------------+ | |
7ace9d88 EA |
596 | |
597 | The following sections detail usage of certain internal parts of the | |
598 | sendmail.cf file. Read them carefully if you are trying to modify | |
599 | the current model. If you find the above descriptions adequate, these | |
600 | should be {boring, confusing, tedious, ridiculous} (pick one or more). | |
601 | ||
602 | RULESETS (* means built in to sendmail) | |
603 | ||
604 | 0 * Parsing | |
605 | 1 * Sender rewriting | |
606 | 2 * Recipient rewriting | |
607 | 3 * Canonicalization | |
608 | 4 * Post cleanup | |
f5baef19 | 609 | 5 * Local address rewrite (after aliasing) |
7ace9d88 | 610 | 6 Bottom half of Ruleset 3 |
fd82c288 EA |
611 | 7 Hook for recursive ruleset 0 call |
612 | 8 | |
613 | 9 | |
7ace9d88 EA |
614 | |
615 | ||
616 | MAILERS | |
617 | ||
618 | 0 local, prog local and program mailers | |
619 | 1 smtp SMTP channel | |
bee9d799 EA |
620 | 2 uucp UNIX-to-UNIX Copy Program |
621 | 3 netnews Network News delivery | |
7ace9d88 EA |
622 | |
623 | ||
624 | MACROS | |
625 | ||
626 | A | |
627 | B Bitnet Relay | |
628 | C CSNET Relay | |
f5baef19 | 629 | D The local domain -- usually not needed |
7ace9d88 EA |
630 | E |
631 | F | |
632 | G | |
34e49bd3 | 633 | H mail Hub (for mail clusters) |
7ace9d88 EA |
634 | I |
635 | J | |
636 | K | |
637 | L | |
638 | M Masquerade (who I claim to be) | |
639 | N | |
640 | O | |
641 | P | |
642 | Q | |
643 | R Relay (for unqualified names) | |
28b51619 | 644 | S Smart Host |
7ace9d88 | 645 | T |
c573210d EA |
646 | U my UUCP name (if I have a UUCP connection) |
647 | V UUCP Relay (class V hosts) | |
7ace9d88 EA |
648 | W UUCP Relay (class W hosts) |
649 | X UUCP Relay (class X hosts) | |
c573210d | 650 | Y UUCP Relay (all other hosts) |
7ace9d88 EA |
651 | Z Version number |
652 | ||
653 | ||
654 | CLASSES | |
655 | ||
656 | A | |
657 | B | |
658 | C | |
659 | D | |
4a51b074 | 660 | E addresses that should not seem to come from $M |
f5baef19 | 661 | F hosts we forward for |
7ace9d88 EA |
662 | G |
663 | H | |
664 | I | |
665 | J | |
666 | K | |
667 | L addresses that should not be forwarded to $R | |
668 | M | |
669 | N | |
670 | O operators that indicate network operations (cannot be in local names) | |
671 | P | |
672 | Q | |
673 | R | |
674 | S | |
675 | T | |
676 | U locally connected UUCP hosts | |
c573210d EA |
677 | V UUCP hosts connected to relay $V |
678 | W UUCP hosts connected to relay $W | |
679 | X UUCP hosts connected to relay $X | |
680 | Y locally connected smart UUCP hosts | |
7ace9d88 | 681 | Z |
f5baef19 | 682 | . the class containing only a dot |
7ace9d88 EA |
683 | |
684 | ||
685 | M4 DIVERSIONS | |
686 | ||
28b51619 EA |
687 | 1 Local host detection and resolution |
688 | 2 Local Ruleset 3 additions | |
689 | 3 Local Ruleset 0 additions | |
9df1b56b | 690 | 4 UUCP Ruleset 0 additions |
c573210d | 691 | 5 locally interpreted names (overrides $R) |
f5baef19 | 692 | 6 local configuration (at top of file) |
7ace9d88 | 693 | 7 mailer definitions |
f5baef19 | 694 | 8 special local name recognition (late in ruleset 3) |
bee9d799 | 695 | 9 special local name recognition (late in ruleset 0) |