Commit | Line | Data |
---|---|---|
15637ed4 | 1 | |
15637ed4 | 2 | |
6f14531a RG |
3 | NEW SENDMAIL CONFIGURATION FILES |
4 | ||
5 | Eric Allman <eric@CS.Berkeley.EDU> | |
6 | ||
d7c7bc4c | 7 | @(#)README 8.27 (Berkeley) 3/12/94 |
6f14531a RG |
8 | |
9 | ||
10 | This document describes the sendmail configuration files being used | |
d747e748 | 11 | at Berkeley. These use features in the new (R8) sendmail, and although |
6f14531a RG |
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 | |
d7c7bc4c | 16 | versions, and don't handle as many of the weird cases automagically. |
6f14531a RG |
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 | ||
d7c7bc4c AM |
26 | Of course, the downside of this is that if you do live in a weird |
27 | world, things are going to get weirder for you. I'm sorry about that, | |
6f14531a RG |
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. | |
042b8fbf AM |
34 | SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 |
35 | also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't | |
36 | work -- you'll have to use a Net/2 or GNU version. | |
6f14531a RG |
37 | |
38 | IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run | |
d747e748 JH |
39 | "m4 foo.mc > foo.cf" -- that should be all you need. There is also |
40 | a fairly crude (but functional) Makefile.dist that works on the | |
41 | old version of make. | |
6f14531a RG |
42 | |
43 | To get started, you may want to look at tcpproto.mc (for TCP-only | |
d747e748 JH |
44 | sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for |
45 | clusters of clients using a single mail host). Others are versions | |
6f14531a RG |
46 | that we use at Berkeley, although not all are in current use. For |
47 | example, ucbarpa has gone away, but I've left ucbarpa.mc in because | |
48 | it demonstrates some interesting techniques. | |
49 | ||
50 | I'm not pretending that this README describes everything that these | |
51 | configuration files can do; clever people can probably tweak them | |
52 | to great effect. But it should get you started. | |
53 | ||
042b8fbf AM |
54 | ******************************************************************* |
55 | *** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** | |
56 | *** Berkeley-specific assumptions built in, such as the name *** | |
57 | *** of our UUCP-relay. You'll want to create your own domain *** | |
58 | *** description, and use that in place of domain/Berkeley.m4. *** | |
59 | ******************************************************************* | |
60 | ||
6f14531a RG |
61 | |
62 | +--------------------------+ | |
63 | | INTRODUCTION AND EXAMPLE | | |
64 | +--------------------------+ | |
65 | ||
66 | Configuration files are contained in the subdirectory "cf", with a | |
67 | suffix ".mc". They must be run through "m4" to produce a ".cf" file. | |
68 | ||
69 | Let's examine a typical .mc file (cf/cs-exposed.mc): | |
70 | ||
71 | divert(-1) | |
72 | # | |
73 | # Copyright (c) 1983 Eric P. Allman | |
74 | # Copyright (c) 1988 The Regents of the University of California. | |
75 | # All rights reserved. | |
76 | # | |
77 | # Redistribution and use in source and binary forms are permitted | |
78 | # provided that the above copyright notice and this paragraph are | |
79 | # duplicated in all such forms and that any documentation, | |
80 | # advertising materials, and other materials related to such | |
81 | # distribution and use acknowledge that the software was developed | |
82 | # by the University of California, Berkeley. The name of the | |
83 | # University may not be used to endorse or promote products derived | |
84 | # from this software without specific prior written permission. | |
85 | # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR | |
86 | # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED | |
87 | # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. | |
88 | # | |
89 | ||
90 | The divert(-1) will delete the crud in the resulting output file. | |
91 | The copyright notice is what your lawyers require. Our lawyers require | |
92 | the one that I've included in my files. A copyleft is a copyright by | |
93 | another name. | |
94 | ||
95 | The next line MUST be | |
96 | ||
97 | include(`../m4/cf.m4') | |
98 | ||
99 | This will pull in the M4 macros you will need to make sense of | |
100 | everything else. As the saying goes, don't think about it, just | |
101 | do it. If you don't do it, don't bother reading the rest of this | |
102 | file. | |
103 | ||
104 | VERSIONID(`<SCCS or RCS version id>') | |
105 | ||
106 | VERSIONID is a macro that stuffs the version information into the | |
107 | resulting file. We use SCCS; you could use RCS, something else, or | |
108 | omit it completely. This is not the same as the version id included | |
109 | in SMTP greeting messages -- this is defined in m4/version.m4. | |
110 | ||
111 | DOMAIN(cs.exposed) | |
112 | ||
113 | This example exposes the host inside of the CS subdomain -- that is, | |
114 | it doesn't try to hide the name of the workstation to the outside | |
115 | world. Changing this to DOMAIN(cs.hidden) would have made outgoing | |
116 | messages refer to "<username>@CS.Berkeley.EDU" instead of using the | |
d747e748 | 117 | local hostname. Internally this is effected by using |
6f14531a RG |
118 | "MASQUERADE_AS(CS.Berkeley.EDU)". |
119 | ||
120 | MAILER(smtp) | |
121 | ||
122 | These describe the mailers used at the default CS site site. The | |
123 | local mailer is always included automatically. | |
124 | ||
125 | ||
126 | +--------+ | |
127 | | OSTYPE | | |
128 | +--------+ | |
129 | ||
130 | Note that cf/cs-exposed.mc omits an OSTYPE macro -- this assumes | |
131 | default Computer Science Division environment. There are several | |
132 | explicit environments available: bsd4.3, bsd4.4, hpux, irix, osf1, | |
133 | riscos4.5, sunos3.5, sunos4.1, and ultrix4.1. These change things | |
134 | like the location of the alias file and queue directory. Some of | |
135 | these files are identical to one another. | |
136 | ||
137 | Operating system definitions are easy to write. They may define | |
138 | the following variables (everything defaults, so an ostype file | |
139 | may be empty). | |
140 | ||
141 | ALIAS_FILE [/etc/aliases] The location of the text version | |
142 | of the alias file(s). It can be a comma-separated | |
143 | list of names. | |
144 | HELP_FILE [/usr/lib/sendmail.hf] The name of the file | |
145 | containing information printed in response to | |
146 | the SMTP HELP command. | |
147 | QUEUE_DIR [/var/spool/mqueue] The directory containing | |
148 | queue files. | |
149 | STATUS_FILE [/etc/sendmail.st] The file containing status | |
150 | information. | |
d747e748 JH |
151 | LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. |
152 | LOCAL_MAILER_FLAGS [rmn] The flags used by the local mailer. The | |
153 | flags lsDFM are always included. | |
3a363396 NW |
154 | LOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local |
155 | mail. | |
6f14531a | 156 | LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. |
3a363396 NW |
157 | LOCAL_SHELL_FLAGS [eu] The flags used by the shell mailer. The |
158 | flags lsDFM are always included. | |
159 | LOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" | |
160 | mail. | |
6f14531a RG |
161 | USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program |
162 | used to submit news. | |
163 | USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. | |
164 | USENET_MAILER_ARGS [-m -h -n] The command line arguments for the | |
165 | usenet mailer. | |
d7c7bc4c AM |
166 | USENET_MAILER_MAX [100000] The maximum size of messages that will |
167 | be accepted by the usenet mailer. | |
d747e748 JH |
168 | SMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. Default |
169 | flags are `mDFMUX' (and `a' for esmtp mailer). | |
d7c7bc4c AM |
170 | SMTP_MAILER_MAX [undefined] The maximum size of messages that will |
171 | be transported using the smtp or esmtp mailers. | |
d747e748 JH |
172 | UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default |
173 | flags are `DFMhuU' (and `m' for suucp mailer, minus | |
174 | `U' for uucp-dom mailer). | |
3a363396 NW |
175 | UUCP_MAILER_ARGS [uux - -r -z -a$f -gC $h!rmail ($u)] The arguments |
176 | passed to the UUCP mailer. | |
177 | UUCP_MAX_SIZE [100000] The maximum size message accepted for | |
178 | transmission by the UUCP mailers. | |
d7c7bc4c AM |
179 | FAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to |
180 | submit FAX messages. | |
181 | FAX_MAILER_MAX [100000] The maximum size message accepted for | |
182 | transmission by FAX. | |
6f14531a | 183 | |
6f14531a RG |
184 | +---------+ |
185 | | DOMAINS | | |
186 | +---------+ | |
187 | ||
188 | You will probably want to collect domain-dependent defines into one | |
189 | file, referenced by the DOMAIN macro. For example, our Berkeley | |
190 | domain file includes definitions for several internal distinguished | |
191 | hosts: | |
192 | ||
193 | UUCP_RELAY The host that will forward UUCP-addressed email. | |
194 | If not defined, all UUCP sites must be directly | |
195 | connected. | |
196 | BITNET_RELAY The host that will forward BITNET-addressed email. | |
197 | If not defined, the .BITNET pseudo-domain won't work. | |
6f14531a RG |
198 | LOCAL_RELAY The site that will handle unqualified names -- that |
199 | is, names with out an @domain extension. If not set, | |
200 | they are assumed to belong on this machine. This | |
201 | allows you to have a central site to store a | |
202 | company- or department-wide alias database. This | |
203 | only works at small sites, and there are better | |
204 | methods. | |
205 | ||
d747e748 JH |
206 | Each of these can be either ``mailer:hostname'' (in which case the |
207 | mailer is the internal mailer name, such as ``suucp'' and the hostname | |
208 | is the name of the host as appropriate for that mailer) or just a | |
209 | ``hostname'', in which case a default mailer type (usually ``relay'', | |
210 | a variant on SMTP) is used. WARNING: if you have a wildcard MX | |
211 | record matching your domain, you probably want to define these to | |
212 | have a trailing dot so that you won't get the mail diverted back | |
213 | to yourself. | |
214 | ||
6f14531a RG |
215 | The domain file can also be used to define a domain name, if needed |
216 | (using "DD<domain>") and set certain site-wide features. If all hosts | |
217 | at your site masquerade behind one email name, you could also use | |
218 | MASQUERADE_AS here. | |
219 | ||
220 | You do not have to define a domain -- in particular, if you are a | |
221 | single machine sitting off somewhere, it is probably more work than | |
222 | it's worth. This is just a mechanism for combining "domain dependent | |
223 | knowledge" into one place. | |
224 | ||
225 | +---------+ | |
226 | | MAILERS | | |
227 | +---------+ | |
228 | ||
229 | There are fewer mailers supported in this version than the previous | |
230 | version, owing mostly to a simpler world. | |
231 | ||
232 | local The local and prog mailers. You will almost always | |
233 | need these; the only exception is if you relay ALL | |
234 | your mail to another site. This mailer is included | |
235 | automatically. | |
236 | ||
237 | smtp The Simple Mail Transport Protocol mailer. This does | |
238 | not hide hosts behind a gateway or another other | |
239 | such hack; it assumes a world where everyone is | |
3a363396 NW |
240 | running the name server. This file actually defines |
241 | three mailers: "smtp" for regular (old-style) SMTP to | |
242 | other servers, "esmtp" for extended SMTP to other | |
243 | servers, and "relay" for transmission to our | |
244 | RELAY_HOST or MAILER_HUB. | |
6f14531a RG |
245 | |
246 | uucp The Unix-to-Unix Copy Program mailer. Actually, this | |
247 | defines two mailers, "uucp" and "suucp". The latter | |
248 | is for when you know that the UUCP mailer at the other | |
249 | end can handle multiple recipients in one transfer. | |
250 | When you invoke this, sendmail looks for all names in | |
042b8fbf AM |
251 | the $=U class and sends them to the uucp-old mailer; all |
252 | names in the $=Y class are sent to uucp-new; and all | |
253 | names in the $=Z class are sent to uucp-uudom. Note that | |
6f14531a RG |
254 | this is a function of what version of rmail runs on |
255 | the receiving end, and hence may be out of your control. | |
042b8fbf AM |
256 | If smtp is defined, it also defines "uucp-dom" and |
257 | "uucp-uudom" mailers that use domain-style rewriting. | |
258 | See the section below describing UUCP mailers in more | |
259 | detail. | |
6f14531a RG |
260 | |
261 | usenet Usenet (network news) delivery. If this is specified, | |
262 | an extra rule is added to ruleset 0 that forwards all | |
263 | local email for users named ``group.usenet'' to the | |
264 | ``inews'' program. Note that this works for all groups, | |
265 | and may be considered a security problem. | |
266 | ||
267 | fax Facsimile transmission. This is experimental and based | |
268 | on Sam Leffler's FlexFAX software. For more information, | |
269 | see below. | |
270 | ||
042b8fbf AM |
271 | pop Post Office Protocol. |
272 | ||
6f14531a RG |
273 | |
274 | +----------+ | |
275 | | FEATURES | | |
276 | +----------+ | |
277 | ||
278 | Special features can be requested using the "FEATURE" macro. For | |
279 | example, the .mc line: | |
280 | ||
281 | FEATURE(use_cw_file) | |
282 | ||
283 | tells sendmail that you want to have it read an /etc/sendmail.cw | |
284 | file to get values for class $=w. The FEATURE may contain a single | |
285 | optional parameter -- for example: | |
286 | ||
287 | FEATURE(mailertable, dbm /usr/lib/mailertable) | |
288 | ||
289 | Available features are: | |
290 | ||
291 | use_cw_file Read the file /etc/sendmail.cw file to get alternate | |
292 | names for this host. This might be used if you were | |
293 | on a host that MXed for a dynamic set of other | |
294 | hosts. If the set is static, just including the line | |
295 | "Cw<name1> <name2> ..." is probably superior. | |
296 | The actual filename can be overridden by redefining | |
297 | confCW_FILE. | |
d747e748 | 298 | |
6f14531a RG |
299 | redirect Reject all mail addressed to "address.REDIRECT" with |
300 | a ``551 User not local; please try <address>'' message. | |
301 | If this is set, you can alias people who have left | |
302 | to their new address with ".REDIRECT" appended. | |
d747e748 | 303 | |
6f14531a | 304 | nouucp Don't do anything special with UUCP addresses at all. |
d747e748 | 305 | |
6f14531a RG |
306 | nocanonify Don't pass addresses to $[ ... $] for canonification. |
307 | This would generally only be used by sites that only | |
308 | act as mail gateways or which have user agents that do | |
d747e748 JH |
309 | full canonification themselves. You may also want to |
310 | use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to | |
311 | turn off the usual resolver options that do a similar | |
312 | thing. | |
313 | ||
6f14531a RG |
314 | notsticky By default, email sent to "user@local.host" are marked |
315 | as "sticky" -- that is, the local addresses aren't | |
316 | matched against UDB and don't go through ruleset 5. | |
317 | This features disables this treatment. It would | |
318 | normally be used on network gateway machines. | |
d747e748 | 319 | |
6f14531a RG |
320 | mailertable Include a "mailer table" which can be used to override |
321 | routing for particular domains. The argument of the | |
322 | FEATURE may be the key definition. If none is specified, | |
323 | the definition used is: | |
d747e748 | 324 | hash -o /etc/mailertable |
3a363396 NW |
325 | Keys in this database are fully qualified domain names |
326 | or partial domains preceded by a dot -- for example, | |
327 | "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". | |
328 | Values must be of the form: | |
6f14531a | 329 | mailer:domain |
3a363396 NW |
330 | where "mailer" is the internal mailer name, and "domain" |
331 | is where to send the message. These maps are not | |
332 | reflected into the message header. | |
d747e748 | 333 | |
3a363396 NW |
334 | domaintable Include a "domain table" which can be used to provide |
335 | full domains on unqualified (single word) hosts. The | |
336 | argument of the FEATURE may be the key definition. If | |
337 | none is specified, the definition used is: | |
d747e748 | 338 | hash -o /etc/domaintable |
3a363396 NW |
339 | The key in this table is the unqualified host name; the |
340 | value is the fully qualified domain. Anything in the | |
341 | domaintable is reflected into headers; that is, this | |
342 | is done in ruleset 3. | |
d747e748 | 343 | |
6f14531a RG |
344 | bitdomain Look up bitnet hosts in a table to try to turn them into |
345 | internet addresses. The table can be built using the | |
d747e748 | 346 | bitdomain program contributed by John Gardiner Myers. |
6f14531a RG |
347 | The argument of the FEATURE may be the key definition; if |
348 | none is specified, the definition used is: | |
d747e748 | 349 | hash -o /etc/bitdomain.db |
6f14531a RG |
350 | Keys are the bitnet hostname; values are the corresponding |
351 | internet hostname. | |
d747e748 | 352 | |
6f14531a RG |
353 | uucpdomain Similar feature for UUCP hosts. The default map definition |
354 | is: | |
d747e748 | 355 | hash -o /etc/uudomain.db |
6f14531a RG |
356 | At the moment there is no automagic tool to build this |
357 | database. | |
d747e748 | 358 | |
6f14531a RG |
359 | always_add_domain |
360 | Include the local host domain even on locally delivered | |
361 | mail. Normally it is not added unless it is already | |
362 | present. | |
d747e748 | 363 | |
3a363396 NW |
364 | allmasquerade If masquerading is enabled (using MASQUERADE_AS), this |
365 | feature will cause recipient addresses to also masquerade | |
366 | as being from the masquerade host. Normally they get | |
367 | the local hostname. Although this may be right for | |
368 | ordinary users, it can break local aliases. For example, | |
369 | if you send to "localalias", the originating sendmail will | |
370 | find that alias and send to all members, but send the | |
371 | message with "To: localalias@masqueradehost". Since that | |
372 | alias likely does not exist, replies will fail. Use this | |
373 | feature ONLY if you can guarantee that the ENTIRE | |
374 | namespace on your masquerade host supersets all the | |
375 | local entries. | |
6f14531a | 376 | |
d747e748 JH |
377 | nodns We aren't running DNS at our site (for example, |
378 | we are UUCP-only connected). It's hard to consider | |
379 | this a "feature", but hey, it had to go somewhere. | |
380 | ||
381 | nullclient This is a special case -- it creates a stripped down | |
382 | configuration file containing nothing but support for | |
383 | forwarding all mail to a central hub via a local | |
384 | SMTP-based network. The argument is the name of that | |
385 | hub. | |
386 | ||
387 | The only other feature that should be used in conjunction | |
388 | with this one is "nocanonify" (this causes addresses to | |
389 | be sent unqualified via the SMTP connection; normally | |
390 | they are qualifed with the masquerade name, which | |
391 | defaults to the name of the hub machine). No mailers | |
392 | should be defined. No aliasing or forwarding is done. | |
6f14531a RG |
393 | |
394 | ||
395 | +-------+ | |
396 | | HACKS | | |
397 | +-------+ | |
398 | ||
399 | Some things just can't be called features. To make this clear, | |
400 | they go in the hack subdirectory and are referenced using the HACK | |
401 | macro. These will tend to be site-dependent. The release | |
402 | includes the Berkeley-dependent "cssubdomain" hack (that makes | |
403 | sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; | |
404 | this is intended as a short-term aid while we move hosts into | |
405 | subdomains. | |
406 | ||
407 | ||
408 | +--------------------+ | |
409 | | SITE CONFIGURATION | | |
410 | +--------------------+ | |
411 | ||
412 | Complex sites will need more local configuration information, such as | |
413 | lists of UUCP hosts they speak with directly. This can get a bit more | |
414 | tricky. For an example of a "complex" site, see cf/ucbvax.mc. | |
415 | ||
d7c7bc4c AM |
416 | If your host is known by several different names, you need to augment |
417 | the $=w class. This is a list of names by which you are known, and | |
418 | anything sent to an address using a host name in this list will be | |
419 | treated as local mail. You can do this in two ways: either create | |
420 | the file /etc/sendmail.cw containing a list of your aliases (one per | |
421 | line), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the | |
422 | line: | |
423 | ||
424 | Cw alias.host.name | |
425 | ||
426 | at the end of that file. See the ``vangogh.mc'' file for an example. | |
427 | Be sure you use the fully-qualified name of the host, rather than a | |
428 | short name. | |
429 | ||
6f14531a RG |
430 | The SITECONFIG macro allows you to indirectly reference site-dependent |
431 | configuration information stored in the siteconfig subdirectory. For | |
432 | example, the line | |
433 | ||
434 | SITECONFIG(uucp.ucbvax, ucbvax, U) | |
435 | ||
436 | reads the file uucp.ucbvax for local connection information. The | |
437 | second parameter is the local name (in this case just "ucbvax" since | |
d7c7bc4c AM |
438 | it is locally connected, and hence a UUCP hostname). The third |
439 | parameter is the name of both a macro to store the local name (in | |
440 | this case, $U) and the name of the class (e.g., $=U) in which to store | |
441 | the host information read from the file. Another SITECONFIG line reads | |
6f14531a RG |
442 | |
443 | SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) | |
444 | ||
445 | This says that the file uucp.ucbarpa contains the list of UUCP sites | |
446 | connected to ucbarpa.Berkeley.EDU. The $=W class will be used to | |
d7c7bc4c AM |
447 | store this list, and $W is defined to be ucbarpa.Berkeley.EDU, that |
448 | is, the name of the relay to which the hosts listed in uucp.ucbarpa | |
449 | are connected. [The machine ucbarpa is gone now, but I've left | |
6f14531a RG |
450 | this out-of-date configuration file around to demonstrate how you |
451 | might do this.] | |
452 | ||
d7c7bc4c AM |
453 | Note that the case of SITECONFIG with a third parameter of ``U'' is |
454 | special; the second parameter is assumed to be the UUCP name of the | |
455 | local site, rather than the name of a remote site, and the UUCP name | |
456 | is entered into $=w (the list of local hostnames) as $U.UUCP. | |
457 | ||
6f14531a RG |
458 | The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing |
459 | more than a sequence of SITE macros describing connectivity. For | |
460 | example: | |
461 | ||
462 | SITE(cnmat) | |
463 | SITE(sgi olympus) | |
15637ed4 | 464 | |
6f14531a RG |
465 | The second example demonstrates that you can use two names on the |
466 | same line; these are usually aliases for the same host (or are at | |
467 | least in the same company). | |
468 | ||
469 | ||
042b8fbf AM |
470 | +--------------------+ |
471 | | USING UUCP MAILERS | | |
472 | +--------------------+ | |
473 | ||
474 | It's hard to get UUCP mailers right because of the extremely ad hoc | |
475 | nature of UUCP addressing. These config files are really designed | |
476 | for domain-based addressing, even for UUCP sites. | |
477 | ||
478 | There are four UUCP mailers available. The choice of which one to | |
479 | use is partly a matter of local preferences and what is running at | |
480 | the other end of your UUCP connection. Unlike good protocols that | |
481 | define what will go over the wire, UUCP uses the policy that you | |
482 | should do what is right for the other end; if they change, you have | |
483 | to change. This makes it hard to do the right thing, and discourages | |
484 | people from updating their software. In general, if you can avoid | |
485 | UUCP, please do. | |
486 | ||
487 | The major choice is whether to go for a domainized scheme or a | |
488 | non-domainized scheme. This depends entirely on what the other | |
489 | end will recognize. If at all possible, you should encourage the | |
490 | other end to go to a domain-based system -- non-domainized addresses | |
491 | don't work entirely properly. | |
492 | ||
493 | The four mailers are: | |
494 | ||
495 | uucp-old (obsolete name: "uucp") | |
496 | This is the oldest, the worst (but the closest to UUCP) way of | |
497 | sending messages accros UUCP connections. It does bangify | |
498 | everything and prepends $U (your UUCP name) to the sender's | |
499 | address (which can already be a bang path itself). It can | |
500 | only send to one address at a time, so it spends a lot of | |
501 | time copying duplicates of messages. Avoid this if at all | |
502 | possible. | |
503 | ||
504 | uucp-new (obsolete name: "suucp") | |
505 | The same as above, except that it assumes that in one rmail | |
506 | command you can specify several recipients. It still has a | |
507 | lot of other problems. | |
508 | ||
509 | uucp-dom | |
510 | This UUCP mailer keeps everything as domain addresses. | |
511 | Basically, it uses the SMTP mailer rewriting rules. | |
512 | ||
513 | Unfortunately, a lot of UUCP mailer transport agents require | |
514 | bangified addresses in the envelope, although you can use | |
515 | domain-based addresses in the message header. (The envelope | |
516 | shows up as the From_ line on UNIX mail.) So.... | |
517 | ||
518 | uucp-uudom | |
519 | This is a cross between uucp-new (for the envelope addresses) | |
520 | and uucp-dom (for the header addresses). It bangifies the | |
521 | envelope sender (From_ line in messages) without adding the | |
522 | local hostname, unless there is no host name on the address | |
523 | at all (e.g., "wolf") or the host component is a UUCP host name | |
524 | instead of a domain name ("somehost!wolf" instead of | |
525 | "some.dom.ain!wolf"). | |
526 | ||
527 | Examples: | |
528 | ||
529 | We are on host grasp.insa-lyon.fr (UUCP host name "grasp"). The | |
530 | following summarizes the sender rewriting for various mailers. | |
531 | ||
532 | Mailer sender rewriting in the envelope | |
533 | ------ ------ ------------------------- | |
534 | uucp-{old,new} wolf grasp!wolf | |
535 | uucp-dom wolf wolf@grasp.insa-lyon.fr | |
536 | uucp-uudom wolf grasp.insa-lyon.fr!wolf | |
537 | ||
538 | uucp-{old,new} wolf@fr.net grasp!fr.net!wolf | |
539 | uucp-dom wolf@fr.net wolf@fr.net | |
540 | uucp-uudom wolf@fr.net fr.net!wolf | |
541 | ||
542 | uucp-{old,new} somehost!wolf grasp!somehost!wolf | |
543 | uucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr | |
544 | uucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf | |
545 | ||
546 | If you are using one of the domainized UUCP mailers, you really want | |
547 | to convert all UUCP addresses to domain format -- otherwise, it will | |
548 | do it for you (and probably not the way you expected). For example, | |
549 | if you have the address foo!bar!baz (and you are not sending to foo), | |
550 | the heuristics will add the @uucp.relay.name or @local.host.name to | |
551 | this address. However, if you map foo to foo.host.name first, it | |
552 | will not add the local hostname. You can do this using the uucpdomain | |
553 | feature. | |
554 | ||
555 | ||
6f14531a RG |
556 | +-------------------+ |
557 | | TWEAKING RULESETS | | |
558 | +-------------------+ | |
15637ed4 | 559 | |
6f14531a RG |
560 | For more complex configurations, you can define special rules. |
561 | The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing | |
562 | the names. Any modifications made here are reflected in the header. | |
15637ed4 | 563 | |
6f14531a RG |
564 | A common use is to convert old UUCP addreses to SMTP addresses using |
565 | the UUCPSMTP macro. For example: | |
15637ed4 | 566 | |
6f14531a RG |
567 | LOCAL_RULE_3 |
568 | UUCPSMTP(decvax, decvax.dec.com) | |
569 | UUCPSMTP(research, research.att.com) | |
15637ed4 | 570 | |
6f14531a RG |
571 | will cause addresses of the form "decvax!user" and "research!user" |
572 | to be converted to "user@decvax.dec.com" and "user@research.att.com" | |
573 | respectively. | |
15637ed4 | 574 | |
d7c7bc4c | 575 | This could also be used to look up hosts in a database map: |
15637ed4 | 576 | |
6f14531a RG |
577 | LOCAL_RULE_3 |
578 | R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 | |
15637ed4 | 579 | |
6f14531a | 580 | This map would be defined in the LOCAL_CONFIG portion, as shown below. |
15637ed4 | 581 | |
6f14531a RG |
582 | Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. |
583 | For example, new rules are needed to parse hostnames that you accept | |
584 | via MX records. For example, you might have: | |
15637ed4 | 585 | |
6f14531a | 586 | LOCAL_RULE_0 |
d7c7bc4c | 587 | R$+ <@ host.dom.ain.> $#uucp $@ cnmat $: $1 < @ host.dom.ain.> |
15637ed4 | 588 | |
6f14531a RG |
589 | You would use this if you had installed an MX record for cnmat.Berkeley.EDU |
590 | pointing at this host; this rule catches the message and forwards it on | |
591 | using UUCP. | |
15637ed4 | 592 | |
6f14531a RG |
593 | You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. |
594 | These rulesets are normally empty. | |
15637ed4 | 595 | |
6f14531a RG |
596 | A similar macro is LOCAL_CONFIG. This introduces lines added after the |
597 | boilerplate option setting but before rulesets, and can be used to | |
598 | declare local database maps or whatever. For example: | |
15637ed4 | 599 | |
6f14531a RG |
600 | LOCAL_CONFIG |
601 | Khostmap hash /etc/hostmap.db | |
602 | Kyplocal nis -m hosts.byname | |
15637ed4 | 603 | |
15637ed4 | 604 | |
6f14531a RG |
605 | +---------------------------+ |
606 | | MASQUERADING AND RELAYING | | |
607 | +---------------------------+ | |
15637ed4 | 608 | |
6f14531a | 609 | You can have your host masquerade as another using |
15637ed4 | 610 | |
6f14531a | 611 | MASQUERADE_AS(host.domain) |
15637ed4 | 612 | |
d7c7bc4c | 613 | This causes outgoing SMTP mail to be labeled as coming from the |
6f14531a | 614 | indicated domain, rather than $j. One normally masquerades as one |
d7c7bc4c | 615 | of one's own subdomains (for example, it's unlikely that I would |
6f14531a | 616 | choose to masquerade as an MIT site). |
15637ed4 | 617 | |
d747e748 JH |
618 | The masquerade name is not normally canonified, so it is important |
619 | that it be your One True Name, that is, fully qualified and not a | |
620 | CNAME. | |
621 | ||
6f14531a RG |
622 | there are always users that need to be "exposed" -- that is, their |
623 | internal site name should be displayed instead of the masquerade name. | |
624 | Root is an example. You can add users to this list using | |
15637ed4 | 625 | |
6f14531a | 626 | EXPOSED_USER(usernames) |
15637ed4 | 627 | |
6f14531a | 628 | This adds users to class E; you could also use something like |
15637ed4 | 629 | |
6f14531a | 630 | FE/etc/sendmail.cE |
15637ed4 | 631 | |
6f14531a RG |
632 | You can also arrange to relay all unqualified names (that is, names |
633 | without @host) to a relay host. For example, if you have a central | |
634 | email server, you might relay to that host so that users don't have | |
635 | to have .forward files or aliases. You can do this using | |
15637ed4 | 636 | |
6f14531a | 637 | define(`LOCAL_RELAY', mailer:hostname) |
15637ed4 | 638 | |
6f14531a RG |
639 | The ``mailer:'' can be omitted, in which case the mailer defaults to |
640 | "smtp". There are some user names that you don't want relayed, perhaps | |
641 | because of local aliases. A common example is root, which may be | |
642 | locally aliased. You can add entries to this list using | |
15637ed4 | 643 | |
6f14531a | 644 | LOCAL_USER(usernames) |
15637ed4 | 645 | |
6f14531a | 646 | This adds users to class L; you could also use something like |
15637ed4 | 647 | |
6f14531a | 648 | FL/etc/sendmail.cL |
15637ed4 | 649 | |
d747e748 JH |
650 | If you want all incoming mail sent to a centralized hub, as for a |
651 | shared /var/spool/mail scheme, use | |
15637ed4 | 652 | |
6f14531a | 653 | define(`MAIL_HUB', mailer:hostname) |
15637ed4 | 654 | |
6f14531a | 655 | Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY |
d7c7bc4c AM |
656 | and MAIL_HUB, unqualified names will be sent to the LOCAL_RELAY and |
657 | other local names will be sent to MAIL_HUB. Names in $=L will be | |
658 | delivered locally, so you MUST have aliases or .forward files for them. | |
659 | ||
660 | For example, if are on machine mastodon.CS.Berkeley.EDU, the following | |
6f14531a | 661 | combinations of settings will have the indicated effects: |
15637ed4 | 662 | |
6f14531a | 663 | email sent to.... eric eric@mastodon.CS.Berkeley.EDU |
15637ed4 | 664 | |
6f14531a RG |
665 | LOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) |
666 | mail.CS.Berkeley.EDU | |
15637ed4 | 667 | |
6f14531a RG |
668 | MAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU |
669 | mammoth.CS.Berkeley.EDU | |
15637ed4 | 670 | |
6f14531a RG |
671 | Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU |
672 | MAIL_HUB set as above | |
15637ed4 | 673 | |
d747e748 JH |
674 | If you want all outgoing mail to go to a central relay site, define |
675 | SMART_HOST as well. Briefly: | |
676 | ||
677 | LOCAL_RELAY applies to unqualifed names (e.g., "eric"). | |
678 | MAIL_HUB applies to names qualified with the name of the | |
679 | local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). | |
680 | SMART_HOST applies to names qualified with other hosts. | |
681 | ||
682 | However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and | |
683 | FAX_RELAY) take precedence over SMART_HOST, so if you really want | |
684 | absolutely everything to go to a single central site you will need to | |
685 | unset all the other relays -- or better yet, find or build a minimal | |
686 | config file that does this. | |
687 | ||
15637ed4 | 688 | |
6f14531a RG |
689 | +-------------------------------+ |
690 | | NON-SMTP BASED CONFIGURATIONS | | |
691 | +-------------------------------+ | |
15637ed4 | 692 | |
6f14531a RG |
693 | These configuration files are designed primarily for use by SMTP-based |
694 | sites. I don't pretend that they are well tuned for UUCP-only or | |
695 | UUCP-primarily nodes (the latter is defined as a small local net | |
696 | connected to the rest of the world via UUCP). However, there is one | |
697 | hook to handle some special cases. | |
15637ed4 | 698 | |
6f14531a RG |
699 | You can define a ``smart host'' that understands a richer address syntax |
700 | using: | |
15637ed4 | 701 | |
6f14531a | 702 | define(`SMART_HOST', mailer:hostname) |
15637ed4 | 703 | |
d747e748 | 704 | In this case, the ``mailer:'' defaults to "relay". Any messages that |
6f14531a | 705 | can't be handled using the usual UUCP rules are passed to this host. |
15637ed4 | 706 | |
6f14531a RG |
707 | If you are on a local SMTP-based net that connects to the outside |
708 | world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. | |
709 | For example: | |
15637ed4 | 710 | |
6f14531a RG |
711 | define(`SMART_HOST', suucp:uunet) |
712 | LOCAL_NET_CONFIG | |
3a363396 | 713 | R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 |
15637ed4 | 714 | |
6f14531a RG |
715 | This will cause all names that end in your domain name ($m) via |
716 | SMTP; anything else will be sent via suucp (smart UUCP) to uunet. | |
3a363396 NW |
717 | If you have FEATURE(nocanonify), you may need to omit the dots after |
718 | the $m. If you are running a local DNS inside your domain which is | |
719 | not otherwise connected to the outside world, you probably want to | |
720 | use: | |
721 | ||
722 | define(`SMART_HOST', smtp:fire.wall.com) | |
723 | LOCAL_NET_CONFIG | |
724 | R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 | |
725 | ||
726 | That is, send directly only to things you found in your DNS lookup; | |
727 | anything else goes through SMART_HOST. | |
15637ed4 | 728 | |
d747e748 JH |
729 | If you are not running DNS at all, it is important to use |
730 | FEATURE(nodns) to avoid having sendmail queue everything waiting | |
731 | for the name server to come up. | |
732 | ||
733 | ||
734 | +-----------+ | |
735 | | WHO AM I? | | |
736 | +-----------+ | |
737 | ||
738 | Normally, the $j macro is automatically defined to be your fully | |
739 | qualified domain name (FQDN). Sendmail does this by getting your | |
740 | host name using gethostname and then calling gethostbyname on the | |
741 | result. For example, in some environments gethostname returns | |
742 | only the root of the host name (such as "foo"); gethostbyname is | |
743 | supposed to return the FQDN ("foo.bar.com"). In some (fairly rare) | |
744 | cases, gethostbyname may fail to return the FQDN. In this case | |
745 | you MUST define confDOMAIN_NAME to be your fully qualified domain | |
746 | name. This is usually done using: | |
747 | ||
748 | Dmbar.com | |
749 | define(`confDOMAIN_NAME', `$w.$m')dnl | |
750 | ||
751 | ||
752 | +--------------------+ | |
753 | | USING MAILERTABLES | | |
754 | +--------------------+ | |
755 | ||
756 | To use FEATURE(mailertable), you will have to create an external | |
757 | database containing the routing information for various domains. | |
758 | For example, a mailertable file in text format might be: | |
759 | ||
760 | .my.domain xnet:%1.my.domain | |
761 | uuhost1.my.domain suucp:uuhost1 | |
762 | .bitnet smtp:relay.bit.net | |
763 | ||
764 | This should normally be stored in /etc/mailertable. The actual | |
765 | database version of the mailertable is built using: | |
766 | ||
767 | makemap hash /etc/mailertable.db < /etc/mailertable | |
768 | ||
769 | The semantics are simple. Any LHS entry that does not begin with | |
770 | a dot matches the full host name indicated. LHS entries beginning | |
771 | with a dot match anything ending with that domain name -- that is, | |
772 | they can be thought of as having a leading "*" wildcard. Matching | |
773 | is done in order of most-to-least qualified -- for example, even | |
774 | though ".my.domain" is listed first in the above example, an entry | |
775 | of "uuhost1.my.domain" will match the second entry since it is | |
776 | more explicit. | |
777 | ||
778 | The RHS should always be a "mailer:host" pair. The mailer is the | |
779 | configuration name of a mailer (that is, an `M' line in the | |
780 | sendmail.cf file). The "host" will be the hostname passed to | |
781 | that mailer. In domain-based matches (that is, those with leading | |
782 | dots) the "%1" may be used to interpolate the wildcarded part of | |
783 | the host name. For example, the first line above sends everything | |
784 | addressed to "anything.my.domain" to that same host name, but using | |
785 | the (presumably experimental) xnet mailer. | |
786 | ||
787 | ||
788 | +--------------------------------+ | |
789 | | USING USERDB TO MAP FULL NAMES | | |
790 | +--------------------------------+ | |
791 | ||
792 | The user database was not originally intended for mapping full names | |
793 | to login names (e.g., Eric.Allman => eric), but some people are using | |
794 | it that way. (I would recommend that you set up aliases for this | |
795 | purpose instead -- since you can specify multiple alias files, this | |
796 | is fairly easy.) The intent was to locate the default maildrop at | |
797 | a site, but allow you to override this by sending to a specific host. | |
798 | ||
799 | If you decide to set up the user database in this fashion, it is | |
800 | imperative that you also specify FEATURE(notsticky) -- otherwise, | |
801 | e-mail sent to Full.Name@local.host.name will be rejected. | |
802 | ||
803 | To build the internal form of the user databae, use: | |
804 | ||
805 | makemap btree /usr/data/base.db < /usr/data/base.txt | |
806 | ||
15637ed4 | 807 | |
6f14531a RG |
808 | +------------------+ |
809 | | FlexFAX SOFTWARE | | |
810 | +------------------+ | |
15637ed4 | 811 | |
6f14531a RG |
812 | Sam Leffler's FlexFAX software is still in beta test -- but he expects a |
813 | public version out "later this week" [as of 3/1/93]. The following | |
814 | blurb is direct from Sam: | |
15637ed4 | 815 | |
d7c7bc4c | 816 | $Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $ |
15637ed4 | 817 | |
6f14531a | 818 | How To Obtain This Software (in case all you get is this file) |
d747e748 | 819 | -------------------------------------------------------------- |
6f14531a | 820 | The source code is available for public ftp on |
d747e748 | 821 | sgi.com sgi/fax/v2.1.src.tar.Z |
6f14531a | 822 | (192.48.153.1) |
15637ed4 | 823 | |
6f14531a | 824 | You can also obtain inst'able images for Silicon Graphics machines from |
d747e748 | 825 | sgi.com sgi/fax/v2.1.inst.tar |
6f14531a | 826 | (192.48.153.1) |
15637ed4 | 827 | |
6f14531a RG |
828 | For example, |
829 | % ftp -n sgi.com | |
830 | .... | |
831 | ftp> user anonymous | |
832 | ... <type in password> | |
833 | ftp> cd sgi/fax | |
834 | ftp> binary | |
d747e748 JH |
835 | ftp> get v2.1.src.tar.Z |
836 | ||
837 | In general, the latest version of the 2.1 release of the software is | |
838 | always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp | |
839 | directory. This file is a link to the appropriate released version (so | |
840 | don't waste your time retrieving the linked file as well!) Any files of | |
841 | the form v2.1.*.patch are shell scripts that can be used to patch older | |
842 | versions of the source code. For example, the file v2.1.0.patch would | |
843 | contain patches to update v2.1.0.tar.Z. (Note to beta testers: this is | |
844 | different than the naming conventions used during beta testing.) Patch | |
845 | files only work to go between consecutive versions, so if you are | |
846 | multiple versions behind the latest release, you will need to apply | |
847 | each patch file between your current version and the latest. | |
848 | ||
849 | ||
850 | Obtaining the Software by Electronic Mail | |
851 | ----------------------------------------- | |
852 | Do not send me requests for the software; they will be ignored (without | |
853 | response). If you cannot use FTP at all, there is a service called | |
854 | "ftpmail" available from gatekeeper.dec.com: you can send e-mail to | |
855 | this machine and it will use FTP to retrieve files for you and send you | |
856 | the files back again via e-mail. To find out more about the ftpmail | |
6f14531a RG |
857 | service, send a message to "ftpmail@gatekeeper.dec.com" whose body |
858 | consists of the single line "help". | |
15637ed4 | 859 | |
d747e748 JH |
860 | |
861 | Obtaining the Software Within Silicon Graphics | |
862 | ---------------------------------------------- | |
6f14531a | 863 | Internal to Silicon Graphics there are inst'able images on the host |
d747e748 | 864 | flake.asd in the directory /usr/dist. Thus you can do something like: |
6f14531a | 865 | |
d747e748 | 866 | % inst -f flake.asd.sgi.com:/usr/dist/flexfax |
6f14531a | 867 | |
d747e748 | 868 | to install the latest version of the software on your machine. |
6f14531a | 869 | |
d747e748 JH |
870 | |
871 | What to do Once You've Retrieved Stuff | |
872 | -------------------------------------- | |
6f14531a RG |
873 | The external distributions come in a compressed or uncompressed tar |
874 | file. To extract the source distribution: | |
875 | ||
d747e748 | 876 | % zcat v2.1.src.tar.Z | tar xf - |
6f14531a RG |
877 | |
878 | (uncompress and extract individual files in current directory). To | |
879 | unpack and install the client portion of the inst'able distribution: | |
880 | ||
881 | % mkdir dist | |
d747e748 | 882 | % cd dist; tar xf ../v2.1.inst.tar; cd .. |
6f14531a RG |
883 | % inst -f dist/flexfax |
884 | ... | |
885 | inst> go | |
886 | ||
887 | (Note, the dist subdirectory is because some versions of inst fail if | |
d747e748 JH |
888 | the files are in the current directory.) Server binaries are also |
889 | included in the inst'able images as flexfax.server.*. They are not | |
890 | installed by default, so to get them also you need to do: | |
6f14531a RG |
891 | |
892 | % inst -f flexfax | |
893 | ... | |
894 | inst> install flexfax.server.* | |
895 | inst> go | |
896 | ||
d747e748 | 897 | The SGI binaries were built for Version 4.0.5H of the IRIX operating |
6f14531a RG |
898 | system. They should work w/o problem on earlier versions of the |
899 | system, but I have not fully tested this. Also, note that to install a | |
900 | server on an SGI machine, you need to have installed the Display | |
901 | PostScript execution environment product (dps_eoe). Otherwise, the fax | |
902 | server will not be able to convert PostScript to facsimile for | |
903 | transmission. | |
904 | ||
d747e748 JH |
905 | If you are working from the source distribution, look at the file |
906 | README in the top of the source tree. If you are working from the inst | |
907 | images, the subsystem flexfax.man.readme contains the README file and | |
908 | other useful pieces of information--the installed files are placed in | |
909 | the directory /usr/local/doc/flexfax). Basically you will need to run | |
910 | the faxaddmodem script to setup and configure your fax modem. Consult | |
911 | the README file and the manual page for faxaddmodem for information. | |
6f14531a | 912 | |
6f14531a | 913 | |
d747e748 JH |
914 | FlexFAX Mail List |
915 | ----------------- | |
6f14531a RG |
916 | A mailing list for users of this software is located on sgi.com. |
917 | If you want to join this mailing list or have a list-related request | |
918 | such as getting your name removed from it, send a request to | |
919 | ||
d747e748 JH |
920 | majordomo@whizzer.wpd.sgi.com |
921 | ||
922 | For example, to subscribe, send the line "subscribe flexfax" in | |
923 | the body of your message. The line "help" will return a list of | |
924 | the commands understood by the mailing list management software. | |
6f14531a RG |
925 | |
926 | Submissions (including bug reports) should be directed to: | |
927 | ||
928 | flexfax@sgi.com | |
929 | ||
d747e748 JH |
930 | When corresponding about this software please always specify what |
931 | version you have, what system you're running on, and, if the problem is | |
932 | specific to your modem, identify the modem and firmware revision. | |
933 | ||
6f14531a RG |
934 | |
935 | +--------------------------------+ | |
936 | | TWEAKING CONFIGURATION OPTIONS | | |
937 | +--------------------------------+ | |
938 | ||
939 | There are a large number of configuration options that don't normally | |
940 | need to be changed. However, if you feel you need to tweak them, you | |
941 | can define the following M4 variables. This list is shown in four | |
942 | columns: the name you define, the default value for that definition, | |
943 | the option or macro that is affected (either Ox for an option or Dx | |
944 | for a macro), and a brief description. Greater detail of the semantics | |
945 | can be found in the Installation and Operations Guide. | |
946 | ||
947 | Some options are likely to be deprecated in future versions -- that is, | |
948 | the option is only included to provide back-compatibility. These are | |
949 | marked with "*". | |
950 | ||
042b8fbf AM |
951 | Remember that these options are M4 variables, and hence may need to |
952 | be quoted. In particular, arguments with commas will usually have to | |
953 | be ``double quoted, like this phrase'' to avoid having the comma | |
954 | confuse things. This is common for alias file definitions and for | |
955 | the read timeout. | |
956 | ||
6f14531a | 957 | M4 Variable Name Default Mac/Opt Description |
042b8fbf | 958 | ================ ======= ======= =========== |
6f14531a RG |
959 | confMAILER_NAME MAILER-DAEMON Dn The sender name used for |
960 | internally generated | |
961 | outgoing messages. | |
962 | confFROM_LINE From $g $d Dl The From_ line used when | |
963 | sending to files or programs. | |
964 | confFROM_HEADER $?x$x <$g>$|$g$. The format of an internally | |
965 | Dq generated From: address. | |
966 | confOPERATORS .:%@!^/[] Do Address operator characters. | |
d747e748 | 967 | confSMTP_LOGIN_MSG $j Sendmail $v/$Z ready at $b |
6f14531a RG |
968 | De The initial (spontaneous) |
969 | SMTP greeting message. | |
970 | confSEVEN_BIT_INPUT False O7 Force input to seven bits? | |
971 | confALIAS_WAIT 10 Oa Wait (in minutes) for alias | |
972 | file rebuild. | |
973 | confMIN_FREE_BLOCKS 4 Ob Minimum number of free blocks | |
974 | on queue filesystem to accept | |
975 | SMTP mail. | |
976 | confBLANK_SUB . OB Blank (space) substitution | |
977 | character. | |
042b8fbf AM |
978 | confCON_EXPENSIVE False Oc Avoid connecting immediately |
979 | to mailers marked expensive? | |
6f14531a RG |
980 | confCHECKPOINT_INTERVAL 10 OC Checkpoint queue files |
981 | every N recipients. | |
982 | confDELIVERY_MODE background Od Default delivery mode. | |
983 | confAUTO_REBUILD False OD Automatically rebuild | |
984 | alias file if needed. | |
985 | confERROR_MODE (undefined) Oe Error message mode. | |
986 | confERROR_MESSAGE (undefined) OE Error message header/file. | |
987 | confSAVE_FROM_LINES False Of Save extra leading | |
988 | From_ lines. | |
989 | confTEMP_FILE_MODE 0600 OF Temporary file mode. | |
990 | confDEF_GROUP_ID 1 Og Default group id. | |
991 | confMATCH_GECOS False OG Match GECOS field. | |
992 | confMAX_HOP 17 Oh Maximum hop count. | |
993 | confIGNORE_DOTS False Oi * Ignore dot as terminator | |
994 | for incoming messages? | |
995 | confBIND_OPTS (empty) OI Default options for BIND. | |
996 | confMIME_FORMAT_ERRORS True Oj * Send error messages as MIME- | |
997 | encapsulated messages per | |
998 | RFC 1344. | |
d747e748 JH |
999 | confFORWARD_PATH (undefined) OJ The colon-separated list of |
1000 | places to search for .forward | |
1001 | files. | |
6f14531a RG |
1002 | confMCI_CACHE_SIZE 2 Ok Size of open connection cache. |
1003 | confMCI_CACHE_TIMEOUT 5m OK Open connection cache timeout. | |
1004 | confUSE_ERRORS_TO False Ol * Use the Errors-To: header to | |
1005 | deliver error messages. This | |
1006 | should not be necessary because | |
1007 | of general acceptance of the | |
1008 | envelope/header distinction. | |
1009 | confLOG_LEVEL 9 OL Log level. | |
1010 | confME_TOO False Om Include sender in group | |
1011 | expansions. | |
1012 | confCHECK_ALIASES True On Check RHS of aliases when | |
1013 | running newaliases. | |
1014 | confOLD_STYLE_HEADERS True Oo * Assume that headers without | |
1015 | special chars are old style. | |
1016 | confDAEMON_OPTIONS (undefined) OO SMTP daemon options. | |
1017 | confPRIVACY_FLAGS authwarnings Op Privacy flags. | |
1018 | confCOPY_ERRORS_TO (undefined) OP Address for additional copies | |
1019 | of all error messages. | |
1020 | confQUEUE_FACTOR (undefined) Oq Slope of queue-only function | |
1021 | confREAD_TIMEOUT (undefined) Or SMTP read timeouts. | |
1022 | confSAFE_QUEUE True Os * Commit all messages to disk | |
1023 | before forking. | |
1024 | confMESSAGE_TIMEOUT 5d/4h OT Timeout for messages before | |
1025 | sending error/warning message. | |
1026 | confTIME_ZONE USE_SYSTEM Ot Time zone info -- can be | |
1027 | USE_SYSTEM to use the system's | |
1028 | idea, USE_TZ to use the user's | |
1029 | TZ envariable, or something | |
1030 | else to force that value. | |
1031 | confDEF_USER_ID 1 Ou Default user id. | |
1032 | confUSERDB_SPEC (undefined) OU User database specification. | |
1033 | confFALLBACK_MX (undefined) OV Fallback MX host. | |
d747e748 JH |
1034 | confTRY_NULL_MX_LIST False Ow If we are the best MX for a |
1035 | host and haven't made other | |
1036 | arrangements, try connecting | |
1037 | to the host directly; normally | |
1038 | this would be a config error. | |
6f14531a RG |
1039 | confQUEUE_LA 8 Ox Load average at which queue-only |
1040 | function kicks in. | |
1041 | confREFUSE_LA 12 OX Load average at which incoming | |
1042 | SMTP connections are refused. | |
1043 | confWORK_RECIPIENT_FACTOR | |
1044 | (undefined) Oy Cost of each recipient. | |
1045 | confSEPARATE_PROC False OY Run all deliveries in a | |
1046 | separate process. | |
1047 | confWORK_CLASS_FACTOR (undefined) Oz Priority multiplier for class. | |
1048 | confWORK_TIME_FACTOR (undefined) OZ Cost of each delivery attempt. | |
1049 | confCW_FILE /etc/sendmail.cw Name of file used to get the | |
1050 | Fw local additions to the $=w | |
1051 | class. | |
d747e748 JH |
1052 | confSMTP_MAILER smtp - The mailer name used when |
1053 | SMTP connectivity is required. | |
1054 | Either "smtp" or "esmtp". | |
1055 | confLOCAL_MAILER local - The mailer name used when | |
1056 | local connectivity is required. | |
1057 | Almost always "local". | |
1058 | confRELAY_MAILER relay - The default mailer name used | |
1059 | for relaying any mail (e.g., | |
1060 | to a BITNET_RELAY, a | |
1061 | SMART_HOST, or whatever). | |
1062 | This can reasonably be "suucp" | |
1063 | if you are on a UUCP-connected | |
1064 | site. | |
1065 | confDOMAIN_NAME (undefined) Dj If defined, sets $j. | |
6f14531a RG |
1066 | |
1067 | ||
1068 | +-----------+ | |
1069 | | HIERARCHY | | |
1070 | +-----------+ | |
1071 | ||
1072 | Within this directory are several subdirectories, to wit: | |
1073 | ||
1074 | m4 General support routines. These are typically | |
1075 | very important and should not be changed without | |
1076 | very careful consideration. | |
1077 | ||
1078 | cf The configuration files themselves. They have | |
1079 | ".mc" suffixes, and must be run through m4 to | |
1080 | become complete. The resulting output should | |
1081 | have a ".cf" suffix. | |
1082 | ||
1083 | ostype Definitions describing a particular operating | |
1084 | system type. These should always be referenced | |
1085 | using the OSTYPE macro in the .mc file. Examples | |
1086 | include "bsd4.3", "bsd4.4", "sunos3.5", and | |
1087 | "sunos4.1". | |
1088 | ||
1089 | domain Definitions describing a particular domain, referenced | |
1090 | using the DOMAIN macro in the .mc file. These are | |
1091 | site dependent; for example, we contribute "cs.exposed.m4" | |
1092 | and "cs.hidden.m4" which both describe hosts in the | |
1093 | CS.Berkeley.EDU subdomain; the former displays the local | |
1094 | hostname (e.g., mammoth.CS.Berkeley.EDU), whereas the | |
1095 | latter does its best to hide the identity of the local | |
1096 | workstation inside the CS subdomain. | |
1097 | ||
1098 | mailer Descriptions of mailers. These are referenced using | |
1099 | the MAILER macro in the .mc file. | |
1100 | ||
1101 | sh Shell files used when building the .cf file from the | |
1102 | .mc file in the cf subdirectory. | |
1103 | ||
1104 | feature These hold special orthogonal features that you might | |
1105 | want to include. They should be referenced using | |
1106 | the FEATURE macro. | |
1107 | ||
1108 | hack Local hacks. These can be referenced using the HACK | |
1109 | macro. They shouldn't be of more than voyeuristic | |
1110 | interest outside the .Berkeley.EDU domain, but who knows? | |
d7c7bc4c | 1111 | We've all got our own peccadillos. |
6f14531a RG |
1112 | |
1113 | siteconfig Site configuration -- e.g., tables of locally connected | |
1114 | UUCP sites. | |
1115 | ||
1116 | ||
1117 | +------------------------+ | |
1118 | | ADMINISTRATIVE DETAILS | | |
1119 | +------------------------+ | |
1120 | ||
1121 | The following sections detail usage of certain internal parts of the | |
1122 | sendmail.cf file. Read them carefully if you are trying to modify | |
1123 | the current model. If you find the above descriptions adequate, these | |
1124 | should be {boring, confusing, tedious, ridiculous} (pick one or more). | |
1125 | ||
1126 | RULESETS (* means built in to sendmail) | |
1127 | ||
1128 | 0 * Parsing | |
1129 | 1 * Sender rewriting | |
1130 | 2 * Recipient rewriting | |
1131 | 3 * Canonicalization | |
1132 | 4 * Post cleanup | |
1133 | 5 * Local address rewrite (after aliasing) | |
1134 | 1x mailer rules (sender qualification) | |
1135 | 2x mailer rules (recipient qualification) | |
69fc843f AM |
1136 | 3x mailer rules (sender header qualification) |
1137 | 4x mailer rules (recipient header qualification) | |
1138 | 5x mailer subroutines (general) | |
1139 | 6x mailer subroutines (general) | |
1140 | 7x mailer subroutines (general) | |
1141 | 8x reserved | |
6f14531a RG |
1142 | 90 Mailertable host stripping |
1143 | 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) | |
1144 | 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) | |
d747e748 | 1145 | 98 Local part of ruleset 0 (ruleset 8 in old sendmail) |
6f14531a RG |
1146 | |
1147 | ||
1148 | MAILERS | |
1149 | ||
1150 | 0 local, prog local and program mailers | |
042b8fbf AM |
1151 | 1 [e]smtp, relay SMTP channel |
1152 | 2 uucp-* UNIX-to-UNIX Copy Program | |
6f14531a RG |
1153 | 3 netnews Network News delivery |
1154 | 4 fax Sam Leffler's FlexFAX software | |
1155 | ||
1156 | ||
1157 | MACROS | |
1158 | ||
1159 | A | |
1160 | B Bitnet Relay | |
042b8fbf | 1161 | C |
6f14531a RG |
1162 | D The local domain -- usually not needed |
1163 | E | |
1164 | F FAX Relay | |
1165 | G | |
1166 | H mail Hub (for mail clusters) | |
1167 | I | |
1168 | J | |
1169 | K | |
1170 | L | |
1171 | M Masquerade (who I claim to be) | |
1172 | N | |
1173 | O | |
1174 | P | |
1175 | Q | |
1176 | R Relay (for unqualified names) | |
1177 | S Smart Host | |
1178 | T | |
1179 | U my UUCP name (if I have a UUCP connection) | |
1180 | V UUCP Relay (class V hosts) | |
1181 | W UUCP Relay (class W hosts) | |
1182 | X UUCP Relay (class X hosts) | |
1183 | Y UUCP Relay (all other hosts) | |
1184 | Z Version number | |
1185 | ||
1186 | ||
1187 | CLASSES | |
1188 | ||
1189 | A | |
1190 | B | |
1191 | C | |
1192 | D | |
1193 | E addresses that should not seem to come from $M | |
1194 | F hosts we forward for | |
1195 | G | |
1196 | H | |
1197 | I | |
1198 | J | |
1199 | K | |
1200 | L addresses that should not be forwarded to $R | |
1201 | M | |
1202 | N | |
1203 | O operators that indicate network operations (cannot be in local names) | |
1204 | P top level pseudo-domains: BITNET, FAX, UUCP, etc. | |
1205 | Q | |
1206 | R | |
1207 | S | |
1208 | T | |
1209 | U locally connected UUCP hosts | |
1210 | V UUCP hosts connected to relay $V | |
1211 | W UUCP hosts connected to relay $W | |
1212 | X UUCP hosts connected to relay $X | |
1213 | Y locally connected smart UUCP hosts | |
d747e748 | 1214 | Z locally connected domain-ized UUCP hosts |
6f14531a RG |
1215 | . the class containing only a dot |
1216 | ||
1217 | ||
1218 | M4 DIVERSIONS | |
1219 | ||
1220 | 1 Local host detection and resolution | |
1221 | 2 Local Ruleset 3 additions | |
1222 | 3 Local Ruleset 0 additions | |
1223 | 4 UUCP Ruleset 0 additions | |
1224 | 5 locally interpreted names (overrides $R) | |
1225 | 6 local configuration (at top of file) | |
1226 | 7 mailer definitions | |
d7c7bc4c | 1227 | 8 |
6f14531a | 1228 | 9 special local rulesets (1 and 2) |