15637ed4 |
1 | |
15637ed4 |
2 | |
78ed81a3 |
3 | NEW SENDMAIL CONFIGURATION FILES |
4 | |
5 | Eric Allman <eric@CS.Berkeley.EDU> |
6 | |
7 | @(#)README 8.3 (Berkeley) 7/13/93 |
8 | |
9 | |
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 |
13 | old versions of sendmail and cannot be expected to work well. |
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 | |
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 |
37 | "define(`FOO')" should work without my having to add a null value.] |
38 | |
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 | |
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 | |
52 | |
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 | |
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 | |
81 | The divert(-1) will delete the crud in the resulting output file. |
82 | The copyright notice is what your lawyers require. Our lawyers require |
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 |
87 | |
88 | include(`../m4/cf.m4') |
89 | |
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. |
94 | |
95 | VERSIONID(`<SCCS or RCS version id>') |
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 |
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. |
101 | |
102 | DOMAIN(cs.exposed) |
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 |
108 | local hostname. Internaly this is effected by using |
109 | "MASQUERADE_AS(CS.Berkeley.EDU)". |
110 | |
111 | MAILER(smtp) |
112 | |
113 | These describe the mailers used at the default CS site site. The |
114 | local mailer is always included automatically. |
115 | |
116 | |
117 | +--------+ |
118 | | OSTYPE | |
119 | +--------+ |
120 | |
121 | Note that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes |
122 | default Computer Science Division environment. There are several |
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. |
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(s). It can be a comma-separated |
134 | list of names. |
135 | HELP_FILE [/usr/lib/sendmail.hf] The name of the file |
136 | containing information printed in response to |
137 | the SMTP HELP command. |
138 | QUEUE_DIR [/var/spool/mqueue] The directory containing |
139 | queue files. |
140 | STATUS_FILE [/etc/sendmail.st] The file containing status |
141 | information. |
142 | LOCAL_MAILER_PATH [/usr/libexec/mail.local] The program used to |
143 | deliver local mail. |
144 | LOCAL_MAILER_FLAGS [rn] The flags used by the local mailer. The |
145 | flags lsDFMm are always included. |
146 | LOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local |
147 | mail. |
148 | LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. |
149 | LOCAL_SHELL_FLAGS [eu] The flags used by the shell mailer. The |
150 | flags lsDFM are always included. |
151 | LOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" |
152 | mail. |
153 | USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program |
154 | used to submit news. |
155 | USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. |
156 | USENET_MAILER_ARGS [-m -h -n] The command line arguments for the |
157 | usenet mailer. |
158 | SMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. |
159 | UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. |
160 | UUCP_MAILER_ARGS [uux - -r -z -a$f -gC $h!rmail ($u)] The arguments |
161 | passed to the UUCP mailer. |
162 | UUCP_MAX_SIZE [100000] The maximum size message accepted for |
163 | transmission by the UUCP mailers. |
164 | HOSTMAP_SPEC [dbm -o /etc/hostmap] The value for the builtin |
165 | hostmap key definition. You can redefine this |
166 | to change the class, flags, and filename of |
167 | the hostmap. The default flag (-o) makes this |
168 | map optional. |
169 | |
170 | In addition, the following boolean flags may be defined -- the value |
171 | is ignored. |
172 | |
173 | NEED_DOMAIN If set, the $j macro is defined as $w.$D. |
174 | If not set, $j is defined as $w. If this is |
175 | set, the domain must be defined using the line |
176 | DD<domainname> (probably in the domain file, |
177 | but possibly in the .mc file). You will only |
178 | need this if you define your system hostname |
179 | without a domain (type "hostname" -- if it |
180 | has no dots in the output, you qualify) AND |
181 | if you are not running the nameserver AND if |
182 | the first (canonical) name in /etc/hosts for |
183 | your machine has no domain -- OR if you are |
184 | running Ultrix or OSF/1 sendmail. Either of |
185 | these is probably a mistake. |
186 | |
187 | +---------+ |
188 | | DOMAINS | |
189 | +---------+ |
190 | |
191 | You will probably want to collect domain-dependent defines into one |
192 | file, referenced by the DOMAIN macro. For example, our Berkeley |
193 | domain file includes definitions for several internal distinguished |
194 | hosts: |
195 | |
196 | UUCP_RELAY The host that will forward UUCP-addressed email. |
197 | If not defined, all UUCP sites must be directly |
198 | connected. |
199 | BITNET_RELAY The host that will forward BITNET-addressed email. |
200 | If not defined, the .BITNET pseudo-domain won't work. |
201 | CSNET_RELAY The host that will forward CSNET-addressed email. |
202 | If not defined, the .CSNET pseudo-domain won't work. |
203 | LOCAL_RELAY The site that will handle unqualified names -- that |
204 | is, names with out an @domain extension. If not set, |
205 | they are assumed to belong on this machine. This |
206 | allows you to have a central site to store a |
207 | company- or department-wide alias database. This |
208 | only works at small sites, and there are better |
209 | methods. |
210 | |
211 | The domain file can also be used to define a domain name, if needed |
212 | (using "DD<domain>") and set certain site-wide features. If all hosts |
213 | at your site masquerade behind one email name, you could also use |
214 | MASQUERADE_AS here. |
215 | |
216 | You do not have to define a domain -- in particular, if you are a |
217 | single machine sitting off somewhere, it is probably more work than |
218 | it's worth. This is just a mechanism for combining "domain dependent |
219 | knowledge" into one place. |
220 | |
221 | +---------+ |
222 | | MAILERS | |
223 | +---------+ |
224 | |
225 | There are fewer mailers supported in this version than the previous |
226 | version, owing mostly to a simpler world. |
227 | |
228 | local The local and prog mailers. You will almost always |
229 | need these; the only exception is if you relay ALL |
230 | your mail to another site. This mailer is included |
231 | automatically. |
232 | |
233 | smtp The Simple Mail Transport Protocol mailer. This does |
234 | not hide hosts behind a gateway or another other |
235 | such hack; it assumes a world where everyone is |
236 | running the name server. This file actually defines |
237 | three mailers: "smtp" for regular (old-style) SMTP to |
238 | other servers, "esmtp" for extended SMTP to other |
239 | servers, and "relay" for transmission to our |
240 | RELAY_HOST or MAILER_HUB. |
241 | |
242 | uucp The Unix-to-Unix Copy Program mailer. Actually, this |
243 | defines two mailers, "uucp" and "suucp". The latter |
244 | is for when you know that the UUCP mailer at the other |
245 | end can handle multiple recipients in one transfer. |
246 | When you invoke this, sendmail looks for all names in |
247 | the $=U class and sends them to the uucp mailer; all |
248 | names in the $=Y class are sent to suucp. Note that |
249 | this is a function of what version of rmail runs on |
250 | the receiving end, and hence may be out of your control. |
251 | |
252 | usenet Usenet (network news) delivery. If this is specified, |
253 | an extra rule is added to ruleset 0 that forwards all |
254 | local email for users named ``group.usenet'' to the |
255 | ``inews'' program. Note that this works for all groups, |
256 | and may be considered a security problem. |
257 | |
258 | fax Facsimile transmission. This is experimental and based |
259 | on Sam Leffler's FlexFAX software. For more information, |
260 | see below. |
261 | |
262 | |
263 | +----------+ |
264 | | FEATURES | |
265 | +----------+ |
266 | |
267 | Special features can be requested using the "FEATURE" macro. For |
268 | example, the .mc line: |
269 | |
270 | FEATURE(use_cw_file) |
271 | |
272 | tells sendmail that you want to have it read an /etc/sendmail.cw |
273 | file to get values for class $=w. The FEATURE may contain a single |
274 | optional parameter -- for example: |
275 | |
276 | FEATURE(mailertable, dbm /usr/lib/mailertable) |
277 | |
278 | Available features are: |
279 | |
280 | use_cw_file Read the file /etc/sendmail.cw file to get alternate |
281 | names for this host. This might be used if you were |
282 | on a host that MXed for a dynamic set of other |
283 | hosts. If the set is static, just including the line |
284 | "Cw<name1> <name2> ..." is probably superior. |
285 | The actual filename can be overridden by redefining |
286 | confCW_FILE. |
287 | redirect Reject all mail addressed to "address.REDIRECT" with |
288 | a ``551 User not local; please try <address>'' message. |
289 | If this is set, you can alias people who have left |
290 | to their new address with ".REDIRECT" appended. |
291 | nouucp Don't do anything special with UUCP addresses at all. |
292 | nocanonify Don't pass addresses to $[ ... $] for canonification. |
293 | This would generally only be used by sites that only |
294 | act as mail gateways or which have user agents that do |
295 | full canonification themselves. |
296 | notsticky By default, email sent to "user@local.host" are marked |
297 | as "sticky" -- that is, the local addresses aren't |
298 | matched against UDB and don't go through ruleset 5. |
299 | This features disables this treatment. It would |
300 | normally be used on network gateway machines. |
301 | mailertable Include a "mailer table" which can be used to override |
302 | routing for particular domains. The argument of the |
303 | FEATURE may be the key definition. If none is specified, |
304 | the definition used is: |
305 | hash /etc/mailertable -o |
306 | Keys in this database are fully qualified domain names |
307 | or partial domains preceded by a dot -- for example, |
308 | "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". |
309 | Values must be of the form: |
310 | mailer:domain |
311 | where "mailer" is the internal mailer name, and "domain" |
312 | is where to send the message. These maps are not |
313 | reflected into the message header. |
314 | domaintable Include a "domain table" which can be used to provide |
315 | full domains on unqualified (single word) hosts. The |
316 | argument of the FEATURE may be the key definition. If |
317 | none is specified, the definition used is: |
318 | hash /etc/domaintable -o |
319 | The key in this table is the unqualified host name; the |
320 | value is the fully qualified domain. Anything in the |
321 | domaintable is reflected into headers; that is, this |
322 | is done in ruleset 3. |
323 | bitdomain Look up bitnet hosts in a table to try to turn them into |
324 | internet addresses. The table can be built using the |
325 | bitdomain program contributed by John Gardiner Meyers. |
326 | The argument of the FEATURE may be the key definition; if |
327 | none is specified, the definition used is: |
328 | hash /etc/bitdomain.db -o |
329 | Keys are the bitnet hostname; values are the corresponding |
330 | internet hostname. |
331 | uucpdomain Similar feature for UUCP hosts. The default map definition |
332 | is: |
333 | hash /etc/uudomain.db -o |
334 | At the moment there is no automagic tool to build this |
335 | database. |
336 | always_add_domain |
337 | Include the local host domain even on locally delivered |
338 | mail. Normally it is not added unless it is already |
339 | present. |
340 | allmasquerade If masquerading is enabled (using MASQUERADE_AS), this |
341 | feature will cause recipient addresses to also masquerade |
342 | as being from the masquerade host. Normally they get |
343 | the local hostname. Although this may be right for |
344 | ordinary users, it can break local aliases. For example, |
345 | if you send to "localalias", the originating sendmail will |
346 | find that alias and send to all members, but send the |
347 | message with "To: localalias@masqueradehost". Since that |
348 | alias likely does not exist, replies will fail. Use this |
349 | feature ONLY if you can guarantee that the ENTIRE |
350 | namespace on your masquerade host supersets all the |
351 | local entries. |
352 | |
353 | Other FEATUREs should be defined, but I was trying to keep these |
354 | config files fairly lean and mean. |
355 | |
356 | |
357 | +-------+ |
358 | | HACKS | |
359 | +-------+ |
360 | |
361 | Some things just can't be called features. To make this clear, |
362 | they go in the hack subdirectory and are referenced using the HACK |
363 | macro. These will tend to be site-dependent. The release |
364 | includes the Berkeley-dependent "cssubdomain" hack (that makes |
365 | sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; |
366 | this is intended as a short-term aid while we move hosts into |
367 | subdomains. |
368 | |
369 | |
370 | +--------------------+ |
371 | | SITE CONFIGURATION | |
372 | +--------------------+ |
373 | |
374 | Complex sites will need more local configuration information, such as |
375 | lists of UUCP hosts they speak with directly. This can get a bit more |
376 | tricky. For an example of a "complex" site, see cf/ucbvax.mc. |
377 | |
378 | The SITECONFIG macro allows you to indirectly reference site-dependent |
379 | configuration information stored in the siteconfig subdirectory. For |
380 | example, the line |
381 | |
382 | SITECONFIG(uucp.ucbvax, ucbvax, U) |
383 | |
384 | reads the file uucp.ucbvax for local connection information. The |
385 | second parameter is the local name (in this case just "ucbvax" since |
386 | it is locally connected, and hence a UUCP hostname) and the name of |
387 | the class in which to store the host information. Another SITECONFIG |
388 | line reads |
389 | |
390 | SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) |
391 | |
392 | This says that the file uucp.ucbarpa contains the list of UUCP sites |
393 | connected to ucbarpa.Berkeley.EDU. The $=W class will be used to |
394 | store this list. [The machine ucbarpa is gone now, but I've left |
395 | this out-of-date configuration file around to demonstrate how you |
396 | might do this.] |
397 | |
398 | The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing |
399 | more than a sequence of SITE macros describing connectivity. For |
400 | example: |
401 | |
402 | SITE(cnmat) |
403 | SITE(sgi olympus) |
404 | |
405 | The second example demonstrates that you can use two names on the |
406 | same line; these are usually aliases for the same host (or are at |
407 | least in the same company). |
408 | |
409 | |
410 | +-------------------+ |
411 | | TWEAKING RULESETS | |
412 | +-------------------+ |
15637ed4 |
413 | |
78ed81a3 |
414 | For more complex configurations, you can define special rules. |
415 | The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing |
416 | the names. Any modifications made here are reflected in the header. |
15637ed4 |
417 | |
78ed81a3 |
418 | A common use is to convert old UUCP addreses to SMTP addresses using |
419 | the UUCPSMTP macro. For example: |
15637ed4 |
420 | |
78ed81a3 |
421 | LOCAL_RULE_3 |
422 | UUCPSMTP(decvax, decvax.dec.com) |
423 | UUCPSMTP(research, research.att.com) |
15637ed4 |
424 | |
78ed81a3 |
425 | will cause addresses of the form "decvax!user" and "research!user" |
426 | to be converted to "user@decvax.dec.com" and "user@research.att.com" |
427 | respectively. |
15637ed4 |
428 | |
78ed81a3 |
429 | This could also be used to look hosts in a database map: |
15637ed4 |
430 | |
78ed81a3 |
431 | LOCAL_RULE_3 |
432 | R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 |
15637ed4 |
433 | |
78ed81a3 |
434 | This map would be defined in the LOCAL_CONFIG portion, as shown below. |
15637ed4 |
435 | |
78ed81a3 |
436 | Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. |
437 | For example, new rules are needed to parse hostnames that you accept |
438 | via MX records. For example, you might have: |
15637ed4 |
439 | |
78ed81a3 |
440 | LOCAL_RULE_0 |
441 | R$+ < @ cnmat.Berkeley.EDU > $#uucp $@ cnmat $: $1 |
15637ed4 |
442 | |
78ed81a3 |
443 | You would use this if you had installed an MX record for cnmat.Berkeley.EDU |
444 | pointing at this host; this rule catches the message and forwards it on |
445 | using UUCP. |
15637ed4 |
446 | |
78ed81a3 |
447 | You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. |
448 | These rulesets are normally empty. |
15637ed4 |
449 | |
78ed81a3 |
450 | A similar macro is LOCAL_CONFIG. This introduces lines added after the |
451 | boilerplate option setting but before rulesets, and can be used to |
452 | declare local database maps or whatever. For example: |
15637ed4 |
453 | |
78ed81a3 |
454 | LOCAL_CONFIG |
455 | Khostmap hash /etc/hostmap.db |
456 | Kyplocal nis -m hosts.byname |
15637ed4 |
457 | |
15637ed4 |
458 | |
78ed81a3 |
459 | +---------------------------+ |
460 | | MASQUERADING AND RELAYING | |
461 | +---------------------------+ |
15637ed4 |
462 | |
78ed81a3 |
463 | You can have your host masquerade as another using |
15637ed4 |
464 | |
78ed81a3 |
465 | MASQUERADE_AS(host.domain) |
15637ed4 |
466 | |
78ed81a3 |
467 | This causes outgoing SMTP mail to be labelled as coming from the |
468 | indicated domain, rather than $j. One normally masquerades as one |
469 | of your own subdomains (for example, it's unlikely that I would |
470 | choose to masquerade as an MIT site). |
15637ed4 |
471 | |
78ed81a3 |
472 | there are always users that need to be "exposed" -- that is, their |
473 | internal site name should be displayed instead of the masquerade name. |
474 | Root is an example. You can add users to this list using |
15637ed4 |
475 | |
78ed81a3 |
476 | EXPOSED_USER(usernames) |
15637ed4 |
477 | |
78ed81a3 |
478 | This adds users to class E; you could also use something like |
15637ed4 |
479 | |
78ed81a3 |
480 | FE/etc/sendmail.cE |
15637ed4 |
481 | |
78ed81a3 |
482 | You can also arrange to relay all unqualified names (that is, names |
483 | without @host) to a relay host. For example, if you have a central |
484 | email server, you might relay to that host so that users don't have |
485 | to have .forward files or aliases. You can do this using |
15637ed4 |
486 | |
78ed81a3 |
487 | define(`LOCAL_RELAY', mailer:hostname) |
15637ed4 |
488 | |
78ed81a3 |
489 | The ``mailer:'' can be omitted, in which case the mailer defaults to |
490 | "smtp". There are some user names that you don't want relayed, perhaps |
491 | because of local aliases. A common example is root, which may be |
492 | locally aliased. You can add entries to this list using |
15637ed4 |
493 | |
78ed81a3 |
494 | LOCAL_USER(usernames) |
15637ed4 |
495 | |
78ed81a3 |
496 | This adds users to class L; you could also use something like |
15637ed4 |
497 | |
78ed81a3 |
498 | FL/etc/sendmail.cL |
15637ed4 |
499 | |
78ed81a3 |
500 | If you want all mail sent to a centralized hub, as for a shared |
501 | /var/spool/mail scheme, use |
15637ed4 |
502 | |
78ed81a3 |
503 | define(`MAIL_HUB', mailer:hostname) |
15637ed4 |
504 | |
78ed81a3 |
505 | Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY |
506 | and MAIL_HUB, unqualified names and names in class L will be sent to |
507 | the LOCAL_RELAY and other local names will be sent to MAIL_HUB. For |
508 | example, if are on machine mastodon.CS.Berkeley.EDU, the following |
509 | combinations of settings will have the indicated effects: |
15637ed4 |
510 | |
78ed81a3 |
511 | email sent to.... eric eric@mastodon.CS.Berkeley.EDU |
15637ed4 |
512 | |
78ed81a3 |
513 | LOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) |
514 | mail.CS.Berkeley.EDU |
15637ed4 |
515 | |
78ed81a3 |
516 | MAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU |
517 | mammoth.CS.Berkeley.EDU |
15637ed4 |
518 | |
78ed81a3 |
519 | Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU |
520 | MAIL_HUB set as above |
15637ed4 |
521 | |
15637ed4 |
522 | |
78ed81a3 |
523 | +-------------------------------+ |
524 | | NON-SMTP BASED CONFIGURATIONS | |
525 | +-------------------------------+ |
15637ed4 |
526 | |
78ed81a3 |
527 | These configuration files are designed primarily for use by SMTP-based |
528 | sites. I don't pretend that they are well tuned for UUCP-only or |
529 | UUCP-primarily nodes (the latter is defined as a small local net |
530 | connected to the rest of the world via UUCP). However, there is one |
531 | hook to handle some special cases. |
15637ed4 |
532 | |
78ed81a3 |
533 | You can define a ``smart host'' that understands a richer address syntax |
534 | using: |
15637ed4 |
535 | |
78ed81a3 |
536 | define(`SMART_HOST', mailer:hostname) |
15637ed4 |
537 | |
78ed81a3 |
538 | In this case, the ``mailer:'' defaults to "suucp". Any messages that |
539 | can't be handled using the usual UUCP rules are passed to this host. |
15637ed4 |
540 | |
78ed81a3 |
541 | If you are on a local SMTP-based net that connects to the outside |
542 | world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. |
543 | For example: |
15637ed4 |
544 | |
78ed81a3 |
545 | define(`SMART_HOST', suucp:uunet) |
546 | LOCAL_NET_CONFIG |
547 | R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 |
15637ed4 |
548 | |
78ed81a3 |
549 | This will cause all names that end in your domain name ($m) via |
550 | SMTP; anything else will be sent via suucp (smart UUCP) to uunet. |
551 | If you have FEATURE(nocanonify), you may need to omit the dots after |
552 | the $m. If you are running a local DNS inside your domain which is |
553 | not otherwise connected to the outside world, you probably want to |
554 | use: |
15637ed4 |
555 | |
78ed81a3 |
556 | define(`SMART_HOST', smtp:fire.wall.com) |
557 | LOCAL_NET_CONFIG |
558 | R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 |
15637ed4 |
559 | |
78ed81a3 |
560 | That is, send directly only to things you found in your DNS lookup; |
561 | anything else goes through SMART_HOST. |
15637ed4 |
562 | |
15637ed4 |
563 | |
78ed81a3 |
564 | +------------------+ |
565 | | FlexFAX SOFTWARE | |
566 | +------------------+ |
15637ed4 |
567 | |
78ed81a3 |
568 | Sam Leffler's FlexFAX software is still in beta test -- but he expects a |
569 | public version out "later this week" [as of 3/1/93]. The following |
570 | blurb is direct from Sam: |
15637ed4 |
571 | |
78ed81a3 |
572 | $Header: /freefall/a/cvs/386BSD/src/usr.sbin/sendmail/cf/README,v 1.3 1993/07/30 17:20:26 nate Exp $ |
15637ed4 |
573 | |
78ed81a3 |
574 | How To Obtain This Software (in case all you get is this file) |
15637ed4 |
575 | |
78ed81a3 |
576 | The source code is available for public ftp on |
577 | sgi.com sgi/fax/v2.1beta.tar.Z |
578 | (192.48.153.1) |
15637ed4 |
579 | |
78ed81a3 |
580 | You can also obtain inst'able images for Silicon Graphics machines from |
581 | sgi.com sgi/fax/v2.1beta.inst.tar |
582 | (192.48.153.1) |
15637ed4 |
583 | |
78ed81a3 |
584 | For example, |
585 | % ftp -n sgi.com |
586 | .... |
587 | ftp> user anonymous |
588 | ... <type in password> |
589 | ftp> cd sgi/fax |
590 | ftp> binary |
591 | ftp> get v2.1beta.tar.Z |
15637ed4 |
592 | |
78ed81a3 |
593 | If you cannot use FTP at all, there is a service called "ftpmail" |
594 | available from gateekeeper.dec.com: you can send e-mail to this |
595 | machine and it will use FTP to retrieve files for you and send you the |
596 | files back again via e-mail. To find out more about the ftpmail |
597 | service, send a message to "ftpmail@gatekeeper.dec.com" whose body |
598 | consists of the single line "help". |
599 | |
600 | Internal to Silicon Graphics there are inst'able images on the host |
601 | flake.asd in the directory /d/dist. Thus you can do something like: |
602 | |
603 | % inst -f flake.asd.sgi.com:/d/dist/flexfax |
604 | |
605 | to install the software on your machine. |
606 | |
607 | The external distributions come in a compressed or uncompressed tar |
608 | file. To extract the source distribution: |
609 | |
610 | % zcat v2.1beta.tar.Z | tar xf - |
611 | |
612 | (uncompress and extract individual files in current directory). To |
613 | unpack and install the client portion of the inst'able distribution: |
614 | |
615 | % mkdir dist |
616 | % cd dist; tar xf ../v2.1beta.inst.tar; cd .. |
617 | % inst -f dist/flexfax |
618 | ... |
619 | inst> go |
620 | |
621 | (Note, the dist subdirectory is because some versions of inst fail if |
622 | the files are in the current directory.) Server binaries is also |
623 | included in the inst'able images as flexfax.server.*. It is not |
624 | installed by default, so to get it also you need to extract the do: |
625 | |
626 | % inst -f flexfax |
627 | ... |
628 | inst> install flexfax.server.* |
629 | inst> go |
630 | |
631 | The SGI binaries were built for Version 4.0.5 of the IRIX operating |
632 | system. They should work w/o problem on earlier versions of the |
633 | system, but I have not fully tested this. Also, note that to install a |
634 | server on an SGI machine, you need to have installed the Display |
635 | PostScript execution environment product (dps_eoe). Otherwise, the fax |
636 | server will not be able to convert PostScript to facsimile for |
637 | transmission. |
638 | |
639 | If you are working from the source distribution, look at the file README |
640 | in the top of the source tree. If you are working from the inst images, |
641 | you need to run faxaddmodem to setup and configure your fax modem. Do |
642 | man faxaddmodem for more information. |
643 | |
644 | Also from Sam: |
645 | |
646 | A mailing list for users of this software is located on sgi.com. |
647 | If you want to join this mailing list or have a list-related request |
648 | such as getting your name removed from it, send a request to |
649 | |
650 | flexfax-request@sgi.com |
651 | |
652 | Submissions (including bug reports) should be directed to: |
653 | |
654 | flexfax@sgi.com |
655 | |
656 | |
657 | +--------------------------------+ |
658 | | TWEAKING CONFIGURATION OPTIONS | |
659 | +--------------------------------+ |
660 | |
661 | There are a large number of configuration options that don't normally |
662 | need to be changed. However, if you feel you need to tweak them, you |
663 | can define the following M4 variables. This list is shown in four |
664 | columns: the name you define, the default value for that definition, |
665 | the option or macro that is affected (either Ox for an option or Dx |
666 | for a macro), and a brief description. Greater detail of the semantics |
667 | can be found in the Installation and Operations Guide. |
668 | |
669 | Some options are likely to be deprecated in future versions -- that is, |
670 | the option is only included to provide back-compatibility. These are |
671 | marked with "*". |
672 | |
673 | M4 Variable Name Default Mac/Opt Description |
674 | confMAILER_NAME MAILER-DAEMON Dn The sender name used for |
675 | internally generated |
676 | outgoing messages. |
677 | confFROM_LINE From $g $d Dl The From_ line used when |
678 | sending to files or programs. |
679 | confFROM_HEADER $?x$x <$g>$|$g$. The format of an internally |
680 | Dq generated From: address. |
681 | confOPERATORS .:%@!^/[] Do Address operator characters. |
682 | confSTMP_LOGIN_MSG $j Sendmail $v/$Z ready at $b |
683 | De The initial (spontaneous) |
684 | SMTP greeting message. |
685 | confSEVEN_BIT_INPUT False O7 Force input to seven bits? |
686 | confALIAS_WAIT 10 Oa Wait (in minutes) for alias |
687 | file rebuild. |
688 | confMIN_FREE_BLOCKS 4 Ob Minimum number of free blocks |
689 | on queue filesystem to accept |
690 | SMTP mail. |
691 | confBLANK_SUB . OB Blank (space) substitution |
692 | character. |
693 | confCON_EXPENSIVE False Oc Connect immediately to |
694 | mailers marked expensive? |
695 | confCHECKPOINT_INTERVAL 10 OC Checkpoint queue files |
696 | every N recipients. |
697 | confDELIVERY_MODE background Od Default delivery mode. |
698 | confAUTO_REBUILD False OD Automatically rebuild |
699 | alias file if needed. |
700 | confERROR_MODE (undefined) Oe Error message mode. |
701 | confERROR_MESSAGE (undefined) OE Error message header/file. |
702 | confSAVE_FROM_LINES False Of Save extra leading |
703 | From_ lines. |
704 | confTEMP_FILE_MODE 0600 OF Temporary file mode. |
705 | confDEF_GROUP_ID 1 Og Default group id. |
706 | confMATCH_GECOS False OG Match GECOS field. |
707 | confMAX_HOP 17 Oh Maximum hop count. |
708 | confIGNORE_DOTS False Oi * Ignore dot as terminator |
709 | for incoming messages? |
710 | confBIND_OPTS (empty) OI Default options for BIND. |
711 | confMIME_FORMAT_ERRORS True Oj * Send error messages as MIME- |
712 | encapsulated messages per |
713 | RFC 1344. |
714 | confMCI_CACHE_SIZE 2 Ok Size of open connection cache. |
715 | confMCI_CACHE_TIMEOUT 5m OK Open connection cache timeout. |
716 | confUSE_ERRORS_TO False Ol * Use the Errors-To: header to |
717 | deliver error messages. This |
718 | should not be necessary because |
719 | of general acceptance of the |
720 | envelope/header distinction. |
721 | confLOG_LEVEL 9 OL Log level. |
722 | confME_TOO False Om Include sender in group |
723 | expansions. |
724 | confCHECK_ALIASES True On Check RHS of aliases when |
725 | running newaliases. |
726 | confOLD_STYLE_HEADERS True Oo * Assume that headers without |
727 | special chars are old style. |
728 | confDAEMON_OPTIONS (undefined) OO SMTP daemon options. |
729 | confPRIVACY_FLAGS authwarnings Op Privacy flags. |
730 | confCOPY_ERRORS_TO (undefined) OP Address for additional copies |
731 | of all error messages. |
732 | confQUEUE_FACTOR (undefined) Oq Slope of queue-only function |
733 | confREAD_TIMEOUT (undefined) Or SMTP read timeouts. |
734 | confSAFE_QUEUE True Os * Commit all messages to disk |
735 | before forking. |
736 | confMESSAGE_TIMEOUT 5d/4h OT Timeout for messages before |
737 | sending error/warning message. |
738 | confTIME_ZONE USE_SYSTEM Ot Time zone info -- can be |
739 | USE_SYSTEM to use the system's |
740 | idea, USE_TZ to use the user's |
741 | TZ envariable, or something |
742 | else to force that value. |
743 | confDEF_USER_ID 1 Ou Default user id. |
744 | confUSERDB_SPEC (undefined) OU User database specification. |
745 | confFALLBACK_MX (undefined) OV Fallback MX host. |
746 | confQUEUE_LA 8 Ox Load average at which queue-only |
747 | function kicks in. |
748 | confREFUSE_LA 12 OX Load average at which incoming |
749 | SMTP connections are refused. |
750 | confWORK_RECIPIENT_FACTOR |
751 | (undefined) Oy Cost of each recipient. |
752 | confSEPARATE_PROC False OY Run all deliveries in a |
753 | separate process. |
754 | confWORK_CLASS_FACTOR (undefined) Oz Priority multiplier for class. |
755 | confWORK_TIME_FACTOR (undefined) OZ Cost of each delivery attempt. |
756 | confCW_FILE /etc/sendmail.cw Name of file used to get the |
757 | Fw local additions to the $=w |
758 | class. |
759 | |
760 | |
761 | +-----------+ |
762 | | HIERARCHY | |
763 | +-----------+ |
764 | |
765 | Within this directory are several subdirectories, to wit: |
766 | |
767 | m4 General support routines. These are typically |
768 | very important and should not be changed without |
769 | very careful consideration. |
770 | |
771 | cf The configuration files themselves. They have |
772 | ".mc" suffixes, and must be run through m4 to |
773 | become complete. The resulting output should |
774 | have a ".cf" suffix. |
775 | |
776 | ostype Definitions describing a particular operating |
777 | system type. These should always be referenced |
778 | using the OSTYPE macro in the .mc file. Examples |
779 | include "bsd4.3", "bsd4.4", "sunos3.5", and |
780 | "sunos4.1". |
781 | |
782 | domain Definitions describing a particular domain, referenced |
783 | using the DOMAIN macro in the .mc file. These are |
784 | site dependent; for example, we contribute "cs.exposed.m4" |
785 | and "cs.hidden.m4" which both describe hosts in the |
786 | CS.Berkeley.EDU subdomain; the former displays the local |
787 | hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the |
788 | latter does its best to hide the identity of the local |
789 | workstation inside the CS subdomain. |
790 | |
791 | mailer Descriptions of mailers. These are referenced using |
792 | the MAILER macro in the .mc file. |
793 | |
794 | sh Shell files used when building the .cf file from the |
795 | .mc file in the cf subdirectory. |
796 | |
797 | feature These hold special orthogonal features that you might |
798 | want to include. They should be referenced using |
799 | the FEATURE macro. |
800 | |
801 | hack Local hacks. These can be referenced using the HACK |
802 | macro. They shouldn't be of more than voyeuristic |
803 | interest outside the .Berkeley.EDU domain, but who knows? |
804 | We've all got our own peccadilloes. |
805 | |
806 | siteconfig Site configuration -- e.g., tables of locally connected |
807 | UUCP sites. |
808 | |
809 | |
810 | +------------------------+ |
811 | | ADMINISTRATIVE DETAILS | |
812 | +------------------------+ |
813 | |
814 | The following sections detail usage of certain internal parts of the |
815 | sendmail.cf file. Read them carefully if you are trying to modify |
816 | the current model. If you find the above descriptions adequate, these |
817 | should be {boring, confusing, tedious, ridiculous} (pick one or more). |
818 | |
819 | RULESETS (* means built in to sendmail) |
820 | |
821 | 0 * Parsing |
822 | 1 * Sender rewriting |
823 | 2 * Recipient rewriting |
824 | 3 * Canonicalization |
825 | 4 * Post cleanup |
826 | 5 * Local address rewrite (after aliasing) |
827 | 1x mailer rules (sender qualification) |
828 | 2x mailer rules (recipient qualification) |
829 | 90 Mailertable host stripping |
830 | 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) |
831 | 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) |
832 | |
833 | |
834 | MAILERS |
835 | |
836 | 0 local, prog local and program mailers |
837 | 1 smtp SMTP channel |
838 | 2 uucp UNIX-to-UNIX Copy Program |
839 | 3 netnews Network News delivery |
840 | 4 fax Sam Leffler's FlexFAX software |
841 | |
842 | |
843 | MACROS |
844 | |
845 | A |
846 | B Bitnet Relay |
847 | C CSNET Relay |
848 | D The local domain -- usually not needed |
849 | E |
850 | F FAX Relay |
851 | G |
852 | H mail Hub (for mail clusters) |
853 | I |
854 | J |
855 | K |
856 | L |
857 | M Masquerade (who I claim to be) |
858 | N |
859 | O |
860 | P |
861 | Q |
862 | R Relay (for unqualified names) |
863 | S Smart Host |
864 | T |
865 | U my UUCP name (if I have a UUCP connection) |
866 | V UUCP Relay (class V hosts) |
867 | W UUCP Relay (class W hosts) |
868 | X UUCP Relay (class X hosts) |
869 | Y UUCP Relay (all other hosts) |
870 | Z Version number |
871 | |
872 | |
873 | CLASSES |
874 | |
875 | A |
876 | B |
877 | C |
878 | D |
879 | E addresses that should not seem to come from $M |
880 | F hosts we forward for |
881 | G |
882 | H |
883 | I |
884 | J |
885 | K |
886 | L addresses that should not be forwarded to $R |
887 | M |
888 | N |
889 | O operators that indicate network operations (cannot be in local names) |
890 | P top level pseudo-domains: BITNET, FAX, UUCP, etc. |
891 | Q |
892 | R |
893 | S |
894 | T |
895 | U locally connected UUCP hosts |
896 | V UUCP hosts connected to relay $V |
897 | W UUCP hosts connected to relay $W |
898 | X UUCP hosts connected to relay $X |
899 | Y locally connected smart UUCP hosts |
900 | Z |
901 | . the class containing only a dot |
902 | |
903 | |
904 | M4 DIVERSIONS |
905 | |
906 | 1 Local host detection and resolution |
907 | 2 Local Ruleset 3 additions |
908 | 3 Local Ruleset 0 additions |
909 | 4 UUCP Ruleset 0 additions |
910 | 5 locally interpreted names (overrides $R) |
911 | 6 local configuration (at top of file) |
912 | 7 mailer definitions |
913 | 8 special local name recognition (late in ruleset 3) |
914 | 9 special local rulesets (1 and 2) |