Commit | Line | Data |
---|---|---|
7ace9d88 | 1 | |
7ace9d88 | 2 | |
4a51b074 | 3 | NEW SENDMAIL CONFIGURATION FILES |
7ace9d88 | 4 | |
4a51b074 | 5 | Eric Allman <eric@CS.Berkeley.EDU> |
7ace9d88 | 6 | |
51851acc | 7 | @(#)README 8.55 (Berkeley) %G% |
7ace9d88 | 8 | |
7ace9d88 | 9 | |
4a51b074 | 10 | This document describes the sendmail configuration files being used |
f22970ed EA |
11 | at Berkeley. These use features in the new (R8) sendmail; they will |
12 | not work on other versions. | |
4a51b074 EA |
13 | |
14 | These configuration files are probably not as general as previous | |
6fb312a3 | 15 | versions, and don't handle as many of the weird cases automagically. |
4a51b074 EA |
16 | I was able to simplify by them for two reasons. First, the network |
17 | has become more consistent -- for example, at this point, everyone | |
18 | on the internet is supposed to be running a name server, so hacks to | |
19 | handle NIC-registered hosts can go away. Second, I assumed that a | |
20 | subdomain would be running SMTP internally -- UUCP is presumed to be | |
21 | a long-haul protocol. I realize that this is not universal, but it | |
22 | does describe the vast majority of sites with which I am familiar, | |
23 | including those outside the US. | |
24 | ||
6fb312a3 EA |
25 | Of course, the downside of this is that if you do live in a weird |
26 | world, things are going to get weirder for you. I'm sorry about that, | |
4a51b074 EA |
27 | but at the time we at Berkeley had a problem, and it seemed like the |
28 | right thing to do. | |
29 | ||
fd82c288 EA |
30 | This package requires a post-V7 version of m4; if you are running the |
31 | 4.2bsd, SysV.2, or 7th Edition version, I suggest finding a friend with | |
32 | a newer version. You can m4-expand on their system, then run locally. | |
a7e36c1b EA |
33 | SunOS's /usr/5bin/m4 or BSD-Net/2's m4 both work. GNU m4 version 1.1 |
34 | also works. Unfortunately, I'm told that the M4 on BSDI 1.0 doesn't | |
35 | work -- you'll have to use a Net/2 or GNU version. | |
7ace9d88 | 36 | |
a33031f5 | 37 | IF YOU DON'T HAVE A BERKELEY MAKE, don't despair! Just run |
445bdec1 EA |
38 | "m4 foo.mc > foo.cf" -- that should be all you need. There is also |
39 | a fairly crude (but functional) Makefile.dist that works on the | |
40 | old version of make. | |
a33031f5 EA |
41 | |
42 | To get started, you may want to look at tcpproto.mc (for TCP-only | |
f51c9ac8 EA |
43 | sites), uucpproto.mc (for UUCP-only sites), and clientproto.mc (for |
44 | clusters of clients using a single mail host). Others are versions | |
a33031f5 EA |
45 | that we use at Berkeley, although not all are in current use. For |
46 | example, ucbarpa has gone away, but I've left ucbarpa.mc in because | |
47 | it demonstrates some interesting techniques. | |
48 | ||
4a51b074 EA |
49 | I'm not pretending that this README describes everything that these |
50 | configuration files can do; clever people can probably tweak them | |
51 | to great effect. But it should get you started. | |
52 | ||
1b5c2cc9 EA |
53 | ******************************************************************* |
54 | *** BE SURE YOU CUSTOMIZE THESE FILES! They have some *** | |
55 | *** Berkeley-specific assumptions built in, such as the name *** | |
56 | *** of our UUCP-relay. You'll want to create your own domain *** | |
57 | *** description, and use that in place of domain/Berkeley.m4. *** | |
58 | ******************************************************************* | |
59 | ||
bee9d799 | 60 | |
4a51b074 EA |
61 | +--------------------------+ |
62 | | INTRODUCTION AND EXAMPLE | | |
63 | +--------------------------+ | |
64 | ||
65 | Configuration files are contained in the subdirectory "cf", with a | |
66 | suffix ".mc". They must be run through "m4" to produce a ".cf" file. | |
67 | ||
e9631f65 | 68 | Let's examine a typical .mc file (cf/cs-hpux9.mc): |
7ace9d88 EA |
69 | |
70 | divert(-1) | |
71 | # | |
72 | # Copyright (c) 1983 Eric P. Allman | |
e9631f65 EA |
73 | # Copyright (c) 1988, 1993 |
74 | # The Regents of the University of California. All rights reserved. | |
7ace9d88 | 75 | # |
e9631f65 EA |
76 | # Redistribution and use in source and binary forms, with or without |
77 | # modification, are permitted provided that the following conditions | |
78 | # are met: | |
79 | # 1. Redistributions of source code must retain the above copyright | |
80 | # notice, this list of conditions and the following disclaimer. | |
81 | # 2. Redistributions in binary form must reproduce the above copyright | |
82 | # notice, this list of conditions and the following disclaimer in | |
83 | # the documentation and/or other materials provided with the | |
84 | # distribution. | |
85 | # 3. All advertising materials mentioning features or use of this | |
86 | # software # must display the following acknowledgement: | |
87 | # This product includes software developed by the University of | |
88 | # California, Berkeley and its contributors. | |
89 | # 4. Neither the name of the University nor the names of its | |
90 | # contributors may be used to endorse or promote products derived | |
91 | # from this software without specific prior written permission. | |
92 | # | |
93 | # THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' | |
94 | # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, | |
95 | # THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
96 | # PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS | |
97 | # BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, | |
98 | # OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT | |
99 | # OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | |
100 | # BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, | |
101 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
102 | # OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, | |
103 | # EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
104 | # | |
105 | ||
106 | # | |
107 | # This is a Berkeley-specific configuration file for HP-UX 9.x. | |
108 | # It applies only the the Computer Science Division at Berkeley, | |
109 | # and should not be used elsewhere. It is provided on the sendmail | |
110 | # distribution as a sample only. To create your own configuration | |
111 | # file, create an appropriate domain file in ../domain, change the | |
112 | # `DOMAIN' macro below to reference that file, and copy the result | |
113 | # to a name of your own choosing. | |
7ace9d88 EA |
114 | # |
115 | ||
4a51b074 | 116 | The divert(-1) will delete the crud in the resulting output file. |
e9631f65 EA |
117 | The copyright notice can be replace by whatever your lawyers require; |
118 | our lawyers require the one that I've included in my files. A copyleft | |
119 | is a copyright by another name. | |
4a51b074 EA |
120 | |
121 | The next line MUST be | |
7ace9d88 EA |
122 | |
123 | include(`../m4/cf.m4') | |
124 | ||
4a51b074 EA |
125 | This will pull in the M4 macros you will need to make sense of |
126 | everything else. As the saying goes, don't think about it, just | |
127 | do it. If you don't do it, don't bother reading the rest of this | |
128 | file. | |
7ace9d88 | 129 | |
8897fcb1 | 130 | VERSIONID(`<SCCS or RCS version id>') |
7ace9d88 EA |
131 | |
132 | VERSIONID is a macro that stuffs the version information into the | |
133 | resulting file. We use SCCS; you could use RCS, something else, or | |
4a51b074 EA |
134 | omit it completely. This is not the same as the version id included |
135 | in SMTP greeting messages -- this is defined in m4/version.m4. | |
7ace9d88 | 136 | |
e9631f65 EA |
137 | OSTYPE(hpux9)dnl |
138 | ||
139 | You must specify an OSTYPE to properly configure things such as the | |
140 | pathname of the help and status files, the flags needed for the local | |
141 | mailer, and other important things. If you omit it, you will get an | |
142 | error when you try to build the configuration. Look at the ostype | |
143 | directory for the list of known operating system types. | |
144 | ||
145 | DOMAIN(CS.Berkeley.EDU)dnl | |
7ace9d88 | 146 | |
e9631f65 EA |
147 | This example is specific to the Computer Science Division at Berkeley. |
148 | You can use "DOMAIN(generic)" to get a sufficiently bland definition | |
149 | that may well work for you, or you can create a customized domain | |
150 | definition appropriate for your environment. | |
7ace9d88 | 151 | |
e9631f65 | 152 | MAILER(local) |
9df1b56b | 153 | MAILER(smtp) |
7ace9d88 | 154 | |
c573210d EA |
155 | These describe the mailers used at the default CS site site. The |
156 | local mailer is always included automatically. | |
7ace9d88 | 157 | |
bee9d799 | 158 | |
4a51b074 EA |
159 | +--------+ |
160 | | OSTYPE | | |
161 | +--------+ | |
162 | ||
e9631f65 EA |
163 | You MUST define an operating system environment, or the configuration |
164 | file build will puke. There are several environments available; look | |
165 | at the "ostype" directory for the current list. This macro changes | |
166 | things like the location of the alias file and queue directory. Some | |
167 | of these files are identical to one another. | |
4a51b074 | 168 | |
e9631f65 EA |
169 | Operating system definitions are usually easy to write. They may define |
170 | the following variables (everything defaults, so an ostype file may be | |
171 | empty). Unfortunately, the list of configuration-supported systems is | |
172 | not as broad as the list of source-supported systems, since many of | |
173 | the source contributors do not include corresponding ostype files. | |
4a51b074 EA |
174 | |
175 | ALIAS_FILE [/etc/aliases] The location of the text version | |
00d0b5bf | 176 | of the alias file(s). It can be a comma-separated |
7b97409d | 177 | list of names (but be sure you quote values with |
e4c0b131 | 178 | commas in them -- for example, use |
7b97409d EA |
179 | define(`ALIAS_FILE', `a,b') |
180 | to get "a" and "b" both listed as alias files; | |
181 | otherwise the define() primitive only sees "a"). | |
4a51b074 EA |
182 | HELP_FILE [/usr/lib/sendmail.hf] The name of the file |
183 | containing information printed in response to | |
184 | the SMTP HELP command. | |
4a51b074 EA |
185 | QUEUE_DIR [/var/spool/mqueue] The directory containing |
186 | queue files. | |
187 | STATUS_FILE [/etc/sendmail.st] The file containing status | |
188 | information. | |
bee9d799 | 189 | LOCAL_MAILER_PATH [/bin/mail] The program used to deliver local mail. |
2e9b6f6e EA |
190 | LOCAL_MAILER_FLAGS [rmn] The flags used by the local mailer. The |
191 | flags lsDFM are always included. | |
d8b2ad36 EA |
192 | LOCAL_MAILER_ARGS [mail -d $u] The arguments passed to deliver local |
193 | mail. | |
3d26fbcb EA |
194 | LOCAL_MAILER_MAX [undefined] If defined, the maximum size of local |
195 | mail that you are willing to accept. | |
51851acc EA |
196 | LOCAL_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data |
197 | that ARRIVE from an address that resolves to the | |
198 | local mailer and which are converted to MIME will be | |
199 | labelled with this character set. | |
bee9d799 | 200 | LOCAL_SHELL_PATH [/bin/sh] The shell used to deliver piped email. |
1c61e291 EA |
201 | LOCAL_SHELL_FLAGS [eu] The flags used by the shell mailer. The |
202 | flags lsDFM are always included. | |
203 | LOCAL_SHELL_ARGS [sh -c $u] The arguments passed to deliver "prog" | |
204 | mail. | |
d015fbfb EA |
205 | LOCAL_SHELL_DIR [$z:/] The directory search path in which the |
206 | shell should run. | |
bee9d799 EA |
207 | USENET_MAILER_PATH [/usr/lib/news/inews] The name of the program |
208 | used to submit news. | |
209 | USENET_MAILER_FLAGS [rlsDFMmn] The mailer flags for the usenet mailer. | |
210 | USENET_MAILER_ARGS [-m -h -n] The command line arguments for the | |
211 | usenet mailer. | |
4e444ec8 EA |
212 | USENET_MAILER_MAX [100000] The maximum size of messages that will |
213 | be accepted by the usenet mailer. | |
5dd53c38 | 214 | SMTP_MAILER_FLAGS [undefined] Flags added to SMTP mailer. Default |
b0abd8b1 EA |
215 | flags are `mDFMUX' for all SMTP-based mailers; the |
216 | "esmtp" mailer adds `a' and "smtp8" adds `8'. | |
4e444ec8 | 217 | SMTP_MAILER_MAX [undefined] The maximum size of messages that will |
b0abd8b1 EA |
218 | be transported using the smtp, smtp8, or esmtp |
219 | mailers. | |
220 | SMTP_MAILER_ARGS [IPC $h] The arguments passed to the smtp mailer. | |
221 | About the only reason you would want to change this | |
222 | would be to change the default port. | |
223 | ESMTP_MAILER_ARGS [IPC $h] The arguments passed to the esmtp mailer. | |
224 | SMTP8_MAILER_ARGS [IPC $h] The arguments passed to the smtp8 mailer. | |
225 | RELAY_MAILER_ARGS [IPC $h] The arguments passed to the relay mailer. | |
51851acc EA |
226 | SMTP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data |
227 | that ARRIVE from an address that resolves to one of | |
228 | the SMTP mailers and which are converted to MIME will | |
229 | be labelled with this character set. | |
5dd53c38 | 230 | UUCP_MAILER_FLAGS [undefined] Flags added to UUCP mailer. Default |
4753516a EA |
231 | flags are `DFMhuU' (and `m' for uucp-new mailer, |
232 | minus `U' for uucp-dom mailer). | |
baf83fd6 | 233 | UUCP_MAILER_ARGS [uux - -r -z -a$g -gC $h!rmail ($u)] The arguments |
d8b2ad36 | 234 | passed to the UUCP mailer. |
51851acc | 235 | UUCP_MAILER_MAX [100000] The maximum size message accepted for |
1c61e291 | 236 | transmission by the UUCP mailers. |
51851acc EA |
237 | UUCP_MAILER_CHARSET [undefined] If defined, messages containing 8-bit data |
238 | that ARRIVE from an address that resolves to one of | |
239 | the UUCP mailers and which are converted to MIME will | |
240 | be labelled with this character set. | |
4e444ec8 EA |
241 | FAX_MAILER_PATH [/usr/local/lib/fax/mailfax] The program used to |
242 | submit FAX messages. | |
243 | FAX_MAILER_MAX [100000] The maximum size message accepted for | |
244 | transmission by FAX. | |
edae2ee6 EA |
245 | POP_MAILER_PATH [/usr/lib/mh/spop] The pathname of the POP mailer. |
246 | POP_MAILER_FLAGS [Penu] Flags added to POP mailer. Flags "lsDFM" | |
247 | are always added. | |
248 | POP_MAILER_ARGS [pop $u] The arguments passed to the POP mailer. | |
69982d42 EA |
249 | PROCMAIL_MAILER_FLAGS [Shu] Flags added to Procmail mailer. Flags |
250 | ``DFMmn'' are always set. | |
251 | PROCMAIL_MAILER_ARGS [procmail -m $h $f $u] The arguments passed to | |
252 | the Procmail mailer. | |
3d26fbcb EA |
253 | PROCMAIL_MAILER_MAX [undefined] If set, the maximum size message that |
254 | will be accepted by the procmail mailer. | |
4a51b074 | 255 | |
4a51b074 EA |
256 | +---------+ |
257 | | DOMAINS | | |
258 | +---------+ | |
259 | ||
260 | You will probably want to collect domain-dependent defines into one | |
261 | file, referenced by the DOMAIN macro. For example, our Berkeley | |
262 | domain file includes definitions for several internal distinguished | |
263 | hosts: | |
264 | ||
265 | UUCP_RELAY The host that will forward UUCP-addressed email. | |
266 | If not defined, all UUCP sites must be directly | |
bb3c21c3 | 267 | connected. |
4a51b074 EA |
268 | BITNET_RELAY The host that will forward BITNET-addressed email. |
269 | If not defined, the .BITNET pseudo-domain won't work. | |
f0a4cb9c EA |
270 | LOCAL_RELAY DEPRECATED. The site that will handle unqualified |
271 | names -- that is, names with out an @domain extension. | |
272 | If not set, they are assumed to belong on this machine. | |
273 | This allows you to have a central site to store a | |
4a51b074 | 274 | company- or department-wide alias database. This |
f0a4cb9c EA |
275 | only works at small sites, and only with some user |
276 | agents. | |
b0abd8b1 EA |
277 | LUSER_RELAY The site that will handle lusers -- that is, apparently |
278 | local names that aren't local accounts or aliases. | |
bb3c21c3 | 279 | |
b0abd8b1 | 280 | Any of these can be either ``mailer:hostname'' (in which case the |
4753516a | 281 | mailer is the internal mailer name, such as ``uucp-new'' and the hostname |
bb3c21c3 EA |
282 | is the name of the host as appropriate for that mailer) or just a |
283 | ``hostname'', in which case a default mailer type (usually ``relay'', | |
2e9b6f6e EA |
284 | a variant on SMTP) is used. WARNING: if you have a wildcard MX |
285 | record matching your domain, you probably want to define these to | |
286 | have a trailing dot so that you won't get the mail diverted back | |
287 | to yourself. | |
4a51b074 EA |
288 | |
289 | The domain file can also be used to define a domain name, if needed | |
6f02ae2f EA |
290 | (using "DD<domain>") and set certain site-wide features. If all hosts |
291 | at your site masquerade behind one email name, you could also use | |
292 | MASQUERADE_AS here. | |
4a51b074 | 293 | |
dec2b686 EA |
294 | You do not have to define a domain -- in particular, if you are a |
295 | single machine sitting off somewhere, it is probably more work than | |
296 | it's worth. This is just a mechanism for combining "domain dependent | |
297 | knowledge" into one place. | |
298 | ||
4a51b074 EA |
299 | +---------+ |
300 | | MAILERS | | |
301 | +---------+ | |
7ace9d88 EA |
302 | |
303 | There are fewer mailers supported in this version than the previous | |
304 | version, owing mostly to a simpler world. | |
305 | ||
306 | local The local and prog mailers. You will almost always | |
307 | need these; the only exception is if you relay ALL | |
fd82c288 EA |
308 | your mail to another site. This mailer is included |
309 | automatically. | |
7ace9d88 EA |
310 | |
311 | smtp The Simple Mail Transport Protocol mailer. This does | |
312 | not hide hosts behind a gateway or another other | |
313 | such hack; it assumes a world where everyone is | |
d8b2ad36 | 314 | running the name server. This file actually defines |
b0abd8b1 | 315 | four mailers: "smtp" for regular (old-style) SMTP to |
d8b2ad36 | 316 | other servers, "esmtp" for extended SMTP to other |
b0abd8b1 EA |
317 | servers, "smtp8" to do SMTP to other servers without |
318 | converting 8-bit data to MIME (essentially, this is | |
319 | your statement that you know the other end is 8-bit | |
320 | clean even if it doesn't say so), and "relay" for | |
321 | transmission to our RELAY_HOST, LUSER_RELAY, or | |
322 | MAILER_HUB. | |
7ace9d88 EA |
323 | |
324 | uucp The Unix-to-Unix Copy Program mailer. Actually, this | |
41187805 EA |
325 | defines two mailers, "uucp-old" (a.k.a. "uucp") and |
326 | "uucp-new" (a.k.a. "suucp"). The latter is for when you | |
327 | know that the UUCP mailer at the other end can handle | |
328 | multiple recipients in one transfer. If the smtp mailer | |
329 | is also included in your configuration, two other mailers | |
4753516a EA |
330 | ("uucp-dom" and "uucp-uudom") are also defined [warning: |
331 | you MUST specify MAILER(smtp) before MAILER(uucp)]. When you | |
41187805 | 332 | include the uucp mailer, sendmail looks for all names in |
2a20bc94 EA |
333 | the $=U class and sends them to the uucp-old mailer; all |
334 | names in the $=Y class are sent to uucp-new; and all | |
335 | names in the $=Z class are sent to uucp-uudom. Note that | |
4a51b074 EA |
336 | this is a function of what version of rmail runs on |
337 | the receiving end, and hence may be out of your control. | |
2a20bc94 EA |
338 | See the section below describing UUCP mailers in more |
339 | detail. | |
4a51b074 | 340 | |
bee9d799 EA |
341 | usenet Usenet (network news) delivery. If this is specified, |
342 | an extra rule is added to ruleset 0 that forwards all | |
343 | local email for users named ``group.usenet'' to the | |
344 | ``inews'' program. Note that this works for all groups, | |
345 | and may be considered a security problem. | |
346 | ||
63013ec3 EA |
347 | fax Facsimile transmission. This is experimental and based |
348 | on Sam Leffler's FlexFAX software. For more information, | |
349 | see below. | |
350 | ||
418602bc EA |
351 | pop Post Office Protocol. |
352 | ||
69982d42 EA |
353 | procmail An interface to procmail (does not come with sendmail). |
354 | This is designed to be used in mailertables. For example, | |
355 | a common question is "how do I forward all mail for a given | |
356 | domain to a single person?". If you have this mailer | |
357 | defined, you could set up a mailertable reading: | |
358 | ||
359 | host.com procmail:/etc/procmailrcs/host.com | |
360 | ||
361 | with the file /etc/procmailrcs/host.com reading: | |
362 | ||
363 | :0 # forward mail for host.com | |
364 | ! -oi -f $1 person@other.host | |
365 | ||
366 | This would arrange for (anything)@host.com to be sent | |
367 | to person@other.host. Within the procmail script, $1 is | |
368 | the name of the sender and $2 is the name of the recipient. | |
369 | If you use this with FEATURE(local_procmail), the FEATURE | |
370 | should be listed first. | |
371 | ||
1d64a22c EA |
372 | The local mailer accepts addresses of the form "user+detail", where |
373 | the "+detail" is not used for mailbox matching but is available | |
69982d42 | 374 | to certain local mail programs (in particular, see FEATURE(local_procmail)). |
1d64a22c EA |
375 | For example, "eric", "eric+sendmail", and "eric+sww" all indicate |
376 | the same user, but additional arguments <null>, "sendmail", and "sww" | |
377 | may be provided for use in sorting mail. | |
378 | ||
bee9d799 | 379 | |
4a51b074 EA |
380 | +----------+ |
381 | | FEATURES | | |
382 | +----------+ | |
383 | ||
384 | Special features can be requested using the "FEATURE" macro. For | |
385 | example, the .mc line: | |
386 | ||
387 | FEATURE(use_cw_file) | |
388 | ||
389 | tells sendmail that you want to have it read an /etc/sendmail.cw | |
3ad658d7 EA |
390 | file to get values for class $=w. The FEATURE may contain a single |
391 | optional parameter -- for example: | |
392 | ||
393 | FEATURE(mailertable, dbm /usr/lib/mailertable) | |
394 | ||
395 | Available features are: | |
4a51b074 EA |
396 | |
397 | use_cw_file Read the file /etc/sendmail.cw file to get alternate | |
398 | names for this host. This might be used if you were | |
399 | on a host that MXed for a dynamic set of other | |
400 | hosts. If the set is static, just including the line | |
401 | "Cw<name1> <name2> ..." is probably superior. | |
dec2b686 EA |
402 | The actual filename can be overridden by redefining |
403 | confCW_FILE. | |
f51c9ac8 | 404 | |
bee9d799 EA |
405 | redirect Reject all mail addressed to "address.REDIRECT" with |
406 | a ``551 User not local; please try <address>'' message. | |
407 | If this is set, you can alias people who have left | |
408 | to their new address with ".REDIRECT" appended. | |
f51c9ac8 | 409 | |
a33031f5 | 410 | nouucp Don't do anything special with UUCP addresses at all. |
f51c9ac8 | 411 | |
928fba03 EA |
412 | nocanonify Don't pass addresses to $[ ... $] for canonification. |
413 | This would generally only be used by sites that only | |
414 | act as mail gateways or which have user agents that do | |
bb3c21c3 EA |
415 | full canonification themselves. You may also want to |
416 | use "define(`confBIND_OPTS',`-DNSRCH -DEFNAMES')" to | |
417 | turn off the usual resolver options that do a similar | |
418 | thing. | |
f51c9ac8 | 419 | |
65739042 | 420 | stickyhost If set, email sent to "user@local.host" are marked |
da99e870 EA |
421 | as "sticky" -- that is, the local addresses aren't |
422 | matched against UDB and don't go through ruleset 5. | |
b0abd8b1 EA |
423 | This is used if you want a set up where "user" is |
424 | not necessarily the same as "user@local.host", e.g., | |
425 | to make a distinct domain-wide namespace. Prior to | |
426 | 8.7 this was the default, and notsticky was used to | |
427 | turn this off. | |
f51c9ac8 | 428 | |
3ad658d7 EA |
429 | mailertable Include a "mailer table" which can be used to override |
430 | routing for particular domains. The argument of the | |
431 | FEATURE may be the key definition. If none is specified, | |
432 | the definition used is: | |
6e8cccfc | 433 | hash -o /etc/mailertable |
d8b2ad36 EA |
434 | Keys in this database are fully qualified domain names |
435 | or partial domains preceded by a dot -- for example, | |
436 | "vangogh.CS.Berkeley.EDU" or ".CS.Berkeley.EDU". | |
437 | Values must be of the form: | |
3ad658d7 | 438 | mailer:domain |
d8b2ad36 EA |
439 | where "mailer" is the internal mailer name, and "domain" |
440 | is where to send the message. These maps are not | |
441 | reflected into the message header. | |
f51c9ac8 | 442 | |
d8b2ad36 | 443 | domaintable Include a "domain table" which can be used to provide |
e92659a8 EA |
444 | domain name mapping. Use of this should really be |
445 | limited to your own domains. It may be useful if you | |
446 | change names (e.g., your company changes names from | |
447 | oldname.com to newname.com). The argument of the | |
448 | FEATURE may be the key definition. If none is specified, | |
449 | the definition used is: | |
6e8cccfc | 450 | hash -o /etc/domaintable |
e92659a8 EA |
451 | The key in this table is the domain name; the value is |
452 | the new (fully qualified) domain. Anything in the | |
d8b2ad36 EA |
453 | domaintable is reflected into headers; that is, this |
454 | is done in ruleset 3. | |
f51c9ac8 | 455 | |
d1593b1a EA |
456 | bitdomain Look up bitnet hosts in a table to try to turn them into |
457 | internet addresses. The table can be built using the | |
2e9b6f6e | 458 | bitdomain program contributed by John Gardiner Myers. |
d1593b1a EA |
459 | The argument of the FEATURE may be the key definition; if |
460 | none is specified, the definition used is: | |
6e8cccfc | 461 | hash -o /etc/bitdomain.db |
d1593b1a EA |
462 | Keys are the bitnet hostname; values are the corresponding |
463 | internet hostname. | |
f51c9ac8 | 464 | |
4f1c78c0 EA |
465 | uucpdomain Similar feature for UUCP hosts. The default map definition |
466 | is: | |
6e8cccfc | 467 | hash -o /etc/uudomain.db |
4f1c78c0 EA |
468 | At the moment there is no automagic tool to build this |
469 | database. | |
f51c9ac8 | 470 | |
c62d746c EA |
471 | always_add_domain |
472 | Include the local host domain even on locally delivered | |
473 | mail. Normally it is not added unless it is already | |
474 | present. | |
f51c9ac8 | 475 | |
d8b2ad36 EA |
476 | allmasquerade If masquerading is enabled (using MASQUERADE_AS), this |
477 | feature will cause recipient addresses to also masquerade | |
478 | as being from the masquerade host. Normally they get | |
479 | the local hostname. Although this may be right for | |
480 | ordinary users, it can break local aliases. For example, | |
481 | if you send to "localalias", the originating sendmail will | |
482 | find that alias and send to all members, but send the | |
483 | message with "To: localalias@masqueradehost". Since that | |
484 | alias likely does not exist, replies will fail. Use this | |
485 | feature ONLY if you can guarantee that the ENTIRE | |
486 | namespace on your masquerade host supersets all the | |
487 | local entries. | |
f51c9ac8 | 488 | |
2e9b6f6e EA |
489 | nodns We aren't running DNS at our site (for example, |
490 | we are UUCP-only connected). It's hard to consider | |
491 | this a "feature", but hey, it had to go somewhere. | |
4a51b074 | 492 | |
f51c9ac8 EA |
493 | nullclient This is a special case -- it creates a stripped down |
494 | configuration file containing nothing but support for | |
de0c51e7 EA |
495 | forwarding all mail to a central hub via a local |
496 | SMTP-based network. The argument is the name of that | |
497 | hub. | |
498 | ||
499 | The only other feature that should be used in conjunction | |
500 | with this one is "nocanonify" (this causes addresses to | |
501 | be sent unqualified via the SMTP connection; normally | |
502 | they are qualifed with the masquerade name, which | |
503 | defaults to the name of the hub machine). No mailers | |
504 | should be defined. No aliasing or forwarding is done. | |
f51c9ac8 | 505 | |
69982d42 | 506 | local_procmail Use procmail as the local mailer. This mailer can |
1d64a22c EA |
507 | make use of the "user+indicator@local.host" syntax; |
508 | normally the +indicator is just tossed, but by default | |
509 | it is passed as the -a argument to procmail. The | |
510 | argument to this feature is the pathname of procmail, | |
511 | which defaults to /usr/local/bin/procmail. | |
512 | ||
df106895 EA |
513 | bestmx_is_local Accept mail as though locally addressed for any host that |
514 | lists us as the best possible MX record. This generates | |
515 | additional DNS traffic, but should be OK for low to | |
516 | medium traffic hosts. | |
517 | ||
11a3cb39 EA |
518 | smrsh Use the SendMail Restricted SHell (smrsh) provided |
519 | with the distribution instead of /bin/sh for mailing | |
520 | to programs. This improves the ability of the local | |
521 | system administrator to control what gets run via | |
522 | e-mail. If an argument is provided it is used as the | |
523 | pathname to smrsh; otherwise, /usr/local/etc/smrsh is | |
524 | assumed. | |
525 | ||
bee9d799 | 526 | |
4a51b074 EA |
527 | +-------+ |
528 | | HACKS | | |
529 | +-------+ | |
530 | ||
531 | Some things just can't be called features. To make this clear, | |
fd82c288 | 532 | they go in the hack subdirectory and are referenced using the HACK |
4a51b074 EA |
533 | macro. These will tend to be site-dependent. The release |
534 | includes the Berkeley-dependent "cssubdomain" hack (that makes | |
535 | sendmail accept local names in either Berkeley.EDU or CS.Berkeley.EDU; | |
536 | this is intended as a short-term aid while we move hosts into | |
537 | subdomains. | |
538 | ||
bee9d799 | 539 | |
4a51b074 EA |
540 | +--------------------+ |
541 | | SITE CONFIGURATION | | |
542 | +--------------------+ | |
543 | ||
baf83fd6 EA |
544 | ***************************************************** |
545 | * This section is really obsolete, and is preserved * | |
546 | * only for back compatibility. You should plan on * | |
547 | * using mailertables for new installations. In * | |
548 | * particular, it doesn't work for the newer forms * | |
549 | * of UUCP mailers, such as uucp-uudom. * | |
550 | ***************************************************** | |
551 | ||
4a51b074 EA |
552 | Complex sites will need more local configuration information, such as |
553 | lists of UUCP hosts they speak with directly. This can get a bit more | |
554 | tricky. For an example of a "complex" site, see cf/ucbvax.mc. | |
555 | ||
c833924a EA |
556 | If your host is known by several different names, you need to augment |
557 | the $=w class. This is a list of names by which you are known, and | |
558 | anything sent to an address using a host name in this list will be | |
559 | treated as local mail. You can do this in two ways: either create | |
560 | the file /etc/sendmail.cw containing a list of your aliases (one per | |
561 | line), and use ``FEATURE(use_cw_file)'' in the .mc file, or add the | |
562 | line: | |
563 | ||
564 | Cw alias.host.name | |
565 | ||
566 | at the end of that file. See the ``vangogh.mc'' file for an example. | |
567 | Be sure you use the fully-qualified name of the host, rather than a | |
568 | short name. | |
569 | ||
4a51b074 EA |
570 | The SITECONFIG macro allows you to indirectly reference site-dependent |
571 | configuration information stored in the siteconfig subdirectory. For | |
572 | example, the line | |
573 | ||
574 | SITECONFIG(uucp.ucbvax, ucbvax, U) | |
575 | ||
576 | reads the file uucp.ucbvax for local connection information. The | |
577 | second parameter is the local name (in this case just "ucbvax" since | |
c833924a EA |
578 | it is locally connected, and hence a UUCP hostname). The third |
579 | parameter is the name of both a macro to store the local name (in | |
580 | this case, $U) and the name of the class (e.g., $=U) in which to store | |
581 | the host information read from the file. Another SITECONFIG line reads | |
4a51b074 EA |
582 | |
583 | SITECONFIG(uucp.ucbarpa, ucbarpa.Berkeley.EDU, W) | |
584 | ||
585 | This says that the file uucp.ucbarpa contains the list of UUCP sites | |
586 | connected to ucbarpa.Berkeley.EDU. The $=W class will be used to | |
c833924a EA |
587 | store this list, and $W is defined to be ucbarpa.Berkeley.EDU, that |
588 | is, the name of the relay to which the hosts listed in uucp.ucbarpa | |
589 | are connected. [The machine ucbarpa is gone now, but I've left | |
4a51b074 EA |
590 | this out-of-date configuration file around to demonstrate how you |
591 | might do this.] | |
592 | ||
c833924a EA |
593 | Note that the case of SITECONFIG with a third parameter of ``U'' is |
594 | special; the second parameter is assumed to be the UUCP name of the | |
595 | local site, rather than the name of a remote site, and the UUCP name | |
596 | is entered into $=w (the list of local hostnames) as $U.UUCP. | |
597 | ||
4a51b074 EA |
598 | The siteconfig file (e.g., siteconfig/uucp.ucbvax.m4) contains nothing |
599 | more than a sequence of SITE macros describing connectivity. For | |
600 | example: | |
601 | ||
602 | SITE(cnmat) | |
603 | SITE(sgi olympus) | |
604 | ||
605 | The second example demonstrates that you can use two names on the | |
606 | same line; these are usually aliases for the same host (or are at | |
607 | least in the same company). | |
608 | ||
bee9d799 | 609 | |
2a20bc94 EA |
610 | +--------------------+ |
611 | | USING UUCP MAILERS | | |
612 | +--------------------+ | |
613 | ||
614 | It's hard to get UUCP mailers right because of the extremely ad hoc | |
615 | nature of UUCP addressing. These config files are really designed | |
616 | for domain-based addressing, even for UUCP sites. | |
617 | ||
618 | There are four UUCP mailers available. The choice of which one to | |
619 | use is partly a matter of local preferences and what is running at | |
620 | the other end of your UUCP connection. Unlike good protocols that | |
621 | define what will go over the wire, UUCP uses the policy that you | |
622 | should do what is right for the other end; if they change, you have | |
623 | to change. This makes it hard to do the right thing, and discourages | |
624 | people from updating their software. In general, if you can avoid | |
625 | UUCP, please do. | |
626 | ||
627 | The major choice is whether to go for a domainized scheme or a | |
628 | non-domainized scheme. This depends entirely on what the other | |
629 | end will recognize. If at all possible, you should encourage the | |
630 | other end to go to a domain-based system -- non-domainized addresses | |
631 | don't work entirely properly. | |
632 | ||
633 | The four mailers are: | |
634 | ||
635 | uucp-old (obsolete name: "uucp") | |
636 | This is the oldest, the worst (but the closest to UUCP) way of | |
637 | sending messages accros UUCP connections. It does bangify | |
638 | everything and prepends $U (your UUCP name) to the sender's | |
639 | address (which can already be a bang path itself). It can | |
640 | only send to one address at a time, so it spends a lot of | |
641 | time copying duplicates of messages. Avoid this if at all | |
642 | possible. | |
643 | ||
644 | uucp-new (obsolete name: "suucp") | |
645 | The same as above, except that it assumes that in one rmail | |
646 | command you can specify several recipients. It still has a | |
647 | lot of other problems. | |
648 | ||
649 | uucp-dom | |
650 | This UUCP mailer keeps everything as domain addresses. | |
41187805 EA |
651 | Basically, it uses the SMTP mailer rewriting rules. This mailer |
652 | is only included if MAILER(smtp) is also specified. | |
2a20bc94 EA |
653 | |
654 | Unfortunately, a lot of UUCP mailer transport agents require | |
655 | bangified addresses in the envelope, although you can use | |
656 | domain-based addresses in the message header. (The envelope | |
657 | shows up as the From_ line on UNIX mail.) So.... | |
658 | ||
659 | uucp-uudom | |
660 | This is a cross between uucp-new (for the envelope addresses) | |
661 | and uucp-dom (for the header addresses). It bangifies the | |
662 | envelope sender (From_ line in messages) without adding the | |
663 | local hostname, unless there is no host name on the address | |
664 | at all (e.g., "wolf") or the host component is a UUCP host name | |
665 | instead of a domain name ("somehost!wolf" instead of | |
41187805 EA |
666 | "some.dom.ain!wolf"). This is also included only if MAILER(smtp) |
667 | is also specified. | |
2a20bc94 EA |
668 | |
669 | Examples: | |
670 | ||
671 | We are on host grasp.insa-lyon.fr (UUCP host name "grasp"). The | |
672 | following summarizes the sender rewriting for various mailers. | |
673 | ||
674 | Mailer sender rewriting in the envelope | |
675 | ------ ------ ------------------------- | |
676 | uucp-{old,new} wolf grasp!wolf | |
677 | uucp-dom wolf wolf@grasp.insa-lyon.fr | |
678 | uucp-uudom wolf grasp.insa-lyon.fr!wolf | |
679 | ||
680 | uucp-{old,new} wolf@fr.net grasp!fr.net!wolf | |
681 | uucp-dom wolf@fr.net wolf@fr.net | |
682 | uucp-uudom wolf@fr.net fr.net!wolf | |
683 | ||
684 | uucp-{old,new} somehost!wolf grasp!somehost!wolf | |
685 | uucp-dom somehost!wolf somehost!wolf@grasp.insa-lyon.fr | |
686 | uucp-uudom somehost!wolf grasp.insa-lyon.fr!somehost!wolf | |
687 | ||
688 | If you are using one of the domainized UUCP mailers, you really want | |
689 | to convert all UUCP addresses to domain format -- otherwise, it will | |
690 | do it for you (and probably not the way you expected). For example, | |
691 | if you have the address foo!bar!baz (and you are not sending to foo), | |
692 | the heuristics will add the @uucp.relay.name or @local.host.name to | |
693 | this address. However, if you map foo to foo.host.name first, it | |
694 | will not add the local hostname. You can do this using the uucpdomain | |
695 | feature. | |
696 | ||
697 | ||
4a51b074 EA |
698 | +-------------------+ |
699 | | TWEAKING RULESETS | | |
700 | +-------------------+ | |
9df1b56b EA |
701 | |
702 | For more complex configurations, you can define special rules. | |
703 | The macro LOCAL_RULE_3 introduces rules that are used in canonicalizing | |
704 | the names. Any modifications made here are reflected in the header. | |
705 | ||
706 | A common use is to convert old UUCP addreses to SMTP addresses using | |
707 | the UUCPSMTP macro. For example: | |
708 | ||
709 | LOCAL_RULE_3 | |
710 | UUCPSMTP(decvax, decvax.dec.com) | |
711 | UUCPSMTP(research, research.att.com) | |
712 | ||
713 | will cause addresses of the form "decvax!user" and "research!user" | |
714 | to be converted to "user@decvax.dec.com" and "user@research.att.com" | |
715 | respectively. | |
716 | ||
6fb312a3 | 717 | This could also be used to look up hosts in a database map: |
4a51b074 EA |
718 | |
719 | LOCAL_RULE_3 | |
720 | R$* < @ $+ > $* $: $1 < @ $(hostmap $2 $) > $3 | |
721 | ||
722 | This map would be defined in the LOCAL_CONFIG portion, as shown below. | |
723 | ||
9df1b56b EA |
724 | Similarly, LOCAL_RULE_0 can be used to introduce new parsing rules. |
725 | For example, new rules are needed to parse hostnames that you accept | |
c573210d EA |
726 | via MX records. For example, you might have: |
727 | ||
728 | LOCAL_RULE_0 | |
2c56efa0 | 729 | R$+ <@ host.dom.ain.> $#uucp $@ cnmat $: $1 < @ host.dom.ain.> |
c573210d EA |
730 | |
731 | You would use this if you had installed an MX record for cnmat.Berkeley.EDU | |
732 | pointing at this host; this rule catches the message and forwards it on | |
733 | using UUCP. | |
9df1b56b | 734 | |
06630be3 EA |
735 | You can also tweak rulesets 1 and 2 using LOCAL_RULE_1 and LOCAL_RULE_2. |
736 | These rulesets are normally empty. | |
737 | ||
4a51b074 EA |
738 | A similar macro is LOCAL_CONFIG. This introduces lines added after the |
739 | boilerplate option setting but before rulesets, and can be used to | |
a151c868 | 740 | declare local database maps or whatever. For example: |
4a51b074 EA |
741 | |
742 | LOCAL_CONFIG | |
743 | Khostmap hash /etc/hostmap.db | |
744 | Kyplocal nis -m hosts.byname | |
4a51b074 | 745 | |
bee9d799 | 746 | |
4a51b074 EA |
747 | +---------------------------+ |
748 | | MASQUERADING AND RELAYING | | |
749 | +---------------------------+ | |
750 | ||
751 | You can have your host masquerade as another using | |
752 | ||
753 | MASQUERADE_AS(host.domain) | |
9df1b56b | 754 | |
6fb312a3 | 755 | This causes outgoing SMTP mail to be labeled as coming from the |
4a51b074 | 756 | indicated domain, rather than $j. One normally masquerades as one |
6fb312a3 | 757 | of one's own subdomains (for example, it's unlikely that I would |
4a51b074 EA |
758 | choose to masquerade as an MIT site). |
759 | ||
2e9b6f6e EA |
760 | The masquerade name is not normally canonified, so it is important |
761 | that it be your One True Name, that is, fully qualified and not a | |
762 | CNAME. | |
763 | ||
4a51b074 EA |
764 | there are always users that need to be "exposed" -- that is, their |
765 | internal site name should be displayed instead of the masquerade name. | |
766 | Root is an example. You can add users to this list using | |
767 | ||
768 | EXPOSED_USER(usernames) | |
769 | ||
770 | This adds users to class E; you could also use something like | |
771 | ||
772 | FE/etc/sendmail.cE | |
773 | ||
774 | You can also arrange to relay all unqualified names (that is, names | |
775 | without @host) to a relay host. For example, if you have a central | |
776 | email server, you might relay to that host so that users don't have | |
777 | to have .forward files or aliases. You can do this using | |
778 | ||
28b51619 | 779 | define(`LOCAL_RELAY', mailer:hostname) |
4a51b074 | 780 | |
28b51619 EA |
781 | The ``mailer:'' can be omitted, in which case the mailer defaults to |
782 | "smtp". There are some user names that you don't want relayed, perhaps | |
783 | because of local aliases. A common example is root, which may be | |
784 | locally aliased. You can add entries to this list using | |
4a51b074 EA |
785 | |
786 | LOCAL_USER(usernames) | |
787 | ||
788 | This adds users to class L; you could also use something like | |
789 | ||
790 | FL/etc/sendmail.cL | |
791 | ||
2e9b6f6e EA |
792 | If you want all incoming mail sent to a centralized hub, as for a |
793 | shared /var/spool/mail scheme, use | |
34e49bd3 | 794 | |
28b51619 | 795 | define(`MAIL_HUB', mailer:hostname) |
34e49bd3 | 796 | |
28b51619 | 797 | Again, ``mailer:'' defaults to "smtp". If you define both LOCAL_RELAY |
f0a4cb9c EA |
798 | and MAIL_HUB _AND_ you have FEATURE(stickyhost), unqualified names will |
799 | be sent to the LOCAL_RELAY and other local names will be sent to MAIL_HUB. | |
800 | Names in $=L will be delivered locally, so you MUST have aliases or | |
801 | .forward files for them. | |
0ee1617f | 802 | |
f0a4cb9c EA |
803 | For example, if are on machine mastodon.CS.Berkeley.EDU and you have |
804 | FEATURE(stickyhost), the following combinations of settings will have the | |
805 | indicated effects: | |
34e49bd3 EA |
806 | |
807 | email sent to.... eric eric@mastodon.CS.Berkeley.EDU | |
808 | ||
809 | LOCAL_RELAY set to mail.CS.Berkeley.EDU (delivered locally) | |
f0a4cb9c | 810 | mail.CS.Berkeley.EDU (no local aliasing) (aliasing done) |
34e49bd3 EA |
811 | |
812 | MAIL_HUB set to mammoth.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU | |
f0a4cb9c | 813 | mammoth.CS.Berkeley.EDU (aliasing done) (aliasing done) |
34e49bd3 EA |
814 | |
815 | Both LOCAL_RELAY and mail.CS.Berkeley.EDU mammoth.CS.Berkeley.EDU | |
f0a4cb9c EA |
816 | MAIL_HUB set as above (no local aliasing) (aliasing done) |
817 | ||
818 | If you do not have FEATURE(stickyhost) set, then LOCAL_RELAY and | |
819 | MAIL_HUB act identically, with MAIL_HUB taking precedence. | |
34e49bd3 | 820 | |
2e9b6f6e EA |
821 | If you want all outgoing mail to go to a central relay site, define |
822 | SMART_HOST as well. Briefly: | |
823 | ||
824 | LOCAL_RELAY applies to unqualifed names (e.g., "eric"). | |
825 | MAIL_HUB applies to names qualified with the name of the | |
826 | local host (e.g., "eric@mastodon.CS.Berkeley.EDU"). | |
827 | SMART_HOST applies to names qualified with other hosts. | |
828 | ||
829 | However, beware that other relays (e.g., UUCP_RELAY, BITNET_RELAY, and | |
830 | FAX_RELAY) take precedence over SMART_HOST, so if you really want | |
831 | absolutely everything to go to a single central site you will need to | |
832 | unset all the other relays -- or better yet, find or build a minimal | |
833 | config file that does this. | |
834 | ||
28b51619 EA |
835 | |
836 | +-------------------------------+ | |
837 | | NON-SMTP BASED CONFIGURATIONS | | |
838 | +-------------------------------+ | |
839 | ||
840 | These configuration files are designed primarily for use by SMTP-based | |
841 | sites. I don't pretend that they are well tuned for UUCP-only or | |
842 | UUCP-primarily nodes (the latter is defined as a small local net | |
843 | connected to the rest of the world via UUCP). However, there is one | |
844 | hook to handle some special cases. | |
845 | ||
846 | You can define a ``smart host'' that understands a richer address syntax | |
847 | using: | |
848 | ||
849 | define(`SMART_HOST', mailer:hostname) | |
850 | ||
bb3c21c3 | 851 | In this case, the ``mailer:'' defaults to "relay". Any messages that |
28b51619 EA |
852 | can't be handled using the usual UUCP rules are passed to this host. |
853 | ||
854 | If you are on a local SMTP-based net that connects to the outside | |
855 | world via UUCP, you can use LOCAL_NET_CONFIG to add appropriate rules. | |
856 | For example: | |
857 | ||
858 | define(`SMART_HOST', suucp:uunet) | |
859 | LOCAL_NET_CONFIG | |
d8b2ad36 | 860 | R$* < @ $* .$m. > $* $#smtp $@ $2.$m. $: $1 < @ $2.$m. > $3 |
28b51619 EA |
861 | |
862 | This will cause all names that end in your domain name ($m) via | |
863 | SMTP; anything else will be sent via suucp (smart UUCP) to uunet. | |
d8b2ad36 EA |
864 | If you have FEATURE(nocanonify), you may need to omit the dots after |
865 | the $m. If you are running a local DNS inside your domain which is | |
866 | not otherwise connected to the outside world, you probably want to | |
867 | use: | |
868 | ||
869 | define(`SMART_HOST', smtp:fire.wall.com) | |
870 | LOCAL_NET_CONFIG | |
871 | R$* < @ $* . > $* $#smtp $@ $2. $: $1 < @ $2. > $3 | |
872 | ||
873 | That is, send directly only to things you found in your DNS lookup; | |
874 | anything else goes through SMART_HOST. | |
28b51619 | 875 | |
2e9b6f6e EA |
876 | If you are not running DNS at all, it is important to use |
877 | FEATURE(nodns) to avoid having sendmail queue everything waiting | |
878 | for the name server to come up. | |
879 | ||
28b51619 | 880 | |
f7e8be31 EA |
881 | +-----------+ |
882 | | WHO AM I? | | |
883 | +-----------+ | |
884 | ||
885 | Normally, the $j macro is automatically defined to be your fully | |
886 | qualified domain name (FQDN). Sendmail does this by getting your | |
887 | host name using gethostname and then calling gethostbyname on the | |
888 | result. For example, in some environments gethostname returns | |
889 | only the root of the host name (such as "foo"); gethostbyname is | |
890 | supposed to return the FQDN ("foo.bar.com"). In some (fairly rare) | |
891 | cases, gethostbyname may fail to return the FQDN. In this case | |
892 | you MUST define confDOMAIN_NAME to be your fully qualified domain | |
893 | name. This is usually done using: | |
894 | ||
895 | Dmbar.com | |
896 | define(`confDOMAIN_NAME', `$w.$m')dnl | |
897 | ||
898 | ||
bb3c21c3 EA |
899 | +--------------------+ |
900 | | USING MAILERTABLES | | |
901 | +--------------------+ | |
902 | ||
903 | To use FEATURE(mailertable), you will have to create an external | |
904 | database containing the routing information for various domains. | |
905 | For example, a mailertable file in text format might be: | |
906 | ||
907 | .my.domain xnet:%1.my.domain | |
908 | uuhost1.my.domain suucp:uuhost1 | |
909 | .bitnet smtp:relay.bit.net | |
910 | ||
911 | This should normally be stored in /etc/mailertable. The actual | |
912 | database version of the mailertable is built using: | |
913 | ||
914 | makemap hash /etc/mailertable.db < /etc/mailertable | |
915 | ||
916 | The semantics are simple. Any LHS entry that does not begin with | |
917 | a dot matches the full host name indicated. LHS entries beginning | |
918 | with a dot match anything ending with that domain name -- that is, | |
919 | they can be thought of as having a leading "*" wildcard. Matching | |
920 | is done in order of most-to-least qualified -- for example, even | |
921 | though ".my.domain" is listed first in the above example, an entry | |
922 | of "uuhost1.my.domain" will match the second entry since it is | |
923 | more explicit. | |
924 | ||
925 | The RHS should always be a "mailer:host" pair. The mailer is the | |
926 | configuration name of a mailer (that is, an `M' line in the | |
927 | sendmail.cf file). The "host" will be the hostname passed to | |
928 | that mailer. In domain-based matches (that is, those with leading | |
929 | dots) the "%1" may be used to interpolate the wildcarded part of | |
930 | the host name. For example, the first line above sends everything | |
931 | addressed to "anything.my.domain" to that same host name, but using | |
932 | the (presumably experimental) xnet mailer. | |
933 | ||
b0abd8b1 EA |
934 | In some cases you may want to temporarily turn off MX records, |
935 | particularly on gateways. For example, you may want to MX | |
936 | everything in a domain to one machine that then forwards it | |
937 | directly. To do this, you might use the DNS configuration: | |
938 | ||
939 | *.domain. IN MX 0 relay.machine | |
940 | ||
941 | and on relay.machine use the mailertable: | |
942 | ||
943 | .domain smtp:[gateway.domain] | |
944 | ||
945 | The [square brackets] turn off MX records for this host only. | |
946 | If you didn't do this, the mailertable would use the MX record | |
947 | again, which would give you an MX loop. | |
948 | ||
bb3c21c3 | 949 | |
2e9b6f6e EA |
950 | +--------------------------------+ |
951 | | USING USERDB TO MAP FULL NAMES | | |
952 | +--------------------------------+ | |
953 | ||
954 | The user database was not originally intended for mapping full names | |
955 | to login names (e.g., Eric.Allman => eric), but some people are using | |
956 | it that way. (I would recommend that you set up aliases for this | |
957 | purpose instead -- since you can specify multiple alias files, this | |
958 | is fairly easy.) The intent was to locate the default maildrop at | |
959 | a site, but allow you to override this by sending to a specific host. | |
960 | ||
961 | If you decide to set up the user database in this fashion, it is | |
65739042 | 962 | imperative that you not use FEATURE(stickyhost) -- otherwise, |
2e9b6f6e EA |
963 | e-mail sent to Full.Name@local.host.name will be rejected. |
964 | ||
65739042 | 965 | To build the internal form of the user database, use: |
f7e8be31 EA |
966 | |
967 | makemap btree /usr/data/base.db < /usr/data/base.txt | |
968 | ||
2e9b6f6e | 969 | |
f4d9c9f9 EA |
970 | +--------------------------------+ |
971 | | MISCELLANEOUS SPECIAL FEATURES | | |
972 | +--------------------------------+ | |
973 | ||
974 | DOTTED_USER(name) | |
975 | Sometimes it is convenient to merge configuration on a | |
976 | centralized mail machine, for example, to forward all | |
977 | root mail to a mail server. In this case it might be | |
978 | useful to be able to treat the root addresses as a class | |
979 | of addresses with subtle differences. You can do this | |
980 | using dotted users. For example, a client might include | |
981 | the alias: | |
982 | ||
983 | root: root.client1@server | |
984 | ||
985 | On the server, the mail configuration would include: | |
986 | ||
987 | DOTTED_USER(root) | |
988 | ||
989 | Aliases on the server that would match this address would | |
990 | be "root.client", "root.*", and "root", tried in that | |
991 | order. You can specify multiple addresses either by | |
992 | joining them in one DOTTTED_USER macro or by having | |
993 | multiple macros: | |
994 | ||
995 | DOTTED_USER(root) | |
996 | DOTTED_USER(postmaster mailer-daemon) | |
997 | ||
998 | defines three dotted users. | |
999 | ||
1000 | ||
bbf8c7ae EA |
1001 | +----------------+ |
1002 | | SECURITY NOTES | | |
1003 | +----------------+ | |
1004 | ||
1005 | A lot of sendmail security comes down to you. Sendmail 8 is much | |
1006 | more careful about checking for security problems than previous | |
1007 | versions, but there are some things that you still need to watch | |
1008 | for. In particular: | |
1009 | ||
1010 | * Make sure the aliases file isn't writable except by trusted | |
1011 | system personnel. This includes both the text and database | |
1012 | version. | |
1013 | ||
1014 | * Make sure that other files that sendmail reads, such as the | |
1015 | mailertable, is only writable by trusted system personnel. | |
1016 | ||
1017 | * The queue directory should not be world writable PARTICULARLY | |
1018 | if your system allows "file giveaways" (that is, if a non-root | |
1019 | user can chown any file they own to any other user). | |
1020 | ||
1021 | * If your system allows file giveaways, DO NOT create a publically | |
1022 | writable directory for forward files. This will allow anyone | |
1023 | to steal anyone else's e-mail. Instead, create a script that | |
1024 | copies the .forward file from users' home directories once a | |
1025 | night (if you want the non-NFS-mounted forward directory). | |
1026 | ||
1027 | * If your system allows file giveaways, you'll find that | |
1028 | sendmail is much less trusting of :include: files -- in | |
1029 | particular, you'll have to have /SENDMAIL/ANY/SHELL/ in | |
1030 | /etc/shells before they will be trusted (that is, before | |
1031 | files and programs listed in them will be honored). | |
1032 | ||
1033 | In general, file giveaways are a mistake -- if you can turn them | |
1034 | off I recommend you do so. | |
1035 | ||
1036 | ||
63013ec3 EA |
1037 | +------------------+ |
1038 | | FlexFAX SOFTWARE | | |
1039 | +------------------+ | |
1040 | ||
1041 | Sam Leffler's FlexFAX software is still in beta test -- but he expects a | |
1042 | public version out "later this week" [as of 3/1/93]. The following | |
1043 | blurb is direct from Sam: | |
1044 | ||
d1ad6cf3 | 1045 | $Header: /usr/people/sam/fax/RCS/HOWTO,v 1.14 93/05/24 11:42:16 sam Exp $ |
63013ec3 EA |
1046 | |
1047 | How To Obtain This Software (in case all you get is this file) | |
d1ad6cf3 | 1048 | -------------------------------------------------------------- |
63013ec3 | 1049 | The source code is available for public ftp on |
d1ad6cf3 | 1050 | sgi.com sgi/fax/v2.1.src.tar.Z |
63013ec3 EA |
1051 | (192.48.153.1) |
1052 | ||
1053 | You can also obtain inst'able images for Silicon Graphics machines from | |
d1ad6cf3 | 1054 | sgi.com sgi/fax/v2.1.inst.tar |
63013ec3 EA |
1055 | (192.48.153.1) |
1056 | ||
1057 | For example, | |
1058 | % ftp -n sgi.com | |
1059 | .... | |
1060 | ftp> user anonymous | |
1061 | ... <type in password> | |
1062 | ftp> cd sgi/fax | |
1063 | ftp> binary | |
d1ad6cf3 EA |
1064 | ftp> get v2.1.src.tar.Z |
1065 | ||
1066 | In general, the latest version of the 2.1 release of the software is | |
1067 | always available as "v2.1.src.tar.Z" or "v2.1.inst.tar" in the ftp | |
1068 | directory. This file is a link to the appropriate released version (so | |
1069 | don't waste your time retrieving the linked file as well!) Any files of | |
1070 | the form v2.1.*.patch are shell scripts that can be used to patch older | |
1071 | versions of the source code. For example, the file v2.1.0.patch would | |
1072 | contain patches to update v2.1.0.tar.Z. (Note to beta testers: this is | |
1073 | different than the naming conventions used during beta testing.) Patch | |
1074 | files only work to go between consecutive versions, so if you are | |
1075 | multiple versions behind the latest release, you will need to apply | |
1076 | each patch file between your current version and the latest. | |
1077 | ||
1078 | ||
1079 | Obtaining the Software by Electronic Mail | |
1080 | ----------------------------------------- | |
1081 | Do not send me requests for the software; they will be ignored (without | |
1082 | response). If you cannot use FTP at all, there is a service called | |
1083 | "ftpmail" available from gatekeeper.dec.com: you can send e-mail to | |
1084 | this machine and it will use FTP to retrieve files for you and send you | |
1085 | the files back again via e-mail. To find out more about the ftpmail | |
63013ec3 EA |
1086 | service, send a message to "ftpmail@gatekeeper.dec.com" whose body |
1087 | consists of the single line "help". | |
1088 | ||
d1ad6cf3 EA |
1089 | |
1090 | Obtaining the Software Within Silicon Graphics | |
1091 | ---------------------------------------------- | |
63013ec3 | 1092 | Internal to Silicon Graphics there are inst'able images on the host |
d1ad6cf3 | 1093 | flake.asd in the directory /usr/dist. Thus you can do something like: |
63013ec3 | 1094 | |
d1ad6cf3 | 1095 | % inst -f flake.asd.sgi.com:/usr/dist/flexfax |
63013ec3 | 1096 | |
d1ad6cf3 | 1097 | to install the latest version of the software on your machine. |
63013ec3 | 1098 | |
d1ad6cf3 EA |
1099 | |
1100 | What to do Once You've Retrieved Stuff | |
1101 | -------------------------------------- | |
63013ec3 EA |
1102 | The external distributions come in a compressed or uncompressed tar |
1103 | file. To extract the source distribution: | |
1104 | ||
d1ad6cf3 | 1105 | % zcat v2.1.src.tar.Z | tar xf - |
63013ec3 EA |
1106 | |
1107 | (uncompress and extract individual files in current directory). To | |
1108 | unpack and install the client portion of the inst'able distribution: | |
1109 | ||
1110 | % mkdir dist | |
d1ad6cf3 | 1111 | % cd dist; tar xf ../v2.1.inst.tar; cd .. |
63013ec3 EA |
1112 | % inst -f dist/flexfax |
1113 | ... | |
1114 | inst> go | |
1115 | ||
1116 | (Note, the dist subdirectory is because some versions of inst fail if | |
d1ad6cf3 EA |
1117 | the files are in the current directory.) Server binaries are also |
1118 | included in the inst'able images as flexfax.server.*. They are not | |
1119 | installed by default, so to get them also you need to do: | |
63013ec3 EA |
1120 | |
1121 | % inst -f flexfax | |
1122 | ... | |
1123 | inst> install flexfax.server.* | |
1124 | inst> go | |
1125 | ||
d1ad6cf3 | 1126 | The SGI binaries were built for Version 4.0.5H of the IRIX operating |
63013ec3 EA |
1127 | system. They should work w/o problem on earlier versions of the |
1128 | system, but I have not fully tested this. Also, note that to install a | |
1129 | server on an SGI machine, you need to have installed the Display | |
1130 | PostScript execution environment product (dps_eoe). Otherwise, the fax | |
1131 | server will not be able to convert PostScript to facsimile for | |
1132 | transmission. | |
1133 | ||
d1ad6cf3 EA |
1134 | If you are working from the source distribution, look at the file |
1135 | README in the top of the source tree. If you are working from the inst | |
1136 | images, the subsystem flexfax.man.readme contains the README file and | |
1137 | other useful pieces of information--the installed files are placed in | |
1138 | the directory /usr/local/doc/flexfax). Basically you will need to run | |
1139 | the faxaddmodem script to setup and configure your fax modem. Consult | |
1140 | the README file and the manual page for faxaddmodem for information. | |
63013ec3 | 1141 | |
63013ec3 | 1142 | |
d1ad6cf3 EA |
1143 | FlexFAX Mail List |
1144 | ----------------- | |
63013ec3 EA |
1145 | A mailing list for users of this software is located on sgi.com. |
1146 | If you want to join this mailing list or have a list-related request | |
1147 | such as getting your name removed from it, send a request to | |
1148 | ||
d1ad6cf3 EA |
1149 | majordomo@whizzer.wpd.sgi.com |
1150 | ||
1151 | For example, to subscribe, send the line "subscribe flexfax" in | |
1152 | the body of your message. The line "help" will return a list of | |
1153 | the commands understood by the mailing list management software. | |
63013ec3 EA |
1154 | |
1155 | Submissions (including bug reports) should be directed to: | |
1156 | ||
1157 | flexfax@sgi.com | |
1158 | ||
d1ad6cf3 EA |
1159 | When corresponding about this software please always specify what |
1160 | version you have, what system you're running on, and, if the problem is | |
1161 | specific to your modem, identify the modem and firmware revision. | |
1162 | ||
63013ec3 | 1163 | |
a151c868 EA |
1164 | +--------------------------------+ |
1165 | | TWEAKING CONFIGURATION OPTIONS | | |
1166 | +--------------------------------+ | |
1167 | ||
1168 | There are a large number of configuration options that don't normally | |
1169 | need to be changed. However, if you feel you need to tweak them, you | |
1170 | can define the following M4 variables. This list is shown in four | |
1171 | columns: the name you define, the default value for that definition, | |
1172 | the option or macro that is affected (either Ox for an option or Dx | |
1173 | for a macro), and a brief description. Greater detail of the semantics | |
1174 | can be found in the Installation and Operations Guide. | |
1175 | ||
fb32c2a1 EA |
1176 | Some options are likely to be deprecated in future versions -- that is, |
1177 | the option is only included to provide back-compatibility. These are | |
1178 | marked with "*". | |
1179 | ||
a7e36c1b EA |
1180 | Remember that these options are M4 variables, and hence may need to |
1181 | be quoted. In particular, arguments with commas will usually have to | |
1182 | be ``double quoted, like this phrase'' to avoid having the comma | |
1183 | confuse things. This is common for alias file definitions and for | |
1184 | the read timeout. | |
1185 | ||
4753516a EA |
1186 | M4 Variable Name Configuration Description & [Default] |
1187 | ================ ============= ======================= | |
1188 | confMAILER_NAME $n macro [MAILER-DAEMON] The sender name used | |
1189 | for internally generated outgoing | |
1190 | messages. | |
1191 | confFROM_LINE $l macro [From $g $d] The From_ line used | |
1192 | when sending to files or programs. | |
1193 | confFROM_HEADER $q macro [$?x$x <$g>$|$g$.] The format of an | |
1194 | internally generated From: address. | |
1195 | confOPERATORS $o macro [.:%@!^/[]+] Address operator | |
1196 | characters. | |
8b065e59 | 1197 | confSMTP_LOGIN_MSG $e macro [$j Sendmail $v/$Z; $b] |
4753516a | 1198 | The initial (spontaneous) SMTP |
8b065e59 EA |
1199 | greeting message. The word "ESMTP" |
1200 | will be inserted between the first and | |
1201 | second words to convince other | |
1202 | sendmails to try to speak ESMTP. | |
4753516a EA |
1203 | confDOMAIN_NAME $j macro If defined, sets $j. This should |
1204 | only be done if your system cannot | |
1205 | determine your local domain name, | |
1206 | and then it should be set to | |
1207 | $w.Foo.COM, where Foo.COM is your | |
1208 | domain name. | |
1209 | confRECEIVED_HEADER Received: | |
1210 | [.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $b] | |
1211 | The format of the Received: header | |
1212 | in messages passed through this host. | |
1213 | It is unwise to try to change this. | |
1214 | confCW_FILE Fw class [/etc/sendmail.cw] Name of file used | |
1215 | to get the local additions to the $=w | |
1216 | class. | |
1217 | confSMTP_MAILER - [smtp] The mailer name used when | |
1218 | SMTP connectivity is required. | |
1219 | One of "smtp", "smtp8", or "esmtp". | |
1220 | confLOCAL_MAILER - [local] The mailer name used when | |
1221 | local connectivity is required. | |
1222 | Almost always "local". | |
1223 | confRELAY_MAILER - [relay] The default mailer name used | |
1224 | for relaying any mail (e.g., to a | |
1225 | BITNET_RELAY, a SMART_HOST, or | |
1226 | whatever). This can reasonably be | |
1227 | "uucp-new" if you are on a | |
1228 | UUCP-connected site. | |
1229 | confSEVEN_BIT_INPUT SevenBitInput [False] Force input to seven bits? | |
1230 | confEIGHT_BIT_HANDLING EightBitMode [pass8] 8-bit data handling | |
1231 | confALIAS_WAIT AliasWait [10m] Time to wait for alias file | |
1232 | rebuild until you get bored and | |
1233 | decide that the apparently pending | |
1234 | rebuild failed. | |
1235 | confMIN_FREE_BLOCKS MinFreeBlocks [100] Minimum number of free blocks on | |
1236 | queue filesystem to accept SMTP mail. | |
729ff2d3 EA |
1237 | (Prior to 8.7 this was minfree/maxsize, |
1238 | where minfree was the number of free | |
1239 | blocks and maxsize was the maximum | |
1240 | message size. Use confMAX_MESSAGE_SIZE | |
1241 | for the second value now.) | |
1242 | confMAX_MESSAGE_SIZE MaxMessageSize The maximum size of messages that will | |
1243 | be accepted (in bytes). | |
4753516a EA |
1244 | confBLANK_SUB BlankSub [.] Blank (space) substitution |
1245 | character. | |
1246 | confCON_EXPENSIVE HoldExpensive [False] Avoid connecting immediately | |
1247 | to mailers marked expensive? | |
1248 | confCHECKPOINT_INTERVAL CheckpointInterval | |
1249 | Checkpoint queue files every N | |
1250 | recipients. | |
1251 | confDELIVERY_MODE DeliveryMode [background] Default delivery mode. | |
1252 | confAUTO_REBUILD AutoRebuildAliases | |
1253 | Automatically rebuild alias | |
1254 | file if needed. | |
1255 | confERROR_MODE ErrorMode Error message mode. | |
1256 | confERROR_MESSAGE ErrorHeader Error message header/file. | |
1257 | confSAVE_FROM_LINES SafeFromLine Save extra leading From_ lines. | |
1258 | confTEMP_FILE_MODE TempFileMode [0600] Temporary file mode. | |
1259 | confMATCH_GECOS MatchGECOS Match GECOS field. | |
1260 | confMAX_HOP MaxHopCount Maximum hop count. | |
1261 | confIGNORE_DOTS* IgnoreDots Ignore dot as terminator for incoming | |
1262 | messages? | |
1263 | confBIND_OPTS ResolverOptions Default options for DNS resolver. | |
1264 | confMIME_FORMAT_ERRORS* SendMimeErrors [True] Send error messages as MIME- | |
1265 | encapsulated messages per RFC 1344. | |
1266 | confFORWARD_PATH ForwardPath [$z/.forward.$w:$z/.forward] | |
1267 | The colon-separated list of places to | |
1268 | search for .forward files. N.B.: see | |
1269 | the Security Notes section. | |
1270 | confMCI_CACHE_SIZE ConnectionCacheSize | |
1271 | [2] Size of open connection cache. | |
1272 | confMCI_CACHE_TIMEOUT ConnectionCacheTimeout | |
1273 | [5m] Open connection cache timeout. | |
1274 | confUSE_ERRORS_TO* UserErrorsTo [False] Use the Errors-To: header to deliver | |
1275 | error messages. This should not be | |
1276 | necessary because of general acceptance | |
1277 | of the envelope/header distinction. | |
1278 | confLOG_LEVEL LogLevel [9] Log level. | |
1279 | confME_TOO MeToo Include sender in group expansions. | |
1280 | confCHECK_ALIASES CheckAliases [True] Check RHS of aliases when | |
1281 | running newaliases. | |
1282 | confOLD_STYLE_HEADERS* OldStyleHeaders [True] Assume that headers without | |
1283 | special chars are old style. | |
1284 | confDAEMON_OPTIONS DaemonPortOptions | |
1285 | SMTP daemon options. | |
1286 | confPRIVACY_FLAGS PrivacyOptions [authwarnings] Privacy flags. | |
1287 | confCOPY_ERRORS_TO PostmasterCopy Address for additional copies of all | |
1288 | error messages. | |
1289 | confQUEUE_FACTOR QueueFactor Slope of queue-only function. | |
1290 | confDONT_PRUNE_ROUTES DontPruneRoutes Don't prune down route-addr syntax | |
1291 | addresses to the minimum possible. | |
1292 | confSAFE_QUEUE* SuperSafe [True] Commit all messages to disk | |
1293 | before forking. | |
1294 | confTIME_ZONE TimeZoneSpec [USE_SYSTEM] Time zone info -- can be | |
1295 | USE_SYSTEM to use the system's idea, | |
1296 | USE_TZ to use the user's TZ envariable, | |
1297 | or something else to force that value. | |
1298 | confDEF_USER_ID DefaultUser [1:1] Default user id. | |
1299 | confUSERDB_SPEC UserDatabaseSpec | |
1300 | User database specification. | |
1301 | confFALLBACK_MX FallbackMXhost Fallback MX host. | |
1302 | confTRY_NULL_MX_LIST TryNullMXList If we are the best MX for a host and | |
1303 | haven't made other arrangements, try | |
1304 | connecting to the host directly; | |
1305 | normally this would be a config error. | |
1306 | confQUEUE_LA QueueLA Load average at which queue-only | |
1307 | function kicks in. | |
1308 | confREFUSE_LA RefuseLA Load average at which incoming | |
1309 | SMTP connections are refused. | |
a151c868 | 1310 | confWORK_RECIPIENT_FACTOR |
4753516a EA |
1311 | RecipientFactor Cost of each recipient. |
1312 | confSEPARATE_PROC ForkEachJob Run all deliveries in a separate | |
1313 | process. | |
1314 | confWORK_CLASS_FACTOR ClassFactor Priority multiplier for class. | |
1315 | confWORK_TIME_FACTOR RetryFactor Cost of each delivery attempt. | |
1316 | confQUEUE_SORT_ORDER QueueSortOrder Queue sort algorithm: Priority or Host. | |
4753516a EA |
1317 | confMIN_QUEUE_AGE MinQueueAge The minimum amount of time a job |
1318 | must sit in the queue between queue | |
1319 | runs. This allows you to set the | |
1320 | queue run interval low for better | |
1321 | resposiveness without trying all | |
1322 | jobs in each run. | |
1323 | confDEF_CHAR_SET DefaultCharSet When converting unlabelled 8 bit | |
1324 | input to MIME, the character set to | |
1325 | use by default. | |
1326 | confSERVICE_SWITCH_FILE ServiceSwitchFile | |
1327 | The file to use for the service switch | |
1328 | on systems that do not have a system- | |
1329 | defined switch. | |
1330 | confDIAL_DELAY DialDelay If a connection fails, wait this long | |
1331 | and try again. This is to allow | |
1332 | "dial on demand" connections to have | |
1333 | enough time to complete a connection. | |
1334 | confNO_RCPT_ACTION NoRecipientAction | |
1335 | What to do if there are no legal | |
1336 | recipient fields (To:, Cc: or Bcc:) | |
1337 | in the message. Legal values can | |
1338 | be "none" to just leave the | |
1339 | nonconforming message as is, "add-to" | |
1340 | to add a To: header with all the | |
1341 | known recipients (which may expose | |
1342 | blind recipients), "add-apparently-to" | |
1343 | to do the same but use Apparently-To: | |
1344 | instead of To:, "add-bcc" to add an | |
1345 | empty Bcc: header, or | |
1346 | "add-to-undisclosed" to add the header | |
1347 | ``To: undisclosed-recipients:;''. | |
1348 | Default is "none". | |
1349 | confSAFE_FILE_ENV SafeFileEnvironment | |
1350 | If set, sendmail will do a chroot() | |
1351 | into this directory before writing | |
1352 | files. | |
ef9e3443 EA |
1353 | confCOLON_OK_IN_ADDR ColonOkInAddr If set, colons are treated as a regular |
1354 | character in addresses. If not set, | |
1355 | they are treated as the introducer to | |
1356 | the RFC 822 "group" syntax. Colons are | |
1357 | handled properly in route-addrs. This | |
1358 | option defaults on for V5 and lower | |
1359 | configuration files. | |
a151c868 | 1360 | |
bee9d799 | 1361 | |
4a51b074 EA |
1362 | +-----------+ |
1363 | | HIERARCHY | | |
1364 | +-----------+ | |
7ace9d88 EA |
1365 | |
1366 | Within this directory are several subdirectories, to wit: | |
1367 | ||
1368 | m4 General support routines. These are typically | |
1369 | very important and should not be changed without | |
fd82c288 | 1370 | very careful consideration. |
7ace9d88 EA |
1371 | |
1372 | cf The configuration files themselves. They have | |
1373 | ".mc" suffixes, and must be run through m4 to | |
1374 | become complete. The resulting output should | |
1375 | have a ".cf" suffix. | |
1376 | ||
1377 | ostype Definitions describing a particular operating | |
1378 | system type. These should always be referenced | |
1379 | using the OSTYPE macro in the .mc file. Examples | |
1380 | include "bsd4.3", "bsd4.4", "sunos3.5", and | |
1381 | "sunos4.1". | |
1382 | ||
1383 | domain Definitions describing a particular domain, referenced | |
1384 | using the DOMAIN macro in the .mc file. These are | |
e9631f65 EA |
1385 | site dependent; for example, "CS.Berkeley.EDU.m4" |
1386 | describes hosts in the CS.Berkeley.EDU subdomain. | |
7ace9d88 EA |
1387 | |
1388 | mailer Descriptions of mailers. These are referenced using | |
1389 | the MAILER macro in the .mc file. | |
1390 | ||
1391 | sh Shell files used when building the .cf file from the | |
1392 | .mc file in the cf subdirectory. | |
1393 | ||
1394 | feature These hold special orthogonal features that you might | |
1395 | want to include. They should be referenced using | |
1396 | the FEATURE macro. | |
1397 | ||
1398 | hack Local hacks. These can be referenced using the HACK | |
1399 | macro. They shouldn't be of more than voyeuristic | |
1400 | interest outside the .Berkeley.EDU domain, but who knows? | |
6fb312a3 | 1401 | We've all got our own peccadillos. |
7ace9d88 | 1402 | |
9df1b56b EA |
1403 | siteconfig Site configuration -- e.g., tables of locally connected |
1404 | UUCP sites. | |
1405 | ||
7ace9d88 | 1406 | |
4a51b074 EA |
1407 | +------------------------+ |
1408 | | ADMINISTRATIVE DETAILS | | |
1409 | +------------------------+ | |
7ace9d88 EA |
1410 | |
1411 | The following sections detail usage of certain internal parts of the | |
1412 | sendmail.cf file. Read them carefully if you are trying to modify | |
1413 | the current model. If you find the above descriptions adequate, these | |
1414 | should be {boring, confusing, tedious, ridiculous} (pick one or more). | |
1415 | ||
1416 | RULESETS (* means built in to sendmail) | |
1417 | ||
1418 | 0 * Parsing | |
1419 | 1 * Sender rewriting | |
1420 | 2 * Recipient rewriting | |
1421 | 3 * Canonicalization | |
1422 | 4 * Post cleanup | |
f5baef19 | 1423 | 5 * Local address rewrite (after aliasing) |
b197efaa EA |
1424 | 1x mailer rules (sender qualification) |
1425 | 2x mailer rules (recipient qualification) | |
0409c6a2 EA |
1426 | 3x mailer rules (sender header qualification) |
1427 | 4x mailer rules (recipient header qualification) | |
1428 | 5x mailer subroutines (general) | |
1429 | 6x mailer subroutines (general) | |
1430 | 7x mailer subroutines (general) | |
1431 | 8x reserved | |
b197efaa | 1432 | 90 Mailertable host stripping |
f7ffd8e3 EA |
1433 | 96 Bottom half of Ruleset 3 (ruleset 6 in old sendmail) |
1434 | 97 Hook for recursive ruleset 0 call (ruleset 7 in old sendmail) | |
5dd53c38 | 1435 | 98 Local part of ruleset 0 (ruleset 8 in old sendmail) |
7ace9d88 EA |
1436 | |
1437 | ||
1438 | MAILERS | |
1439 | ||
1440 | 0 local, prog local and program mailers | |
2a20bc94 EA |
1441 | 1 [e]smtp, relay SMTP channel |
1442 | 2 uucp-* UNIX-to-UNIX Copy Program | |
bee9d799 | 1443 | 3 netnews Network News delivery |
63013ec3 | 1444 | 4 fax Sam Leffler's FlexFAX software |
7ace9d88 EA |
1445 | |
1446 | ||
1447 | MACROS | |
1448 | ||
1449 | A | |
1450 | B Bitnet Relay | |
72a40e6d | 1451 | C |
f5baef19 | 1452 | D The local domain -- usually not needed |
7ace9d88 | 1453 | E |
63013ec3 | 1454 | F FAX Relay |
7ace9d88 | 1455 | G |
34e49bd3 | 1456 | H mail Hub (for mail clusters) |
7ace9d88 EA |
1457 | I |
1458 | J | |
1459 | K | |
b0abd8b1 | 1460 | L Luser Relay |
7ace9d88 EA |
1461 | M Masquerade (who I claim to be) |
1462 | N | |
1463 | O | |
1464 | P | |
1465 | Q | |
1466 | R Relay (for unqualified names) | |
28b51619 | 1467 | S Smart Host |
7ace9d88 | 1468 | T |
c573210d EA |
1469 | U my UUCP name (if I have a UUCP connection) |
1470 | V UUCP Relay (class V hosts) | |
7ace9d88 EA |
1471 | W UUCP Relay (class W hosts) |
1472 | X UUCP Relay (class X hosts) | |
c573210d | 1473 | Y UUCP Relay (all other hosts) |
7ace9d88 EA |
1474 | Z Version number |
1475 | ||
1476 | ||
1477 | CLASSES | |
1478 | ||
1479 | A | |
1480 | B | |
1481 | C | |
f4d9c9f9 | 1482 | D "dotted" users |
4a51b074 | 1483 | E addresses that should not seem to come from $M |
f5baef19 | 1484 | F hosts we forward for |
7ace9d88 EA |
1485 | G |
1486 | H | |
1487 | I | |
1488 | J | |
1489 | K | |
1490 | L addresses that should not be forwarded to $R | |
1491 | M | |
1492 | N | |
1493 | O operators that indicate network operations (cannot be in local names) | |
91626fee | 1494 | P top level pseudo-domains: BITNET, FAX, UUCP, etc. |
7ace9d88 EA |
1495 | Q |
1496 | R | |
1497 | S | |
1498 | T | |
1499 | U locally connected UUCP hosts | |
c573210d EA |
1500 | V UUCP hosts connected to relay $V |
1501 | W UUCP hosts connected to relay $W | |
1502 | X UUCP hosts connected to relay $X | |
1503 | Y locally connected smart UUCP hosts | |
2e9b6f6e | 1504 | Z locally connected domain-ized UUCP hosts |
f5baef19 | 1505 | . the class containing only a dot |
7ace9d88 EA |
1506 | |
1507 | ||
1508 | M4 DIVERSIONS | |
1509 | ||
28b51619 EA |
1510 | 1 Local host detection and resolution |
1511 | 2 Local Ruleset 3 additions | |
1512 | 3 Local Ruleset 0 additions | |
9df1b56b | 1513 | 4 UUCP Ruleset 0 additions |
c573210d | 1514 | 5 locally interpreted names (overrides $R) |
f5baef19 | 1515 | 6 local configuration (at top of file) |
7ace9d88 | 1516 | 7 mailer definitions |
32f9e686 | 1517 | 8 |
06630be3 | 1518 | 9 special local rulesets (1 and 2) |