Commit | Line | Data |
---|---|---|
28719ec2 | 1 | .\" Copyright (c) 1983 Eric P. Allman |
3edcb7c8 | 2 | .\" Copyright (c) 1983 The Regents of the University of California. |
d312e734 | 3 | .\" All rights reserved. |
28719ec2 | 4 | .\" |
3edcb7c8 | 5 | .\" %sccs.include.redist.roff% |
28719ec2 | 6 | .\" |
50d4a65c | 7 | .\" @(#)op.me 6.42 (Berkeley) %G% |
28719ec2 | 8 | .\" |
55c435aa | 9 | .\" eqn op.me | pic | troff -me |
28719ec2 JB |
10 | .eh 'SMM:07-%''Sendmail Installation and Operation Guide' |
11 | .oh 'Sendmail Installation and Operation Guide''SMM:07-%' | |
55c435aa EA |
12 | .\" SD is lib if sendmail is installed in /usr/lib, sbin if in /usr/sbin |
13 | .ds SD sbin | |
4da134f8 EA |
14 | .nr si 3n |
15 | .de $0 | |
16 | .(x | |
2fb78b49 EA |
17 | .in \\$3u*3n |
18 | .ti -3n | |
4da134f8 EA |
19 | \\$2. \\$1 |
20 | .)x | |
21 | .. | |
69a914e1 EA |
22 | .de $C |
23 | .(x | |
24 | .in 0 | |
25 | \\$1 \\$2. \\$3 | |
26 | .)x | |
27 | .. | |
4da134f8 EA |
28 | .+c |
29 | .(l C | |
74b6e641 EA |
30 | .sz 16 |
31 | .b SENDMAIL | |
4da134f8 | 32 | .sz 12 |
74b6e641 EA |
33 | .sp |
34 | .b "INSTALLATION AND OPERATION GUIDE" | |
35 | .sz 10 | |
36 | .sp | |
4da134f8 | 37 | .r |
4da134f8 | 38 | Eric Allman |
d754edf0 EA |
39 | University of California, Berkeley |
40 | Mammoth Project | |
55c435aa | 41 | eric@CS.Berkeley.EDU |
69a914e1 | 42 | .sp |
50d4a65c | 43 | Version 6.42 |
18843c53 | 44 | .sp |
50d4a65c | 45 | For Sendmail Version 6.55 |
74b6e641 EA |
46 | .)l |
47 | .sp 2 | |
4da134f8 EA |
48 | .pp |
49 | .i Sendmail | |
69a914e1 EA |
50 | implements a general purpose internetwork mail routing facility |
51 | under the UNIX* | |
52 | .(f | |
53 | *UNIX is a trademark of Bell Laboratories. | |
54 | .)f | |
55 | operating system. | |
4da134f8 EA |
56 | It is not tied to any one transport protocol \*- |
57 | its function may be likened to a crossbar switch, | |
58 | relaying messages from one domain into another. | |
59 | In the process, | |
60 | it can do a limited amount of message header editing | |
61 | to put the message into a format that is appropriate | |
62 | for the receiving domain. | |
63 | All of this is done under the control of a configuration file. | |
64 | .pp | |
65 | Due to the requirements of flexibility | |
66 | for | |
67 | .i sendmail , | |
68 | the configuration file can seem somewhat unapproachable. | |
69 | However, there are only a few basic configurations | |
70 | for most sites, | |
71 | for which standard configuration files have been supplied. | |
72 | Most other configurations | |
73 | can be built by adjusting an existing configuration files | |
74 | incrementally. | |
75 | .pp | |
55c435aa | 76 | .i Sendmail |
f13b6b36 EA |
77 | is based on |
78 | RFC822 (Internet Mail Format Protocol), | |
79 | RFC821 (Simple Mail Transport Protocol), | |
475d7a3d | 80 | RFC1123 (Internet Host Requirements), |
f13b6b36 | 81 | and |
475d7a3d | 82 | RFC1425 (SMTP Service Extensions). |
f13b6b36 EA |
83 | However, since |
84 | .i sendmail | |
85 | is designed to work in a wider world, | |
86 | in many cases it can be configured to exceed these protocols. | |
87 | These cases are described herein. | |
55c435aa | 88 | .pp |
4da134f8 EA |
89 | Although |
90 | .i sendmail | |
91 | is intended to run | |
92 | without the need for monitoring, | |
93 | it has a number of features | |
94 | that may be used to monitor or adjust the operation | |
95 | under unusual circumstances. | |
96 | These features are described. | |
97 | .pp | |
98 | Section one describes how to do a basic | |
99 | .i sendmail | |
100 | installation. | |
101 | Section two | |
69a914e1 | 102 | explains the day-to-day information you should know |
4da134f8 EA |
103 | to maintain your mail system. |
104 | If you have a relatively normal site, | |
105 | these two sections should contain sufficient information | |
106 | for you to install | |
107 | .i sendmail | |
108 | and keep it happy. | |
109 | Section three | |
2fb78b49 EA |
110 | describes some parameters that may be safely tweaked. |
111 | Section four | |
112 | has information regarding the command line arguments. | |
113 | Section five | |
4da134f8 EA |
114 | contains the nitty-gritty information about the configuration |
115 | file. | |
116 | This section is for masochists | |
117 | and people who must write their own configuration file. | |
55c435aa EA |
118 | Section six |
119 | gives a brief description of differences | |
120 | in this version of | |
121 | .i sendmail . | |
4da134f8 EA |
122 | The appendixes give a brief |
123 | but detailed explanation of a number of features | |
124 | not described in the rest of the paper. | |
3dfefb78 | 125 | .bp 5 |
4da134f8 EA |
126 | .sh 1 "BASIC INSTALLATION" |
127 | .pp | |
55c435aa EA |
128 | .i |
129 | This section is a very rough rewrite; | |
130 | please don't assume that it is already completely correct. | |
131 | However, | |
132 | please send me suggestions so that later versions of this document | |
133 | can be more accurate. | |
134 | .pp | |
4da134f8 EA |
135 | There are two basic steps to installing sendmail. |
136 | The hard part is to build the configuration table. | |
137 | This is a file that sendmail reads when it starts up | |
138 | that describes the mailers it knows about, | |
139 | how to parse addresses, | |
140 | how to rewrite the message header, | |
141 | and the settings of various options. | |
142 | Although the configuration table is quite complex, | |
143 | a configuration can usually be built | |
144 | by adjusting an existing off-the-shelf configuration. | |
145 | The second part is actually doing the installation, | |
146 | i.e., creating the necessary files, etc. | |
147 | .pp | |
148 | The remainder of this section will describe the installation of sendmail | |
149 | assuming you can use one of the existing configurations | |
150 | and that the standard installation parameters are acceptable. | |
2fb78b49 EA |
151 | All pathnames and examples |
152 | are given from the root of the | |
153 | .i sendmail | |
318b7556 EA |
154 | subtree, |
155 | normally | |
55c435aa | 156 | .i /usr/src/usr.\*(SD/sendmail |
318b7556 | 157 | on 4.3BSD. |
4da134f8 | 158 | .pp |
55c435aa EA |
159 | If you are loading this off the tape, |
160 | continue with the next session. | |
161 | If you have a running binary already on your system, | |
162 | you should probably skip to section 1.2. | |
163 | .sh 2 "Compiling Sendmail" | |
f0b465a8 | 164 | .pp |
55c435aa EA |
165 | All sendmail source is in the |
166 | .i src | |
167 | subdirectory. | |
168 | If you are running on a 4.4BSD system, | |
169 | compile by typing | |
170 | .q make . | |
171 | On other systems, you may have to make some other adjustments. | |
172 | .sh 3 "Old versions of make" | |
173 | .pp | |
174 | If you are not running the new version of | |
175 | .b make | |
176 | you will probably have to use | |
69a914e1 | 177 | .(b |
d656ea51 | 178 | make \-f Makefile.dist |
69a914e1 | 179 | .)b |
55c435aa EA |
180 | This file does not assume several new syntaxes, |
181 | including the | |
182 | .q += | |
183 | syntax in macro definition | |
184 | and the | |
185 | .q ".include" | |
186 | syntax. | |
187 | .sh 3 "Compilation flags" | |
188 | .pp | |
189 | .i Sendmail | |
859d056a | 190 | supports two different formats |
55c435aa EA |
191 | for the |
192 | .i aliases | |
193 | database. | |
194 | These formats are: | |
d656ea51 | 195 | .nr ii 1i |
55c435aa | 196 | .ip NDBM |
859d056a EA |
197 | The ``new DBM'' format, |
198 | available on nearly all systems around today. | |
55c435aa EA |
199 | This was the preferred format prior to 4.4BSD. |
200 | It allows such complex things as multiple databases | |
201 | and closing a currently open database. | |
202 | .ip NEWDB | |
203 | The new database package from Berkeley. | |
204 | If you have this, use it. | |
205 | It allows | |
206 | long records, | |
207 | multiple open databases, | |
208 | real in-memory caching, | |
209 | and so forth. | |
210 | You can define this in conjunction with one of the other two; | |
211 | if you do, | |
212 | old databases are read, | |
213 | but when a new database is created it will be in NEWDB format. | |
214 | As a nasty hack, | |
215 | if you have both NEWDB and one of the DB formats defined, | |
859d056a | 216 | and you also define YPCOMPAT, |
55c435aa EA |
217 | and if the file |
218 | .i /var/yp/Makefile | |
219 | exists and is readable, | |
f0b465a8 | 220 | .i sendmail |
55c435aa EA |
221 | will create both new and old versions of the alias file |
222 | during a | |
223 | .i newalias | |
224 | command. | |
225 | This is required because the Sun NIS/YP system | |
226 | reads the DBM version of the alias file. | |
227 | It's ugly as sin, | |
228 | but it works. | |
229 | .lp | |
859d056a | 230 | If neither of these are defined, |
f0b465a8 | 231 | .i sendmail |
55c435aa EA |
232 | reads the alias file into memory on every invocation. |
233 | This can be slow and should be avoided. | |
234 | .pp | |
235 | System V based systems can define | |
236 | SYSTEM5 | |
237 | to make several small adjustments. | |
238 | This changes the handling of timezones | |
239 | and uses the much less efficient | |
240 | .i lockf | |
241 | call in preference to | |
242 | .i flock . | |
243 | These can be specified separately using the compilation flags | |
244 | SYS5TZ | |
245 | and | |
246 | LOCKF | |
247 | respectively. | |
de7324ac EA |
248 | .pp |
249 | If you don't have the | |
250 | .i unsetenv | |
251 | routine in your system library, define the UNSETENV compilation flag. | |
252 | .pp | |
253 | You may also have to define the compilation variable LA_TYPE | |
254 | to describe how your load average is computed. | |
859d056a | 255 | This and other flags are detailed in section 6.1. |
55c435aa EA |
256 | .sh 3 "Compilation and installation" |
257 | .pp | |
258 | After making the local system configuration described above, | |
259 | You should be able to compile and install the system. | |
260 | Compilation can be performed using | |
261 | .q make\** | |
262 | .(f | |
263 | \**where you may have to replace | |
264 | .q make | |
265 | with | |
266 | .q "make \-f Makefile.dist" | |
267 | as appropriate. | |
268 | .)f | |
269 | in the | |
270 | .b sendmail/src | |
271 | directory. | |
272 | You may be able to install using | |
69a914e1 | 273 | .(b |
18843c53 | 274 | make install |
69a914e1 | 275 | .)b |
55c435aa EA |
276 | This should install the binary in |
277 | /usr/\*(SD | |
278 | and create links from | |
279 | /usr/bin/newaliases | |
280 | and | |
281 | /usr/bin/mailq | |
282 | to | |
283 | /usr/\*(SD/sendmail. | |
284 | On BSD4.4 systems it will also format and install man pages. | |
285 | .sh 2 "Configuration Files" | |
286 | .pp | |
287 | .i Sendmail | |
288 | cannot operate without a configuration file. | |
289 | The configuration defines the mail systems understood at this site, | |
290 | how to access them, | |
291 | how to forward email to remote mail systems, | |
292 | and a number of tuning parameters. | |
293 | This configuration file is detailed | |
294 | in the later portion of this document. | |
295 | .pp | |
296 | The | |
297 | .i sendmail | |
298 | configuration can be daunting at first. | |
299 | The world is complex, | |
300 | and the mail configuration reflects that. | |
301 | The distribution includes an m4-based configuration package | |
302 | that hides a lot of the complexity. | |
303 | .pp | |
304 | These configuration files are simpler than old versions | |
305 | largely because the world has become simpler; | |
306 | in particular, | |
307 | text-based host files are officially eliminated, | |
308 | obviating the need to | |
309 | .q hide | |
310 | hosts behind a registered internet gateway. | |
311 | .pp | |
312 | These files also assume that most of your neighbors | |
313 | use domain-based UUCP addressing; | |
314 | that is, | |
315 | instead of naming hosts as | |
316 | .q host!user | |
317 | they will use | |
318 | .q host.domain!user . | |
319 | The configuration files can be customized to work around this, | |
320 | but it is more complex. | |
321 | .pp | |
322 | I haven't tested these yet on an isolated LAN environment | |
323 | with a single UUCP connection to the outside world. | |
324 | If you are in such an environment, | |
325 | please send comments to | |
326 | sendmail@okeeffe.CS.Berkeley.EDU. | |
327 | .pp | |
328 | Our configuration files are processed by | |
329 | .i m4 | |
330 | to facilitate local customization; | |
331 | the directory | |
332 | .i cf | |
333 | of the | |
334 | sendmail | |
335 | distribution directory | |
336 | contains the source files. | |
337 | This directory contains several subdirectories: | |
338 | .nr ii 1i | |
339 | .ip cf | |
340 | Both site-dependent and site-independent descriptions of hosts. | |
341 | These can be literal host names | |
342 | (e.g., | |
343 | .q ucbvax.mc ) | |
344 | when the hosts are gateways | |
345 | or more general descriptions | |
346 | (such as | |
347 | .q "tcpproto.mc" | |
348 | as a general description of an SMTP-connected host | |
349 | or | |
350 | .q "uucpproto.mc" | |
351 | as a general description of a UUCP-connected host). | |
352 | Files ending | |
353 | .b \&.mc | |
354 | (``Master Configuration'') | |
355 | are the input descriptions; | |
356 | the output is in the corresponding | |
357 | .b \&.cf | |
358 | file. | |
359 | The general structure of these files is described below. | |
360 | .ip domain | |
361 | Site-dependent subdomain descriptions. | |
362 | These are tied to the way your organization wants to do addressing. | |
363 | For example, | |
364 | .b domain/cs.exposed.m4 | |
365 | is our description for hosts in the CS.Berkeley.EDU subdomain | |
366 | that want their individual hostname to be externally visible; | |
367 | .b domain/cs.hidden.m4 | |
368 | is the same except that the hostname is hidden | |
369 | (everything looks like it comes from CS.Berkeley.EDU). | |
370 | These are referenced using the | |
371 | .sm DOMAIN | |
372 | .b m4 | |
373 | macro in the | |
374 | .b \&.mc | |
375 | file. | |
376 | .ip feature | |
377 | Definitions of specific features that some particular host in your site | |
378 | might want. | |
379 | These are referenced using the | |
380 | .sm FEATURE | |
381 | .b m4 | |
382 | macro. | |
093461e4 | 383 | An example feature is |
d656ea51 EA |
384 | use_cw_file |
385 | (which tells sendmail to read an /etc/sendmail.cw file on startup | |
386 | to find the set of local names). | |
55c435aa EA |
387 | .ip hack |
388 | Local hacks, referenced using the | |
389 | .sm HACK | |
390 | .b m4 | |
391 | macro. | |
392 | Try to avoid these. | |
393 | The point of having them here is to make it clear that they smell. | |
394 | .ip m4 | |
395 | Site-independent | |
396 | .i m4 (1) | |
397 | include files that have information common to all configuration files. | |
398 | This can be thought of as a | |
399 | .q #include | |
400 | directory. | |
401 | .ip mailer | |
402 | Definitions of mailers, | |
403 | referenced using the | |
404 | .sm MAILER | |
405 | .b m4 | |
406 | macro. | |
d656ea51 | 407 | Defined mailer types in this distribution are |
475d7a3d | 408 | fax, |
d656ea51 EA |
409 | local, |
410 | smtp, | |
475d7a3d EA |
411 | uucp, |
412 | and usenet. | |
55c435aa EA |
413 | .ip ostype |
414 | Definitions describing various operating system environments | |
415 | (such as the location of support files). | |
416 | These are referenced using the | |
417 | .sm OSTYPE | |
418 | .b m4 | |
419 | macro. | |
420 | .ip sh | |
421 | Shell files used by the | |
422 | .b m4 | |
423 | build process. | |
424 | You shouldn't have to mess with these. | |
425 | .ip siteconfig | |
426 | Local site configuration information, | |
427 | such as UUCP connectivity. | |
d656ea51 EA |
428 | They normally contain lists of site information, for example: |
429 | .(b | |
430 | SITE(contessa) | |
431 | SITE(hoptoad) | |
432 | SITE(nkainc) | |
433 | SITE(well) | |
434 | .)b | |
435 | They are referenced using the SITECONFIG macro: | |
436 | .(b | |
437 | SITECONFIG(site.config.file, name_of_site, X) | |
438 | .)b | |
439 | where | |
440 | .i X | |
441 | is the macro/class name to use. | |
442 | It can be U | |
443 | (indicating locally connected hosts) | |
444 | or one of W, X, or Y | |
445 | for up to three remote UUCP hubs. | |
55c435aa EA |
446 | .pp |
447 | If you are in a new domain | |
448 | (e.g., a company), | |
449 | you will probably want to create a | |
450 | cf/domain | |
451 | file for your domain. | |
452 | This consists primarily of relay definitions: | |
453 | for example, Berkeley's domain definition | |
454 | defines relays for | |
455 | BitNET, | |
456 | CSNET, | |
457 | and UUCP. | |
458 | Of these, | |
459 | only the UUCP relay is particularly specific | |
460 | to Berkeley. | |
461 | All of these are internet-style domain names. | |
462 | Please check to make certain they are reasonable for your domain. | |
463 | .pp | |
464 | Subdomains at Berkeley are also represented in the | |
465 | cf/domain | |
466 | directory. | |
467 | For example, | |
468 | the domain | |
469 | cs-exposed | |
470 | is the Computer Science subdomain with the local hostname shown | |
471 | to other users; | |
472 | cs-hidden | |
473 | makes users appear to be from the CS.Berkeley.EDU subdomain | |
474 | (with no local host information included). | |
475 | You will probably have to update this directory | |
476 | to be appropriate for your domain. | |
d656ea51 EA |
477 | .pp |
478 | You will have to use or create | |
479 | .b \&.mc | |
480 | files in the | |
481 | .i cf/cf | |
482 | subdirectory for your hosts. | |
483 | This is detailed in the | |
484 | cf/README | |
485 | file. | |
55c435aa EA |
486 | .sh 2 "Details of Installation Files" |
487 | .pp | |
488 | This subsection describes the files that | |
489 | comprise the | |
490 | sendmail | |
491 | installation. | |
492 | .sh 3 "/usr/\*(SD/sendmail" | |
493 | .pp | |
494 | The binary for sendmail is located in /usr/\*(SD\**. | |
495 | .(f | |
496 | \**This is usually | |
497 | /usr/sbin | |
498 | on 4.4BSD and newer systems; | |
499 | many systems install it in | |
500 | /usr/lib. | |
501 | I understand it is in /usr/ucblib | |
502 | on System V Release 4. | |
503 | .)f | |
d656ea51 EA |
504 | It should be setuid root. |
505 | For security reasons, | |
506 | /, /usr, and /usr/\*(SD | |
507 | should be owned by root, mode 755\**. | |
508 | .(f | |
509 | \**Some vendors ship them owned by bin; | |
510 | this creates a security hole that is not actually related to | |
511 | .i sendmail . | |
512 | Other important directories that should have restrictive ownerships | |
513 | and permissions are | |
514 | /bin, /usr/bin, /etc, /usr/etc, /lib, and /usr/lib. | |
515 | .)f | |
daae36f7 | 516 | .sh 3 "/etc/sendmail.cf" |
f0b465a8 | 517 | .pp |
55c435aa EA |
518 | This is the configuration file for sendmail. |
519 | This and the frozen configuration file | |
520 | are the only two non-library file names compiled into sendmail\**. | |
521 | .(f | |
522 | \**The system libraries can reference other files; | |
523 | in particular, system library subroutines that | |
524 | sendmail | |
525 | calls probably reference | |
526 | .i /etc/passwd | |
527 | and | |
528 | .i /etc/resolv.conf . | |
529 | .)f | |
530 | Some older systems install it in | |
531 | .b /usr/lib/sendmail.cf . | |
532 | .pp | |
533 | If you want to move this file, | |
534 | change | |
535 | .i src/pathnames.h . | |
536 | .pp | |
537 | The configuration file is normally created | |
538 | using the distribution files described above. | |
539 | If you have a particularly unusual system configuration | |
540 | you may need to create a special version. | |
541 | The format of this file is detailed in later sections | |
542 | of this document. | |
2fb78b49 EA |
543 | .sh 3 "/usr/ucb/newaliases" |
544 | .pp | |
545 | If you are running delivermail, | |
546 | it is critical that the | |
547 | .i newaliases | |
548 | command be replaced. | |
549 | This can just be a link to | |
550 | .i sendmail : | |
551 | .(b | |
74b6e641 | 552 | rm \-f /usr/ucb/newaliases |
55c435aa | 553 | ln /usr/\*(SD/sendmail /usr/ucb/newaliases |
2fb78b49 | 554 | .)b |
55c435aa EA |
555 | This can be installed in whatever search path you prefer |
556 | for your system. | |
daae36f7 | 557 | .sh 3 "/var/spool/mqueue" |
4da134f8 EA |
558 | .pp |
559 | The directory | |
daae36f7 | 560 | .i /var/spool/mqueue |
4da134f8 | 561 | should be created to hold the mail queue. |
d656ea51 | 562 | This directory should be mode 700 |
18843c53 | 563 | and owned by root. |
55c435aa EA |
564 | .pp |
565 | The actual path of this directory | |
566 | is defined in the | |
567 | .b Q | |
568 | option of the | |
569 | .i sendmail.cf | |
570 | file. | |
daae36f7 | 571 | .sh 3 "/etc/aliases*" |
69a914e1 | 572 | .pp |
55c435aa EA |
573 | The system aliases are held in |
574 | .q /etc/aliases . | |
69a914e1 EA |
575 | A sample is given in |
576 | .q lib/aliases | |
577 | which includes some aliases which | |
578 | .i must | |
579 | be defined: | |
580 | .(b | |
daae36f7 | 581 | cp lib/aliases /etc/aliases |
55c435aa | 582 | .i "edit /etc/aliases" |
69a914e1 EA |
583 | .)b |
584 | You should extend this file with any aliases that are apropos to your system. | |
585 | .pp | |
586 | Normally | |
587 | .i sendmail | |
588 | looks at a version of these files maintained by the | |
74b6e641 | 589 | .i dbm \|(3) |
f13b6b36 EA |
590 | or |
591 | .i db \|(3) | |
69a914e1 | 592 | routines. |
f13b6b36 | 593 | These are stored either in |
daae36f7 | 594 | .q /etc/aliases.dir |
69a914e1 | 595 | and |
55c435aa | 596 | .q /etc/aliases.pag |
f13b6b36 EA |
597 | or |
598 | .q /etc/aliases.db | |
599 | depending on which database package you are using. | |
69a914e1 EA |
600 | These can initially be created as empty files, |
601 | but they will have to be initialized promptly. | |
18843c53 | 602 | These should be mode 644: |
69a914e1 | 603 | .(b |
daae36f7 EA |
604 | cp /dev/null /etc/aliases.dir |
605 | cp /dev/null /etc/aliases.pag | |
606 | chmod 644 /etc/aliases.* | |
74b6e641 | 607 | newaliases |
69a914e1 | 608 | .)b |
f13b6b36 EA |
609 | The |
610 | .i db | |
611 | routines preset the mode reasonably, | |
612 | so this step can be skipped. | |
55c435aa EA |
613 | The actual path of this file |
614 | is defined in the | |
615 | .b A | |
616 | option of the | |
617 | .i sendmail.cf | |
618 | file. | |
daae36f7 | 619 | .sh 3 "/etc/sendmail.fc" |
69a914e1 EA |
620 | .pp |
621 | If you intend to install the frozen version of the configuration file | |
622 | (for quick startup) | |
daae36f7 | 623 | you should create the file /etc/sendmail.fc |
69a914e1 EA |
624 | and initialize it. |
625 | This step may be safely skipped. | |
626 | .(b | |
daae36f7 | 627 | cp /dev/null /etc/sendmail.fc |
d656ea51 EA |
628 | chmod 644 /etc/sendmail.fc |
629 | /usr/\*(SD/sendmail \-bz | |
69a914e1 | 630 | .)b |
f13b6b36 EA |
631 | In general, freeze files are not worth doing |
632 | unless your disks are much faster than your CPU; | |
633 | this is seldom true any more. | |
4da134f8 EA |
634 | .sh 3 "/etc/rc" |
635 | .pp | |
636 | It will be necessary to start up the sendmail daemon when your system reboots. | |
637 | This daemon performs two functions: | |
638 | it listens on the SMTP socket for connections | |
639 | (to receive mail from a remote system) | |
640 | and it processes the queue periodically | |
641 | to insure that mail gets delivered when hosts come up. | |
642 | .pp | |
643 | Add the following lines to | |
69a914e1 | 644 | .q /etc/rc |
4da134f8 | 645 | (or |
69a914e1 | 646 | .q /etc/rc.local |
4da134f8 EA |
647 | as appropriate) |
648 | in the area where it is starting up the daemons: | |
649 | .(b | |
d656ea51 | 650 | if [ \-f /usr/\*(SD/sendmail \-a \-f /etc/sendmail.cf ]; then |
daae36f7 | 651 | (cd /var/spool/mqueue; rm \-f [lnx]f*) |
55c435aa | 652 | /usr/\*(SD/sendmail \-bd \-q30m & |
4da134f8 EA |
653 | echo \-n ' sendmail' >/dev/console |
654 | fi | |
655 | .)b | |
656 | The | |
657 | .q cd | |
658 | and | |
659 | .q rm | |
660 | commands insure that all lock files have been removed; | |
661 | extraneous lock files may be left around | |
662 | if the system goes down in the middle of processing a message. | |
663 | The line that actually invokes | |
664 | .i sendmail | |
665 | has two flags: | |
666 | .q \-bd | |
667 | causes it to listen on the SMTP port, | |
668 | and | |
bff69eb1 EA |
669 | .q \-q30m |
670 | causes it to run the queue every half hour. | |
69a914e1 EA |
671 | .pp |
672 | If you are not running a version of UNIX | |
673 | that supports Berkeley TCP/IP, | |
674 | do not include the | |
675 | .b \-bd | |
676 | flag. | |
677 | .sh 3 "/usr/lib/sendmail.hf" | |
678 | .pp | |
679 | This is the help file used by the SMTP | |
680 | .b HELP | |
681 | command. | |
682 | It should be copied from | |
683 | .q lib/sendmail.hf : | |
684 | .(b | |
685 | cp lib/sendmail.hf /usr/lib | |
686 | .)b | |
55c435aa EA |
687 | The actual path of this file |
688 | is defined in the | |
689 | .b H | |
690 | option of the | |
691 | .i sendmail.cf | |
692 | file. | |
daae36f7 | 693 | .sh 3 "/etc/sendmail.st" |
69a914e1 EA |
694 | .pp |
695 | If you wish to collect statistics | |
696 | about your mail traffic, | |
697 | you should create the file | |
daae36f7 | 698 | .q /etc/sendmail.st : |
2fb78b49 | 699 | .(b |
daae36f7 EA |
700 | cp /dev/null /etc/sendmail.st |
701 | chmod 666 /etc/sendmail.st | |
2fb78b49 | 702 | .)b |
69a914e1 EA |
703 | This file does not grow. |
704 | It is printed with the program | |
55c435aa EA |
705 | .q mailstats/mailstats.c. |
706 | The actual path of this file | |
707 | is defined in the | |
708 | .b S | |
709 | option of the | |
710 | .i sendmail.cf | |
711 | file. | |
3f83c754 EA |
712 | .sh 3 "/usr/ucb/newaliases" |
713 | .pp | |
714 | If | |
715 | .i sendmail | |
716 | is invoked as | |
717 | .q newaliases, | |
718 | it will simulate the | |
719 | .b \-bi | |
720 | flag | |
721 | (i.e., will rebuild the alias database; | |
722 | see below). | |
55c435aa | 723 | This should be a link to /usr/\*(SD/sendmail. |
3f83c754 EA |
724 | .sh 3 "/usr/ucb/mailq" |
725 | .pp | |
726 | If | |
727 | .i sendmail | |
728 | is invoked as | |
729 | .q mailq, | |
730 | it will simulate the | |
731 | .b \-bp | |
732 | flag | |
733 | (i.e., | |
734 | .i sendmail | |
735 | will print the contents of the mail queue; | |
736 | see below). | |
55c435aa | 737 | This should be a link to /usr/\*(SD/sendmail. |
4da134f8 | 738 | .sh 1 "NORMAL OPERATIONS" |
6d5ff626 | 739 | .sh 2 "``Quick'' Configuration Startup" |
817683ae | 740 | .pp |
56ba89fb EA |
741 | if the |
742 | .sm FROZENCONFIG | |
743 | option is included during compilation, | |
744 | a precompiled (``frozen'') version of the configuration file | |
6d5ff626 | 745 | can be created using the |
b16e27c4 | 746 | .b \-bz |
6d5ff626 EA |
747 | flag. |
748 | This is really only worthwhile doing | |
749 | if you are on a slow processor with a relatively fast I/O system | |
750 | (a VAX 11/750 is a good example). | |
751 | Since it creates other problems, | |
752 | I recommend against using the frozen configuration | |
753 | on most current architectures. | |
754 | .pp | |
755 | To create the freeze file, use | |
817683ae | 756 | .(b |
55c435aa | 757 | /usr/\*(SD/sendmail \-bz |
817683ae | 758 | .)b |
6d5ff626 EA |
759 | This creates the frozen configuration file |
760 | .i /etc/sendmail.fc . | |
817683ae EA |
761 | This file is an image of |
762 | .i sendmail 's | |
763 | data space after reading in the configuration file. | |
764 | If this file exists, | |
765 | it is used instead of | |
daae36f7 | 766 | .i /etc/sendmail.cf |
69a914e1 EA |
767 | .i sendmail.fc |
768 | must be rebuilt manually every time | |
817683ae EA |
769 | .i sendmail.cf |
770 | is changed. | |
771 | .pp | |
69a914e1 | 772 | The frozen configuration file will be ignored |
817683ae EA |
773 | if a |
774 | .b \-C | |
775 | flag is specified | |
776 | or if sendmail detects that it is out of date. | |
777 | However, the heuristics are not strong | |
778 | so this should not be trusted. | |
4da134f8 EA |
779 | .sh 2 "The System Log" |
780 | .pp | |
781 | The system log is supported by the | |
367a5dcd | 782 | .i syslogd \|(8) |
4da134f8 EA |
783 | program. |
784 | .sh 3 "Format" | |
785 | .pp | |
786 | Each line in the system log | |
787 | consists of a timestamp, | |
788 | the name of the machine that generated it | |
789 | (for logging from several machines | |
18843c53 | 790 | over the local area network), |
4da134f8 EA |
791 | the word |
792 | .q sendmail: , | |
793 | and a message. | |
794 | .sh 3 "Levels" | |
795 | .pp | |
69a914e1 | 796 | If you have |
367a5dcd | 797 | .i syslogd \|(8) |
69a914e1 EA |
798 | or an equivalent installed, |
799 | you will be able to do logging. | |
800 | There is a large amount of information that can be logged. | |
801 | The log is arranged as a succession of levels. | |
802 | At the lowest level | |
803 | only extremely strange situations are logged. | |
804 | At the highest level, | |
805 | even the most mundane and uninteresting events | |
806 | are recorded for posterity. | |
807 | As a convention, | |
808 | log levels under ten | |
6ebbc09a | 809 | are considered generally |
69a914e1 | 810 | .q useful; |
6ebbc09a EA |
811 | log levels above 64 |
812 | are reserved for debugging purposes. | |
813 | Levels from 11\-64 are reserved for verbose information | |
814 | that some sites might want. | |
69a914e1 EA |
815 | .pp |
816 | A complete description of the log levels | |
367a5dcd | 817 | is given in section 4.6. |
4da134f8 EA |
818 | .sh 2 "The Mail Queue" |
819 | .pp | |
820 | The mail queue should be processed transparently. | |
821 | However, you may find that manual intervention is sometimes necessary. | |
822 | For example, | |
823 | if a major host is down for a period of time | |
824 | the queue may become clogged. | |
825 | Although sendmail ought to recover gracefully when the host comes up, | |
826 | you may find performance unacceptably bad in the meantime. | |
3f83c754 EA |
827 | .sh 3 "Printing the queue" |
828 | .pp | |
829 | The contents of the queue can be printed | |
830 | using the | |
74b6e641 EA |
831 | .i mailq |
832 | command | |
833 | (or by specifying the | |
3f83c754 | 834 | .b \-bp |
74b6e641 | 835 | flag to sendmail): |
3f83c754 | 836 | .(b |
74b6e641 | 837 | mailq |
3f83c754 EA |
838 | .)b |
839 | This will produce a listing of the queue id's, | |
840 | the size of the message, | |
841 | the date the message entered the queue, | |
842 | and the sender and recipients. | |
4da134f8 EA |
843 | .sh 3 "Forcing the queue" |
844 | .pp | |
845 | .i Sendmail | |
846 | should run the queue automatically | |
847 | at intervals. | |
848 | The algorithm is to read and sort the queue, | |
849 | and then to attempt to process all jobs in order. | |
850 | When it attempts to run the job, | |
851 | .i sendmail | |
852 | first checks to see if the job is locked. | |
853 | If so, it ignores the job. | |
854 | .pp | |
855 | There is no attempt to insure that only one queue processor | |
856 | exists at any time, | |
857 | since there is no guarantee that a job cannot take forever | |
f13b6b36 EA |
858 | to process |
859 | (however, | |
860 | .i sendmail | |
861 | does include heuristics to try to abort jobs | |
862 | that are taking absurd amounts of time; | |
863 | technically, this violates RFC 821, but is blessed by RFC 1123). | |
4da134f8 | 864 | Due to the locking algorithm, |
f13b6b36 | 865 | it is impossible for one job to freeze the entire queue. |
4da134f8 EA |
866 | However, |
867 | an uncooperative recipient host | |
868 | or a program recipient | |
869 | that never returns | |
870 | can accumulate many processes in your system. | |
871 | Unfortunately, | |
f13b6b36 | 872 | there is no completely general way to solve this. |
4da134f8 EA |
873 | .pp |
874 | In some cases, | |
875 | you may find that a major host going down | |
876 | for a couple of days | |
877 | may create a prohibitively large queue. | |
878 | This will result in | |
879 | .i sendmail | |
880 | spending an inordinate amount of time | |
881 | sorting the queue. | |
882 | This situation can be fixed by moving the queue to a temporary place | |
883 | and creating a new queue. | |
884 | The old queue can be run later when the offending host returns to service. | |
885 | .pp | |
886 | To do this, | |
887 | it is acceptable to move the entire queue directory: | |
888 | .(b | |
daae36f7 | 889 | cd /var/spool |
d656ea51 | 890 | mv mqueue omqueue; mkdir mqueue; chmod 700 mqueue |
4da134f8 EA |
891 | .)b |
892 | You should then kill the existing daemon | |
893 | (since it will still be processing in the old queue directory) | |
894 | and create a new daemon. | |
895 | .pp | |
896 | To run the old mail queue, | |
897 | run the following command: | |
898 | .(b | |
55c435aa | 899 | /usr/\*(SD/sendmail \-oQ/var/spool/omqueue \-q |
4da134f8 EA |
900 | .)b |
901 | The | |
2fb78b49 | 902 | .b \-oQ |
4da134f8 EA |
903 | flag specifies an alternate queue directory |
904 | and the | |
905 | .b \-q | |
906 | flag says to just run every job in the queue. | |
907 | If you have a tendency toward voyeurism, | |
908 | you can use the | |
909 | .b \-v | |
910 | flag to watch what is going on. | |
911 | .pp | |
912 | When the queue is finally emptied, | |
913 | you can remove the directory: | |
914 | .(b | |
daae36f7 | 915 | rmdir /var/spool/omqueue |
4da134f8 EA |
916 | .)b |
917 | .sh 2 "The Alias Database" | |
918 | .pp | |
919 | The alias database exists in two forms. | |
920 | One is a text form, | |
921 | maintained in the file | |
daae36f7 | 922 | .i /etc/aliases. |
4da134f8 EA |
923 | The aliases are of the form |
924 | .(b | |
925 | name: name1, name2, ... | |
926 | .)b | |
927 | Only local names may be aliased; | |
928 | e.g., | |
929 | .(b | |
daae36f7 | 930 | eric@prep.ai.MIT.EDU: eric@CS.Berkeley.EDU |
4da134f8 EA |
931 | .)b |
932 | will not have the desired effect. | |
933 | Aliases may be continued by starting any continuation lines | |
934 | with a space or a tab. | |
935 | Blank lines and lines beginning with a sharp sign | |
936 | (\c | |
937 | .q # ) | |
938 | are comments. | |
939 | .pp | |
940 | The second form is processed by the | |
74b6e641 | 941 | .i dbm \|(3) |
f13b6b36 EA |
942 | (or |
943 | .i db \|(3)) | |
4da134f8 EA |
944 | library. |
945 | This form is in the files | |
daae36f7 | 946 | .i /etc/aliases.dir |
4da134f8 | 947 | and |
daae36f7 | 948 | .i /etc/aliases.pag. |
4da134f8 EA |
949 | This is the form that |
950 | .i sendmail | |
951 | actually uses to resolve aliases. | |
952 | This technique is used to improve performance. | |
953 | .sh 3 "Rebuilding the alias database" | |
954 | .pp | |
955 | The DBM version of the database | |
956 | may be rebuilt explicitly by executing the command | |
957 | .(b | |
74b6e641 EA |
958 | newaliases |
959 | .)b | |
960 | This is equivalent to giving | |
961 | .i sendmail | |
962 | the | |
963 | .b \-bi | |
964 | flag: | |
965 | .(b | |
55c435aa | 966 | /usr/\*(SD/sendmail \-bi |
4da134f8 EA |
967 | .)b |
968 | .pp | |
69a914e1 EA |
969 | If the |
970 | .q D | |
971 | option is specified in the configuration, | |
4da134f8 | 972 | .i sendmail |
69a914e1 EA |
973 | will rebuild the alias database automatically |
974 | if possible | |
975 | when it is out of date. | |
69a914e1 EA |
976 | Auto-rebuild can be dangerous |
977 | on heavily loaded machines | |
b16e27c4 EA |
978 | with large alias files; |
979 | if it might take more than five minutes | |
980 | to rebuild the database, | |
981 | there is a chance that several processes will start the rebuild process | |
982 | simultaneously. | |
69a914e1 | 983 | .sh 3 "Potential problems" |
4da134f8 EA |
984 | .pp |
985 | There are a number of problems that can occur | |
986 | with the alias database. | |
987 | They all result from a | |
988 | .i sendmail | |
989 | process accessing the DBM version | |
990 | while it is only partially built. | |
991 | This can happen under two circumstances: | |
992 | One process accesses the database | |
993 | while another process is rebuilding it, | |
994 | or the process rebuilding the database dies | |
995 | (due to being killed or a system crash) | |
996 | before completing the rebuild. | |
997 | .pp | |
998 | Sendmail has two techniques to try to relieve these problems. | |
999 | First, it ignores interrupts while rebuilding the database; | |
1000 | this avoids the problem of someone aborting the process | |
1001 | leaving a partially rebuilt database. | |
1002 | Second, | |
1003 | at the end of the rebuild | |
1004 | it adds an alias of the form | |
1005 | .(b | |
1006 | @: @ | |
1007 | .)b | |
1008 | (which is not normally legal). | |
1009 | Before sendmail will access the database, | |
69a914e1 EA |
1010 | it checks to insure that this entry exists\**. |
1011 | .(f | |
1012 | \**The | |
1013 | .q a | |
1014 | option is required in the configuration | |
1015 | for this action to occur. | |
1016 | This should normally be specified | |
1017 | unless you are running | |
1018 | .i delivermail | |
1019 | in parallel with | |
1020 | .i sendmail. | |
1021 | .)f | |
631e7688 EA |
1022 | .sh 3 "List owners" |
1023 | .pp | |
1024 | If an error occurs on sending to a certain address, | |
1025 | say | |
1026 | .q \fIx\fP , | |
1027 | .i sendmail | |
1028 | will look for an alias | |
1029 | of the form | |
1030 | .q owner-\fIx\fP | |
1031 | to receive the errors. | |
1032 | This is typically useful | |
1033 | for a mailing list | |
1034 | where the submitter of the list | |
28719ec2 | 1035 | has no control over the maintenance of the list itself; |
631e7688 EA |
1036 | in this case the list maintainer would be the owner of the list. |
1037 | For example: | |
1038 | .(b | |
69a914e1 EA |
1039 | unix-wizards: eric@ucbarpa, wnj@monet, nosuchuser, |
1040 | sam@matisse | |
631e7688 EA |
1041 | owner-unix-wizards: eric@ucbarpa |
1042 | .)b | |
1043 | would cause | |
1044 | .q eric@ucbarpa | |
1045 | to get the error that will occur | |
1046 | when someone sends to | |
1047 | unix-wizards | |
1048 | due to the inclusion of | |
1049 | .q nosuchuser | |
1050 | on the list. | |
f90dac5e EA |
1051 | .pp |
1052 | List owners also cause the envelope sender address to be modified. | |
1053 | The contents of the owner alias are used if they point to a single user, | |
1054 | otherwise the name of the alias itself is used. | |
1055 | For this reason, and to obey Internet conventions, | |
1056 | a typical scheme would be: | |
1057 | .(b | |
1058 | list: some, set, of, addresses | |
1059 | list-request: list, administrators | |
1060 | owner-list: list-request | |
1061 | .)b | |
daae36f7 EA |
1062 | .sh 2 "User Information Database" |
1063 | .pp | |
1064 | If you have a version of | |
1065 | .i sendmail | |
1066 | with the user information database | |
1067 | compiled in, | |
1068 | and you have specified one or more databases using the | |
1069 | .b U | |
1070 | option, | |
1071 | the databases will be searched for a | |
1072 | .i user :maildrop | |
1073 | entry. | |
1074 | If found, the mail will be sent to the specified address. | |
1075 | .pp | |
1076 | If the first token passed to user part of the | |
1077 | .q local | |
1078 | mailer is an at sign, | |
1079 | the at sign will be stripped off | |
1080 | and this step will be skipped. | |
2fb78b49 | 1081 | .sh 2 "Per-User Forwarding (.forward Files)" |
4da134f8 | 1082 | .pp |
2fb78b49 EA |
1083 | As an alternative to the alias database, |
1084 | any user may put a file with the name | |
1085 | .q .forward | |
1086 | in his or her home directory. | |
1087 | If this file exists, | |
1088 | .i sendmail | |
1089 | redirects mail for that user | |
1090 | to the list of addresses listed in the .forward file. | |
1091 | For example, if the home directory for user | |
1092 | .q mckusick | |
1093 | has a .forward file with contents: | |
1094 | .(b | |
1095 | mckusick@ernie | |
1096 | kirk@calder | |
1097 | .)b | |
1098 | then any mail arriving for | |
1099 | .q mckusick | |
1100 | will be redirected to the specified accounts. | |
f13b6b36 EA |
1101 | .pp |
1102 | Actually, the configuration file defines a sequence of filenames to check. | |
1103 | By default, this is the user's .forward file, | |
1104 | but can be defined to be more generally using the | |
1105 | .b J | |
1106 | option. | |
1107 | If you change this, | |
1108 | you will have to inform your user base of the change; | |
1109 | \&.forward is pretty well incorporated into the collective subconscious. | |
2fb78b49 | 1110 | .sh 2 "Special Header Lines" |
4da134f8 | 1111 | .pp |
2fb78b49 EA |
1112 | Several header lines have special interpretations |
1113 | defined by the configuration file. | |
1114 | Others have interpretations built into | |
4da134f8 | 1115 | .i sendmail |
2fb78b49 EA |
1116 | that cannot be changed without changing the code. |
1117 | These builtins are described here. | |
bff69eb1 | 1118 | .sh 3 "Return-Receipt-To:" |
4da134f8 | 1119 | .pp |
2fb78b49 EA |
1120 | If this header is sent, |
1121 | a message will be sent to any specified addresses | |
318b7556 EA |
1122 | when the final delivery is complete, |
1123 | that is, | |
1124 | when successfully delivered to a mailer with the | |
2fb78b49 | 1125 | .b l |
bff69eb1 EA |
1126 | flag (local delivery) set in the mailer descriptor. |
1127 | .sh 3 "Errors-To:" | |
4da134f8 | 1128 | .pp |
2fb78b49 EA |
1129 | If errors occur anywhere during processing, |
1130 | this header will cause error messages to go to | |
50d4a65c | 1131 | the listed addresses. |
2fb78b49 | 1132 | This is intended for mailing lists. |
859d056a EA |
1133 | .pp |
1134 | The Errors-To: header was created in the bad old days | |
1135 | when UUCP didn't understand the distinction between an envelope and a header; | |
1136 | this was a hack to provide what should now be passed | |
1137 | as the envelope sender address. | |
1138 | It should go away. | |
bff69eb1 | 1139 | .sh 3 "Apparently-To:" |
4da134f8 | 1140 | .pp |
2fb78b49 EA |
1141 | If a message comes in with no recipients listed in the message |
1142 | (in a To:, Cc:, or Bcc: line) | |
1143 | then | |
1144 | .i sendmail | |
1145 | will add an | |
1146 | .q "Apparently-To:" | |
1147 | header line for any recipients it is aware of. | |
1148 | This is not put in as a standard recipient line | |
1149 | to warn any recipients that the list is not complete. | |
4da134f8 | 1150 | .pp |
2fb78b49 | 1151 | At least one recipient line is required under RFC 822. |
25e4e430 EA |
1152 | .sh 2 "IDENT Protocol Support" |
1153 | .pp | |
1154 | .i Sendmail | |
1155 | supports the IDENT protocol as defined in RFC 1413. | |
6564d66c EA |
1156 | Although this enhances identification |
1157 | of the author of an email message | |
1158 | by doing a ``call back'' to the originating system to include | |
1159 | the owner of a particular TCP connection | |
1160 | in the audit trail | |
25e4e430 EA |
1161 | it is in no sense perfect; |
1162 | a determined forger can easily spoof the IDENT protocol. | |
1163 | The following description is excerpted from RFC 1413: | |
1164 | .ba +5 | |
1165 | 6. Security Considerations | |
1166 | .lp | |
1167 | The information returned by this protocol is at most as trustworthy | |
1168 | as the host providing it OR the organization operating the host. For | |
1169 | example, a PC in an open lab has few if any controls on it to prevent | |
1170 | a user from having this protocol return any identifier the user | |
1171 | wants. Likewise, if the host has been compromised the information | |
1172 | returned may be completely erroneous and misleading. | |
1173 | .lp | |
1174 | The Identification Protocol is not intended as an authorization or | |
1175 | access control protocol. At best, it provides some additional | |
1176 | auditing information with respect to TCP connections. At worst, it | |
1177 | can provide misleading, incorrect, or maliciously incorrect | |
1178 | information. | |
1179 | .lp | |
1180 | The use of the information returned by this protocol for other than | |
1181 | auditing is strongly discouraged. Specifically, using Identification | |
1182 | Protocol information to make access control decisions - either as the | |
1183 | primary method (i.e., no other checks) or as an adjunct to other | |
1184 | methods may result in a weakening of normal host security. | |
1185 | .lp | |
1186 | An Identification server may reveal information about users, | |
1187 | entities, objects or processes which might normally be considered | |
1188 | private. An Identification server provides service which is a rough | |
1189 | analog of the CallerID services provided by some phone companies and | |
1190 | many of the same privacy considerations and arguments that apply to | |
1191 | the CallerID service apply to Identification. If you wouldn't run a | |
1192 | "finger" server due to privacy considerations you may not want to run | |
1193 | this protocol. | |
1194 | .ba | |
2fb78b49 | 1195 | .sh 1 "ARGUMENTS" |
4da134f8 | 1196 | .pp |
2fb78b49 EA |
1197 | The complete list of arguments to |
1198 | .i sendmail | |
1199 | is described in detail in Appendix A. | |
1200 | Some important arguments are described here. | |
1201 | .sh 2 "Queue Interval" | |
4da134f8 | 1202 | .pp |
2fb78b49 EA |
1203 | The amount of time between forking a process |
1204 | to run through the queue | |
1205 | is defined by the | |
1206 | .b \-q | |
1207 | flag. | |
1208 | If you run in mode | |
1209 | .b f | |
1210 | or | |
1211 | .b a | |
1212 | this can be relatively large, | |
1213 | since it will only be relevant | |
1214 | when a host that was down comes back up. | |
1215 | If you run in | |
1216 | .b q | |
1217 | mode | |
1218 | it should be relatively short, | |
1219 | since it defines the maximum amount of time that a message | |
1220 | may sit in the queue. | |
e920f7ff | 1221 | .pp |
859d056a EA |
1222 | RFC 1123 section 5.3.1.1 says that this value should be at least 30 minutes |
1223 | (although that probably doesn't make sense if you use ``queue-only'' mode). | |
2fb78b49 | 1224 | .sh 2 "Daemon Mode" |
4da134f8 | 1225 | .pp |
2fb78b49 EA |
1226 | If you allow incoming mail over an IPC connection, |
1227 | you should have a daemon running. | |
1228 | This should be set by your | |
1229 | .i /etc/rc | |
1230 | file using the | |
1231 | .b \-bd | |
1232 | flag. | |
1233 | The | |
1234 | .b \-bd | |
1235 | flag and the | |
1236 | .b \-q | |
1237 | flag may be combined in one call: | |
1238 | .(b | |
55c435aa | 1239 | /usr/\*(SD/sendmail \-bd \-q30m |
4da134f8 | 1240 | .)b |
2fb78b49 | 1241 | .sh 2 "Forcing the Queue" |
4da134f8 | 1242 | .pp |
2fb78b49 EA |
1243 | In some cases you may find that the queue has gotten clogged for some reason. |
1244 | You can force a queue run | |
1245 | using the | |
1246 | .b \-q | |
1247 | flag (with no value). | |
bff69eb1 | 1248 | It is entertaining to use the |
2fb78b49 EA |
1249 | .b \-v |
1250 | flag (verbose) | |
1251 | when this is done to watch what happens: | |
1252 | .(b | |
55c435aa | 1253 | /usr/\*(SD/sendmail \-q \-v |
4da134f8 | 1254 | .)b |
0780838b EA |
1255 | .pp |
1256 | You can also limit the jobs to those with a particular queue identifier, | |
1257 | sender, or recipient | |
1258 | using one of the queue modifiers. | |
1259 | For example, | |
1260 | .q \-qRberkeley | |
1261 | restricts the queue run to jobs that have the string | |
1262 | .q berkeley | |
1263 | somewhere in one of the recipient addresses. | |
1264 | Similarly, | |
1265 | .q \-qSstring | |
1266 | limits the run to particular senders and | |
1267 | .q \-qIstring | |
1268 | limits it to particular identifiers. | |
2fb78b49 EA |
1269 | .sh 2 "Debugging" |
1270 | .pp | |
1271 | There are a fairly large number of debug flags | |
1272 | built into | |
1273 | .i sendmail . | |
1274 | Each debug flag has a number and a level, | |
1275 | where higher levels means to print out more information. | |
1276 | The convention is that levels greater than nine are | |
1277 | .q absurd, | |
1278 | i.e., | |
1279 | they print out so much information that you wouldn't normally | |
1280 | want to see them except for debugging that particular piece of code. | |
1281 | Debug flags are set using the | |
1282 | .b \-d | |
1283 | option; | |
1284 | the syntax is: | |
4da134f8 | 1285 | .(b |
2fb78b49 EA |
1286 | .ta \w'debug-option 'u |
1287 | debug-flag: \fB\-d\fP debug-list | |
1288 | debug-list: debug-option [ , debug-option ] | |
1289 | debug-option: debug-range [ . debug-level ] | |
1290 | debug-range: integer | integer \- integer | |
1291 | debug-level: integer | |
4da134f8 | 1292 | .)b |
2fb78b49 EA |
1293 | where spaces are for reading ease only. |
1294 | For example, | |
4da134f8 | 1295 | .(b |
2fb78b49 EA |
1296 | \-d12 Set flag 12 to level 1 |
1297 | \-d12.3 Set flag 12 to level 3 | |
1298 | \-d3-17 Set flags 3 through 17 to level 1 | |
1299 | \-d3-17.4 Set flags 3 through 17 to level 4 | |
4da134f8 | 1300 | .)b |
2fb78b49 EA |
1301 | For a complete list of the available debug flags |
1302 | you will have to look at the code | |
1303 | (they are too dynamic to keep this documentation up to date). | |
1304 | .sh 2 "Trying a Different Configuration File" | |
4da134f8 | 1305 | .pp |
2fb78b49 EA |
1306 | An alternative configuration file |
1307 | can be specified using the | |
1308 | .b \-C | |
1309 | flag; for example, | |
1310 | .(b | |
55c435aa | 1311 | /usr/\*(SD/sendmail \-Ctest.cf |
4da134f8 | 1312 | .)b |
2fb78b49 EA |
1313 | uses the configuration file |
1314 | .i test.cf | |
1315 | instead of the default | |
daae36f7 | 1316 | .i /etc/sendmail.cf. |
4da134f8 | 1317 | If the |
2fb78b49 EA |
1318 | .b \-C |
1319 | flag has no value | |
1320 | it defaults to | |
1321 | .i sendmail.cf | |
1322 | in the current directory. | |
1323 | .sh 2 "Changing the Values of Options" | |
4da134f8 | 1324 | .pp |
2fb78b49 EA |
1325 | Options can be overridden using the |
1326 | .b \-o | |
4da134f8 | 1327 | flag. |
2fb78b49 | 1328 | For example, |
4da134f8 | 1329 | .(b |
55c435aa | 1330 | /usr/\*(SD/sendmail \-oT2m |
4da134f8 | 1331 | .)b |
2fb78b49 EA |
1332 | sets the |
1333 | .b T | |
1334 | (timeout) option to two minutes | |
1335 | for this run only. | |
55c435aa EA |
1336 | .pp |
1337 | Some options have security implications. | |
1338 | Sendmail allows you to set these, | |
3dfefb78 | 1339 | but refuses to run as root thereafter. |
2fb78b49 EA |
1340 | .sh 1 "TUNING" |
1341 | .pp | |
1342 | There are a number of configuration parameters | |
1343 | you may want to change, | |
1344 | depending on the requirements of your site. | |
1345 | Most of these are set | |
1346 | using an option in the configuration file. | |
4da134f8 | 1347 | For example, |
2fb78b49 | 1348 | the line |
e920f7ff | 1349 | .q OT5d |
2fb78b49 EA |
1350 | sets option |
1351 | .q T | |
1352 | to the value | |
e920f7ff | 1353 | .q 5d |
859d056a | 1354 | (five days). |
1ef34914 | 1355 | .pp |
d656ea51 | 1356 | Most of these options have appropriate defaults for most sites. |
1ef34914 EA |
1357 | However, |
1358 | sites having very high mail loads may find they need to tune them | |
1359 | as appropriate for their mail load. | |
1360 | In particular, | |
1361 | sites experiencing a large number of small messages, | |
1362 | many of which are delivered to many recipients, | |
1363 | may find that they need to adjust the parameters | |
1364 | dealing with queue priorities. | |
2fb78b49 EA |
1365 | .sh 2 "Timeouts" |
1366 | .pp | |
1367 | All time intervals are set | |
1368 | using a scaled syntax. | |
1369 | For example, | |
1370 | .q 10m | |
1371 | represents ten minutes, whereas | |
1372 | .q 2h30m | |
1373 | represents two and a half hours. | |
1374 | The full set of scales is: | |
4da134f8 | 1375 | .(b |
2fb78b49 EA |
1376 | .ta 4n |
1377 | s seconds | |
1378 | m minutes | |
1379 | h hours | |
1380 | d days | |
1381 | w weeks | |
4da134f8 | 1382 | .)b |
2fb78b49 | 1383 | .sh 3 "Queue interval" |
4da134f8 | 1384 | .pp |
2fb78b49 EA |
1385 | The argument to the |
1386 | .b \-q | |
1387 | flag | |
55c435aa | 1388 | specifies how often a sub-daemon will run the queue. |
1ef34914 EA |
1389 | This is typically set to between fifteen minutes |
1390 | and one hour. | |
e920f7ff | 1391 | RFC 1123 section 5.3.1.1 recommends that this be at least 30 minutes. |
2fb78b49 | 1392 | .sh 3 "Read timeouts" |
4da134f8 | 1393 | .pp |
2fb78b49 EA |
1394 | It is possible to time out when reading the standard input |
1395 | or when reading from a remote SMTP server. | |
e920f7ff | 1396 | These timeouts are set using the |
2fb78b49 EA |
1397 | .b r |
1398 | option in the configuration file. | |
e920f7ff EA |
1399 | The argument is a list of |
1400 | .i keyword=value | |
1401 | pairs. | |
1402 | The recognized keywords, their default values, and the minimum values | |
1403 | allowed by RFC 1123 section 5.3.2 are: | |
1404 | .nr ii 1i | |
1405 | .ip initial | |
1406 | The wait for the initial 220 greeting message | |
1407 | [5m, 5m]. | |
1408 | .ip helo | |
475d7a3d | 1409 | The wait for a reply from a HELO or EHLO command |
e920f7ff EA |
1410 | [5m, unspecified]. |
1411 | This may require a host name lookup, so | |
1412 | five minutes is probably a reasonable minimum. | |
1413 | .ip mail\(dg | |
1414 | The wait for a reply from a MAIL command | |
1415 | [10m, 5m]. | |
1416 | .ip rcpt\(dg | |
1417 | The wait for a reply from a RCPT command | |
1418 | [1h, 5m]. | |
1419 | This should be long | |
1420 | because it could be pointing at a list | |
1421 | that takes a long time to expand. | |
1422 | .ip datainit\(dg | |
1423 | The wait for a reply from a DATA command | |
1424 | [5m, 2m]. | |
1425 | .ip datablock\(dg | |
1426 | The wait for reading a data block | |
1427 | (that is, the body of the message). | |
1428 | [1h, 3m]. | |
1429 | This should be long because it also applies to programs | |
1430 | piping input to | |
1431 | .i sendmail | |
1432 | which have no guarantee of promptness. | |
1433 | .ip datafinal\(dg | |
1434 | The wait for a reply from the dot terminating a message. | |
1435 | [1h, 10m]. | |
890cda2d EA |
1436 | If this is shorter than the time actually needed |
1437 | for the receiver to deliver the message, | |
1438 | duplicates will be generated. | |
1439 | This is discussed in RFC 1047. | |
e920f7ff EA |
1440 | .ip rset |
1441 | The wait for a reply from a RSET command | |
1442 | [5m, unspecified]. | |
1443 | .ip quit | |
1444 | The wait for a reply from a QUIT command | |
1445 | [2m, unspecified]. | |
1446 | .ip misc | |
1447 | The wait for a reply from miscellaneous (but short) commands | |
1448 | such as NOOP (no-operation) and VERB (go into verbose mode). | |
1449 | [2m, unspecified]. | |
1450 | .ip command\(dg | |
1451 | In server SMTP, | |
1452 | the time to wait for another command. | |
1453 | [1h, 5m]. | |
1454 | .lp | |
1455 | For compatibility with old configuration files, | |
1456 | if no ``keyword='' is specified, | |
1457 | all the timeouts marked with \(dg are set to the indicated value. | |
55c435aa | 1458 | .pp |
e920f7ff EA |
1459 | Many of the RFC 1123 minimum values |
1460 | may well be too short. | |
55c435aa | 1461 | .i Sendmail |
e920f7ff | 1462 | was designed to the RFC 822 protocols, |
55c435aa EA |
1463 | which did not specify read timeouts; |
1464 | hence, | |
1465 | .i sendmail | |
1466 | does not guarantee to reply to messages promptly. | |
1467 | In particular, a | |
1468 | .q RCPT | |
1469 | command specifying a mailing list | |
1470 | will expand and verify the entire list; | |
1471 | a large list on a slow system | |
1472 | may take more than five minutes\**. | |
1473 | .(f | |
1474 | \**This verification includes looking up every address | |
1475 | with the name server; | |
1476 | this involves network delays, | |
1477 | and can in some cases can be considerable. | |
1478 | .)f | |
e920f7ff | 1479 | I recommend a one hour timeout \*- |
55c435aa EA |
1480 | since this failure is rare, |
1481 | a long timeout is not onerous | |
1482 | and may ultimately help reduce network load. | |
1483 | .pp | |
e920f7ff EA |
1484 | For example, the line: |
1485 | .(b | |
1486 | Orcommand=25m,datablock=3h | |
1487 | .)b | |
1488 | sets the server SMTP command timeout to 25 minutes | |
1489 | and the input data block timeout to three hours. | |
2fb78b49 | 1490 | .sh 3 "Message timeouts" |
4da134f8 | 1491 | .pp |
2fb78b49 EA |
1492 | After sitting in the queue for a few days, |
1493 | a message will time out. | |
1494 | This is to insure that at least the sender is aware | |
1495 | of the inability to send a message. | |
1496 | The timeout is typically set to three days. | |
1497 | This timeout is set using the | |
1498 | .b T | |
1499 | option in the configuration file. | |
1500 | .pp | |
1501 | The time of submission is set in the queue, | |
1502 | rather than the amount of time left until timeout. | |
1503 | As a result, you can flush messages that have been hanging | |
1504 | for a short period | |
1505 | by running the queue | |
1506 | with a short message timeout. | |
1507 | For example, | |
4da134f8 | 1508 | .(b |
55c435aa | 1509 | /usr/\*(SD/sendmail \-oT1d \-q |
4da134f8 | 1510 | .)b |
2fb78b49 EA |
1511 | will run the queue |
1512 | and flush anything that is one day old. | |
55c435aa EA |
1513 | .pp |
1514 | Since this option is global, | |
1515 | and since you can not | |
1516 | .i "a priori" | |
1517 | know how long another host outside your domain will be down, | |
e920f7ff | 1518 | a five day timeout is recommended. |
55c435aa | 1519 | This allows a recipient to fix the problem even if it occurs |
e920f7ff EA |
1520 | at the beginning of a long weekend. |
1521 | RFC 1123 section 5.3.1.1 says that this parameter | |
1522 | should be ``at least 4\-5 days''. | |
31e506e2 EA |
1523 | .pp |
1524 | The | |
1525 | .b T | |
1526 | option can also take a second timeout indicating a time after which | |
1527 | a warning message should be sent; | |
1528 | the two timeouts are separated by a slash. | |
1529 | For example, the value | |
1530 | .(b | |
1531 | 5d/4h | |
1532 | .)b | |
1533 | causes email to fail after five days, | |
1534 | but a warning message will be sent after four hours. | |
1535 | This should be large enough that the message will have been tried | |
1536 | several times. | |
1ef34914 EA |
1537 | .sh 2 "Forking During Queue Runs" |
1538 | .pp | |
1539 | By setting the | |
1540 | .b Y | |
1541 | option, | |
1542 | .i sendmail | |
1543 | will fork before each individual message | |
1544 | while running the queue. | |
1545 | This will prevent | |
1546 | .i sendmail | |
1547 | from consuming large amounts of memory, | |
1548 | so it may be useful in memory-poor environments. | |
1549 | However, if the | |
1550 | .b Y | |
1551 | option is not set, | |
1552 | .i sendmail | |
1553 | will keep track of hosts that are down during a queue run, | |
1554 | which can improve performance dramatically. | |
55c435aa EA |
1555 | .pp |
1556 | If the | |
1557 | .b Y | |
1558 | option is set, | |
1559 | .i sendmail | |
1560 | can not use connection caching. | |
1ef34914 EA |
1561 | .sh 2 "Queue Priorities" |
1562 | .pp | |
1563 | Every message is assigned a priority when it is first instantiated, | |
1564 | consisting of the message size (in bytes) | |
1565 | offset by the message class times the | |
1566 | .q "work class factor" | |
1567 | and the number of recipients times the | |
1568 | .q "work recipient factor." | |
55aab950 | 1569 | The priority is used to order the queue. |
1ef34914 EA |
1570 | Higher numbers for the priority mean that the message will be processed later |
1571 | when running the queue. | |
1572 | .pp | |
1573 | The message size is included so that large messages are penalized | |
1574 | relative to small messages. | |
1575 | The message class allows users to send | |
1576 | .q "high priority" | |
1577 | messages by including a | |
1578 | .q Precedence: | |
1579 | field in their message; | |
1580 | the value of this field is looked up in the | |
1581 | .b P | |
1582 | lines of the configuration file. | |
1583 | Since the number of recipients affects the amount of load a message presents | |
1584 | to the system, | |
1585 | this is also included into the priority. | |
1586 | .pp | |
1587 | The recipient and class factors | |
1588 | can be set in the configuration file using the | |
1589 | .b y | |
1590 | and | |
1591 | .b z | |
1592 | options respectively. | |
55aab950 | 1593 | They default to 30000 (for the recipient factor) |
1ef34914 EA |
1594 | and 1800 |
1595 | (for the class factor). | |
367a5dcd | 1596 | The initial priority is: |
d656ea51 | 1597 | .EQ |
55aab950 | 1598 | pri = size - (class times bold z) + (nrcpt times bold y) |
d656ea51 | 1599 | .EN |
367a5dcd EA |
1600 | (Remember, higher values for this parameter actually mean |
1601 | that the job will be treated with lower priority.) | |
1ef34914 EA |
1602 | .pp |
1603 | The priority of a job can also be adjusted each time it is processed | |
1604 | (that is, each time an attempt is made to deliver it) | |
1605 | using the | |
1606 | .q "work time factor," | |
1607 | set by the | |
1608 | .b Z | |
1609 | option. | |
1610 | This is added to the priority, | |
1611 | so it normally decreases the precedence of the job, | |
1612 | on the grounds that jobs that have failed many times | |
1613 | will tend to fail again in the future. | |
55aab950 EA |
1614 | The |
1615 | .b Z | |
1616 | option defaults to 90000. | |
1ef34914 EA |
1617 | .sh 2 "Load Limiting" |
1618 | .pp | |
1619 | .i Sendmail | |
1620 | can be asked to queue (but not deliver) | |
1621 | mail if the system load average gets too high | |
1622 | using the | |
1623 | .b x | |
1624 | option. | |
1625 | When the load average exceeds the value of the | |
1626 | .b x | |
1627 | option, | |
1628 | the delivery mode is set to | |
1629 | .b q | |
1630 | (queue only) | |
1631 | if the | |
1632 | .i "Queue Factor" | |
1633 | (\c | |
1634 | .b q | |
1635 | option) | |
1636 | divided by the difference in the current load average and the | |
1637 | .b x | |
1638 | option | |
1639 | plus one | |
1640 | exceeds the priority of the message \(em | |
1641 | that is, the message is queued iff: | |
1642 | .EQ | |
890cda2d | 1643 | pri > { bold q } over { LA - { bold x } + 1 } |
1ef34914 EA |
1644 | .EN |
1645 | The | |
1646 | .b q | |
55aab950 EA |
1647 | option defaults to 200000, |
1648 | so each point of load average is worth 200000 | |
1ef34914 | 1649 | priority points |
55aab950 | 1650 | (as described above). |
1ef34914 EA |
1651 | .pp |
1652 | For drastic cases, | |
1653 | the | |
1654 | .b X | |
1655 | option defines a load average at which sendmail will refuse | |
1656 | to accept network connections. | |
1657 | Locally generated mail | |
1658 | (including incoming UUCP mail) | |
1659 | is still accepted. | |
2fb78b49 | 1660 | .sh 2 "Delivery Mode" |
4da134f8 | 1661 | .pp |
2fb78b49 | 1662 | There are a number of delivery modes that |
4da134f8 | 1663 | .i sendmail |
2fb78b49 EA |
1664 | can operate in, |
1665 | set by the | |
1666 | .q d | |
1667 | configuration option. | |
1668 | These modes | |
1669 | specify how quickly mail will be delivered. | |
1670 | Legal modes are: | |
4da134f8 | 1671 | .(b |
2fb78b49 EA |
1672 | .ta 4n |
1673 | i deliver interactively (synchronously) | |
1674 | b deliver in background (asynchronously) | |
1675 | q queue only (don't deliver) | |
4da134f8 | 1676 | .)b |
2fb78b49 EA |
1677 | There are tradeoffs. |
1678 | Mode | |
1679 | .q i | |
1680 | passes the maximum amount of information to the sender, | |
1681 | but is hardly ever necessary. | |
1682 | Mode | |
1683 | .q q | |
1684 | puts the minimum load on your machine, | |
1685 | but means that delivery may be delayed for up to the queue interval. | |
1686 | Mode | |
1687 | .q b | |
1688 | is probably a good compromise. | |
74b6e641 EA |
1689 | However, this mode can cause large numbers of processes |
1690 | if you have a mailer that takes a long time to deliver a message. | |
859d056a EA |
1691 | .pp |
1692 | If you run in mode | |
1693 | .q q | |
1694 | (queue only) | |
1695 | .i sendmail | |
1696 | will not expand aliases and follow .forward files | |
1697 | upon initial receipt of the mail. | |
1698 | This speeds up the response to RCPT commands. | |
2fb78b49 | 1699 | .sh 2 "Log Level" |
4da134f8 | 1700 | .pp |
2fb78b49 EA |
1701 | The level of logging can be set for sendmail. |
1702 | The default using a standard configuration table is level 9. | |
1703 | The levels are as follows: | |
d656ea51 | 1704 | .nr ii 0.5i |
2fb78b49 EA |
1705 | .ip 0 |
1706 | No logging. | |
1707 | .ip 1 | |
6ebbc09a | 1708 | Serious system failures and potential security problems. |
2fb78b49 | 1709 | .ip 2 |
6ebbc09a | 1710 | Lost communications (network problems) and protocol failures. |
2fb78b49 | 1711 | .ip 3 |
6ebbc09a | 1712 | Other serious failures. |
2fb78b49 | 1713 | .ip 4 |
6ebbc09a | 1714 | Minor failures. |
2fb78b49 | 1715 | .ip 5 |
6ebbc09a | 1716 | Message collection statistics. |
2fb78b49 | 1717 | .ip 6 |
6ebbc09a EA |
1718 | Creation of error messages, |
1719 | VRFY and EXPN commands. | |
1720 | .ip 7 | |
1721 | Delivery failures (host or user unknown, etc.). | |
1722 | .ip 8 | |
1723 | Successful deliveries. | |
ef1c322e | 1724 | .ip 9 |
6ebbc09a EA |
1725 | Messages being deferred |
1726 | (due to a host being down, etc.). | |
1727 | .ip 10 | |
1728 | Database expansion (alias, forward, and userdb lookups). | |
1729 | .ip 15 | |
1730 | Automatic alias database rebuilds. | |
1731 | .ip 20 | |
d656ea51 EA |
1732 | Logs attempts to run locked queue files. |
1733 | These are not errors, | |
1734 | but can be useful to note if your queue appears to be clogged. | |
6ebbc09a EA |
1735 | .ip 30 |
1736 | Lost locks (only if using lockf instead of flock). | |
1737 | .lp | |
1738 | Additionally, | |
1739 | values above 64 are reserved for extremely verbose debuggging output. | |
1740 | No normal site would ever set these. | |
2fb78b49 | 1741 | .sh 2 "File Modes" |
4da134f8 | 1742 | .pp |
2fb78b49 EA |
1743 | There are a number of files |
1744 | that may have a number of modes. | |
1745 | The modes depend on what functionality you want | |
1746 | and the level of security you require. | |
1747 | .sh 3 "To suid or not to suid?" | |
4da134f8 | 1748 | .pp |
2fb78b49 EA |
1749 | .i Sendmail |
1750 | can safely be made | |
1751 | setuid to root. | |
1752 | At the point where it is about to | |
74b6e641 | 1753 | .i exec \|(2) |
2fb78b49 EA |
1754 | a mailer, |
1755 | it checks to see if the userid is zero; | |
1756 | if so, | |
1757 | it resets the userid and groupid to a default | |
1758 | (set by the | |
1759 | .b u | |
4da134f8 | 1760 | and |
2fb78b49 EA |
1761 | .b g |
1762 | options). | |
1763 | (This can be overridden | |
1764 | by setting the | |
1765 | .b S | |
1766 | flag to the mailer | |
1767 | for mailers that are trusted | |
1768 | and must be called as root.) | |
1769 | However, | |
1770 | this will cause mail processing | |
1771 | to be accounted | |
1772 | (using | |
74b6e641 | 1773 | .i sa \|(8)) |
2fb78b49 EA |
1774 | to root |
1775 | rather than to the user sending the mail. | |
2fb78b49 | 1776 | .sh 3 "Should my alias database be writable?" |
4da134f8 | 1777 | .pp |
2fb78b49 EA |
1778 | At Berkeley |
1779 | we have the alias database | |
daae36f7 | 1780 | (/etc/aliases*) |
18843c53 PL |
1781 | mode 644. |
1782 | While this is not as flexible as if the database | |
1783 | were more 666, it avoids potential security problems | |
1784 | with a globally writable database. | |
4da134f8 | 1785 | .pp |
2fb78b49 EA |
1786 | The database that |
1787 | .i sendmail | |
1788 | actually used | |
1789 | is represented by the two files | |
1790 | .i aliases.dir | |
4da134f8 | 1791 | and |
2fb78b49 | 1792 | .i aliases.pag |
de7324ac EA |
1793 | (both in /etc) |
1794 | (or | |
1795 | .i aliases.db | |
1796 | if you are running with the new Berkeley database primitives). | |
2fb78b49 | 1797 | The mode on these files should match the mode |
daae36f7 | 1798 | on /etc/aliases. |
2fb78b49 EA |
1799 | If |
1800 | .i aliases | |
1801 | is writable | |
1802 | and the | |
1803 | DBM | |
1804 | files | |
4da134f8 | 1805 | (\c |
2fb78b49 EA |
1806 | .i aliases.dir |
1807 | and | |
1808 | .i aliases.pag ) | |
1809 | are not, | |
1810 | users will be unable to reflect their desired changes | |
1811 | through to the actual database. | |
1812 | However, | |
1813 | if | |
1814 | .i aliases | |
1815 | is read-only | |
1816 | and the DBM files are writable, | |
1817 | a slightly sophisticated user | |
1818 | can arrange to steal mail anyway. | |
4da134f8 | 1819 | .pp |
2fb78b49 EA |
1820 | If your DBM files are not writable by the world |
1821 | or you do not have auto-rebuild enabled | |
1822 | (with the | |
1823 | .q D | |
1824 | option), | |
1825 | then you must be careful to reconstruct the alias database | |
1826 | each time you change the text version: | |
4da134f8 | 1827 | .(b |
74b6e641 | 1828 | newaliases |
4da134f8 | 1829 | .)b |
2fb78b49 EA |
1830 | If this step is ignored or forgotten |
1831 | any intended changes will also be ignored or forgotten. | |
55c435aa EA |
1832 | .sh 2 "Connection Caching" |
1833 | .pp | |
1834 | When processing the queue, | |
1835 | .b sendmail | |
1836 | will try to keep the last few open connections open | |
1837 | to avoid startup and shutdown costs. | |
1838 | This only applies to IPC connections. | |
1839 | .pp | |
1840 | When trying to open a connection | |
1841 | the cache is first searched. | |
1842 | If an open connection is found, it is probed to see if it is still active | |
1843 | by sending a | |
1844 | .sm NOOP | |
1845 | command. | |
1846 | It is not an error if this fails; | |
1847 | instead, the connection is closed and reopened. | |
1848 | .pp | |
1849 | Two parameters control the connection cache. | |
1850 | The | |
1851 | .b k | |
1852 | option defines the number of simultaneous open connections | |
1853 | that will be permitted. | |
1854 | If it is set to zero, | |
1855 | connections will be closed as quickly as possible. | |
1856 | The default is one. | |
1857 | This should be set as appropriate for your system size; | |
1858 | it will limit the amount of system resources that | |
1859 | .b sendmail | |
1860 | will use during queue runs. | |
1861 | .pp | |
1862 | The | |
1863 | .b K | |
1864 | option specifies the maximum time that any cached connection | |
1865 | will be permitted to idle. | |
1866 | When the idle time exceeds this value | |
1867 | the connection is closed. | |
1868 | This number should be small | |
1869 | (under ten minutes) | |
1870 | to prevent you from grabbing too many resources | |
1871 | from other hosts. | |
1872 | The default is five minutes. | |
1873 | .sh 2 "Name Server Access" | |
1874 | .pp | |
1875 | If your system supports the name server, | |
1876 | then the probability is that | |
1877 | .i sendmail | |
1878 | will be using it regardless of how you configure sendmail. | |
d656ea51 EA |
1879 | However, if you have nameserver support |
1880 | which you are not using, | |
1881 | sendmail will get a | |
1882 | .q "connection refused" | |
1883 | message when it tries to connect to the name server | |
1884 | (either by calling | |
55c435aa | 1885 | .i gethostbyname |
d656ea51 EA |
1886 | or by trying to look up the MX records). |
1887 | If the | |
55c435aa | 1888 | .b I |
d656ea51 EA |
1889 | option is set, |
1890 | .i sendmail | |
1891 | will interpret this to mean a temporary failure; | |
1892 | otherwise, it ignores the name server data. | |
1893 | If your name server is running properly, | |
1894 | the setting of this option is not relevant; | |
1895 | however, it is important that it be set properly | |
1896 | to make error handling work properly. | |
55c435aa | 1897 | .pp |
599d791f EA |
1898 | This option also allows you to tweak name server options. |
1899 | The command line takes a series of flags as documented in | |
1900 | .i resolver (3) | |
1901 | (with the leading | |
1902 | .q RES_ | |
1903 | deleted). | |
1904 | Each can be preceded by an optional `+' or `\(mi'. | |
1905 | For example, the line | |
1906 | .(b | |
1907 | OITrue +AAONLY \(miDNSRCH | |
1908 | .)b | |
1909 | turns on the AAONLY (accept authoritative answers only) | |
1910 | and turns off the DNSRCH (search the domain path) options. | |
1911 | Most resolver libraries default DNSRCH, DEFNAMES, and RECURSE | |
1912 | flags on and all others off. | |
1913 | Note the use of the initial ``True'' \*- | |
1914 | this is for compatibility with previous versions of sendmail, | |
1915 | but is not otherwise necessary. | |
1916 | .pp | |
859d056a | 1917 | Version level 1 configurations |
599d791f EA |
1918 | turn DNSRCH and DEFNAMES off when doing delivery lookups, |
1919 | but leave them on everywhere else. | |
acbfac81 | 1920 | Version 6 of |
599d791f EA |
1921 | .i sendmail |
1922 | ignores them when doing canonification lookups | |
1923 | (that is, when using $[ ... $]), | |
1924 | and always does the search. | |
1925 | If you don't want to do automatic name extension, | |
1926 | don't call $[ ... $]. | |
1927 | .pp | |
1928 | The search rules for $[ ... $] are somewhat different than usual. | |
1929 | If the name (that is, the ``...'') | |
1930 | has at least one dot, it always tries the unmodified name first. | |
1931 | If that fails, it tries the reduced search path, | |
1932 | and lastly tries the unmodified name | |
1933 | (but only for names without a dot, | |
1934 | since names with a dot have already been tried). | |
1935 | This allows names such as | |
1936 | ``utc.CS'' | |
1937 | to match the site in Czechoslovakia | |
1938 | rather than the site in your local Computer Science department. | |
6d5ff626 EA |
1939 | It also prefers A and CNAME records over MX records \*- |
1940 | that is, if it finds an MX record it makes note of it, | |
1941 | but keeps looking. | |
1942 | This way, if you have a wildcard MX record matching your domain, | |
1943 | it will not assume that all names match. | |
f13b6b36 EA |
1944 | .sh 2 "Moving the Per-User Forward Files" |
1945 | .pp | |
1946 | Some sites mount each user's home directory | |
1947 | from a local disk on their workstation, | |
1948 | so that local access is fast. | |
1949 | However, the result is that .forward file lookups are slow. | |
1950 | In some cases, | |
1951 | mail can even be delivered on machines inappropriately | |
1952 | because of a file server being down. | |
1953 | The performance can be especially bad if you run the automounter. | |
1954 | .pp | |
1955 | The | |
1956 | .b J | |
1957 | option allows you to set a path of forward files. | |
1958 | For example, the config file line | |
1959 | .(b | |
1960 | OJ/var/forward/$u:$z/.forward | |
1961 | .)b | |
1962 | would first look for a file with the same name as the user's login | |
1963 | in /var/forward; | |
1964 | if that is not found (or is inaccessible) | |
1965 | the file | |
1966 | .q \&.forward | |
1967 | in the user's home directory is searched. | |
1968 | A truly perverse site could also search by sender | |
1969 | by using $r, $s, or $f. | |
1970 | .pp | |
1971 | If you create a directory such as /var/forward, | |
1972 | it should be mode 1777 | |
1973 | (that is, the sticky bit should be set). | |
1974 | Users should create the files mode 644. | |
59baf33c EA |
1975 | .sh 2 "Free Space" |
1976 | .pp | |
859d056a | 1977 | On systems that have the |
59baf33c EA |
1978 | .i statfs (2) |
1979 | system call, | |
1980 | you can specify a minimum number of free blocks on the queue filesystem | |
1981 | using the | |
1982 | .b b | |
1983 | option. | |
1984 | If there are fewer than the indicated number of blocks free | |
1985 | on the filesystem on which the queue is mounted | |
1986 | the SMTP server will reject mail | |
1987 | with the | |
1988 | 452 error code. | |
1989 | This invites the SMTP client to try again later. | |
1990 | .pp | |
1991 | Beware of setting this option too high; | |
1992 | it can cause rejection of email | |
1993 | when that mail would be processed without difficulty. | |
50d4a65c EA |
1994 | .pp |
1995 | This option can also specify an advertised | |
1996 | .q "maximum message size" | |
1997 | for hosts that speak ESMTP. | |
59baf33c EA |
1998 | .sh 2 "Privacy Flags" |
1999 | .pp | |
2000 | The | |
2001 | .b p | |
2002 | option allows you to set certain | |
2003 | ``privacy'' | |
2004 | flags. | |
2005 | Actually, many of them don't give you any extra privacy, | |
2006 | rather just insisting that client SMTP servers | |
2007 | use the HELO command | |
2008 | before using certain commands. | |
2009 | .pp | |
2010 | The option takes a series of flag names; | |
2011 | the final privacy is the inclusive or of those flags. | |
2012 | For example: | |
2013 | .(b | |
2014 | Ob needmailhelo, noexpn | |
2015 | .)b | |
475d7a3d | 2016 | insists that the HELO or EHLO command be used before a MAIL command is accepted |
59baf33c | 2017 | and disables the EXPN command. |
890cda2d EA |
2018 | .pp |
2019 | The | |
2020 | .q restrictmailq | |
2021 | option restricts printing the queue to the group that owns the queue directory. | |
2022 | It is absurd to set this if you don't also protect the logs. | |
2fb78b49 | 2023 | .sh 1 "THE WHOLE SCOOP ON THE CONFIGURATION FILE" |
4da134f8 | 2024 | .pp |
2fb78b49 EA |
2025 | This section describes the configuration file |
2026 | in detail, | |
2027 | including hints on how to write one of your own | |
2028 | if you have to. | |
4da134f8 | 2029 | .pp |
2fb78b49 EA |
2030 | There is one point that should be made clear immediately: |
2031 | the syntax of the configuration file | |
2032 | is designed to be reasonably easy to parse, | |
2033 | since this is done every time | |
2034 | .i sendmail | |
2035 | starts up, | |
2036 | rather than easy for a human to read or write. | |
2037 | On the | |
2038 | .q "future project" | |
2039 | list is a | |
2040 | configuration-file compiler. | |
4da134f8 | 2041 | .pp |
2fb78b49 EA |
2042 | An overview of the configuration file |
2043 | is given first, | |
2044 | followed by details of the semantics. | |
de7324ac | 2045 | .sh 2 "Configuration File Lines" |
2fb78b49 EA |
2046 | .pp |
2047 | The configuration file is organized as a series of lines, | |
2048 | each of which begins with a single character | |
2049 | defining the semantics for the rest of the line. | |
2050 | Lines beginning with a space or a tab | |
2051 | are continuation lines | |
2052 | (although the semantics are not well defined in many places). | |
2053 | Blank lines and lines beginning with a sharp symbol | |
2054 | (`#') | |
2055 | are comments. | |
2056 | .sh 3 "R and S \*- rewriting rules" | |
2057 | .pp | |
2058 | The core of address parsing | |
2059 | are the rewriting rules. | |
2060 | These are an ordered production system. | |
2061 | .i Sendmail | |
2062 | scans through the set of rewriting rules | |
2063 | looking for a match on the left hand side | |
2064 | (LHS) | |
2065 | of the rule. | |
2066 | When a rule matches, | |
2067 | the address is replaced by the right hand side | |
2068 | (RHS) | |
2069 | of the rule. | |
2070 | .pp | |
2071 | There are several sets of rewriting rules. | |
2072 | Some of the rewriting sets are used internally | |
2073 | and must have specific semantics. | |
2074 | Other rewriting sets | |
2075 | do not have specifically assigned semantics, | |
2076 | and may be referenced by the mailer definitions | |
2077 | or by other rewriting sets. | |
2078 | .pp | |
2079 | The syntax of these two commands are: | |
2080 | .(b F | |
2081 | .b S \c | |
4da134f8 | 2082 | .i n |
2fb78b49 EA |
2083 | .)b |
2084 | Sets the current ruleset being collected to | |
4da134f8 | 2085 | .i n . |
2fb78b49 EA |
2086 | If you begin a ruleset more than once |
2087 | it deletes the old definition. | |
2088 | .(b F | |
2089 | .b R \c | |
2090 | .i lhs | |
2091 | .i rhs | |
2092 | .i comments | |
4da134f8 | 2093 | .)b |
4da134f8 | 2094 | The |
2fb78b49 EA |
2095 | fields must be separated |
2096 | by at least one tab character; | |
2097 | there may be embedded spaces | |
2098 | in the fields. | |
4da134f8 | 2099 | The |
2fb78b49 EA |
2100 | .i lhs |
2101 | is a pattern that is applied to the input. | |
2102 | If it matches, | |
2103 | the input is rewritten to the | |
2104 | .i rhs . | |
2105 | The | |
2106 | .i comments | |
2107 | are ignored. | |
7c1a78dc EA |
2108 | .pp |
2109 | Macro expansions of the form | |
2110 | .b $ \c | |
2111 | .i x | |
2112 | are performed when the configuration file is read. | |
2113 | Expansions of the form | |
2114 | .b $& \c | |
2115 | .i x | |
2116 | are performed at run time using a somewhat less general algorithm. | |
2117 | This for is intended only for referencing internally defined macros | |
2118 | such as | |
2119 | .b $h | |
2120 | that are changed at runtime. | |
de7324ac EA |
2121 | .sh 4 "The left hand side" |
2122 | .pp | |
2123 | The left hand side of rewriting rules contains a pattern. | |
2124 | Normal words are simply matched directly. | |
2125 | Metasyntax is introduced using a dollar sign. | |
2126 | The metasymbols are: | |
2127 | .(b | |
2128 | .ta \w'\fB$=\fP\fIx\fP 'u | |
2129 | \fB$*\fP Match zero or more tokens | |
2130 | \fB$+\fP Match one or more tokens | |
2131 | \fB$\-\fP Match exactly one token | |
dd905b60 | 2132 | \fB$=\fP\fIx\fP Match any phrase in class \fIx\fP |
7901972a | 2133 | \fB$~\fP\fIx\fP Match any word not in class \fIx\fP |
de7324ac EA |
2134 | .)b |
2135 | If any of these match, | |
2136 | they are assigned to the symbol | |
2137 | .b $ \c | |
2138 | .i n | |
2139 | for replacement on the right hand side, | |
2140 | where | |
2141 | .i n | |
2142 | is the index in the LHS. | |
2143 | For example, | |
2144 | if the LHS: | |
2145 | .(b | |
2146 | $\-:$+ | |
2147 | .)b | |
2148 | is applied to the input: | |
2149 | .(b | |
2150 | UCBARPA:eric | |
2151 | .)b | |
2152 | the rule will match, and the values passed to the RHS will be: | |
2153 | .(b | |
2154 | .ta 4n | |
2155 | $1 UCBARPA | |
2156 | $2 eric | |
2157 | .)b | |
acbfac81 EA |
2158 | .pp |
2159 | Additionally, the LHS can include | |
2160 | .b $@ | |
2161 | to match zero tokens. | |
2162 | This is | |
2163 | .i not | |
2164 | bound to a | |
2165 | .b $ \c | |
2166 | .i N | |
2167 | on the RHS, and is normally only used when it stands alone | |
2168 | in order to match the null input. | |
de7324ac EA |
2169 | .sh 4 "The right hand side" |
2170 | .pp | |
2171 | When the left hand side of a rewriting rule matches, | |
2172 | the input is deleted and replaced by the right hand side. | |
2173 | Tokens are copied directly from the RHS | |
2174 | unless they begin with a dollar sign. | |
2175 | Metasymbols are: | |
2176 | .(b | |
2177 | .ta \w'$#mailer\0\0\0'u | |
2178 | \fB$\fP\fIn\fP Substitute indefinite token \fIn\fP from LHS | |
2179 | \fB$[\fP\fIname\fP\fB$]\fP Canonicalize \fIname\fP | |
2180 | \fB$(\fP\fImap key\fP \fB$@\fP\fIarguments\fP \fB$:\fP\fIdefault\fP \fB$)\fP | |
2181 | Generalized keyed mapping function | |
2182 | \fB$>\fP\fIn\fP \*(lqCall\*(rq ruleset \fIn\fP | |
2183 | \fB$#\fP\fImailer\fP Resolve to \fImailer\fP | |
2184 | \fB$@\fP\fIhost\fP Specify \fIhost\fP | |
2185 | \fB$:\fP\fIuser\fP Specify \fIuser\fP | |
2186 | .)b | |
2187 | .pp | |
2188 | The | |
2189 | .b $ \c | |
2190 | .i n | |
2191 | syntax substitutes the corresponding value from a | |
2192 | .b $+ , | |
2193 | .b $\- , | |
2194 | .b $* , | |
2195 | .b $= , | |
2196 | or | |
2197 | .b $~ | |
2198 | match on the LHS. | |
2199 | It may be used anywhere. | |
2200 | .pp | |
2201 | A host name enclosed between | |
2202 | .b $[ | |
2203 | and | |
2204 | .b $] | |
2205 | is looked up using the | |
2206 | .i gethostent \|(3) | |
59baf33c EA |
2207 | routines and replaced by the canonical name\**. |
2208 | .(f | |
2209 | \**This is actually | |
2210 | completely equivalent | |
2211 | to $(host \fIhostname\fP$). | |
2212 | In particular, a | |
2213 | .b $: | |
2214 | default can be used. | |
2215 | .)f | |
de7324ac EA |
2216 | For example, |
2217 | .q $[csam$] | |
2218 | might become | |
2219 | .q lbl-csam.arpa | |
2220 | and | |
2221 | .q $[[128.32.130.2]$] | |
2222 | would become | |
2223 | .q vangogh.CS.Berkeley.EDU. | |
859d056a EA |
2224 | .i Sendmail |
2225 | recognizes it's numeric IP address | |
2226 | without calling the name server | |
2227 | and replaces it with it's canonical name. | |
de7324ac EA |
2228 | .pp |
2229 | The | |
2230 | .b $( | |
2231 | \&... | |
2232 | .b $) | |
2233 | syntax is a more general form of lookup; | |
2234 | it uses a named map instead of an implicit map. | |
2235 | If no lookup is found, the indicted | |
2236 | .i default | |
2237 | is inserted; | |
2238 | if no default is specified and no lookup matches, | |
2239 | the value is left unchanged. | |
2240 | .pp | |
2241 | The | |
2242 | .b $> \c | |
2243 | .i n | |
2244 | syntax | |
2245 | causes the remainder of the line to be substituted as usual | |
2246 | and then passed as the argument to ruleset | |
2247 | .i n . | |
2248 | The final value of ruleset | |
2249 | .i n | |
2250 | then becomes | |
2251 | the substitution for this rule. | |
2252 | .pp | |
2253 | The | |
2254 | .b $# | |
2255 | syntax should | |
2256 | .i only | |
2257 | be used in ruleset zero. | |
2258 | It causes evaluation of the ruleset to terminate immediately, | |
2259 | and signals to sendmail that the address has completely resolved. | |
2260 | The complete syntax is: | |
2261 | .(b | |
859d056a | 2262 | \fB$#\fP\fImailer\fP \fB$@\fP\fIhost\fP \fB$:\fP\fIuser\fP |
de7324ac EA |
2263 | .)b |
2264 | This specifies the | |
2265 | {mailer, host, user} | |
2266 | 3-tuple necessary to direct the mailer. | |
2267 | If the mailer is local | |
f6d3c63d EA |
2268 | the host part may be omitted\**. |
2269 | .(f | |
2270 | \**You may want to use it for special | |
2271 | .q "per user" | |
2272 | extensions. | |
2273 | For example, at CMU you can send email to | |
2274 | .q jgm+foo ; | |
2275 | the part after the plus sign | |
2276 | is not part of the user name, | |
2277 | and is passed to the local mailer for local use. | |
2278 | .)f | |
de7324ac EA |
2279 | The |
2280 | .i mailer | |
de7324ac EA |
2281 | must be a single word, |
2282 | but the | |
337767a9 EA |
2283 | .i host |
2284 | and | |
de7324ac EA |
2285 | .i user |
2286 | may be multi-part. | |
337767a9 EA |
2287 | If the |
2288 | .i mailer | |
2289 | is the builtin IPC mailer, | |
2290 | the | |
2291 | .i host | |
2292 | may be a colon-separated list of hosts | |
2293 | that are searched in order for the first working address | |
2294 | (exactly like MX records). | |
de7324ac EA |
2295 | .pp |
2296 | A RHS may also be preceded by a | |
2297 | .b $@ | |
2298 | or a | |
2299 | .b $: | |
2300 | to control evaluation. | |
2301 | A | |
2302 | .b $@ | |
2303 | prefix causes the ruleset to return with the remainder of the RHS | |
2304 | as the value. | |
2305 | A | |
2306 | .b $: | |
2307 | prefix causes the rule to terminate immediately, | |
2308 | but the ruleset to continue; | |
2309 | this can be used to avoid continued application of a rule. | |
2310 | The prefix is stripped before continuing. | |
2311 | .pp | |
2312 | The | |
2313 | .b $@ | |
2314 | and | |
2315 | .b $: | |
2316 | prefixes may precede a | |
2317 | .b $> | |
2318 | spec; | |
2319 | for example: | |
2320 | .(b | |
2321 | .ta 8n | |
859d056a | 2322 | R$+ $: $>7 $1 |
de7324ac EA |
2323 | .)b |
2324 | matches anything, | |
2325 | passes that to ruleset seven, | |
2326 | and continues; | |
2327 | the | |
2328 | .b $: | |
2329 | is necessary to avoid an infinite loop. | |
2330 | .pp | |
2331 | Substitution occurs in the order described, | |
2332 | that is, | |
2333 | parameters from the LHS are substituted, | |
2334 | hostnames are canonicalized, | |
2335 | .q subroutines | |
2336 | are called, | |
2337 | and finally | |
2338 | .b $# , | |
2339 | .b $@ , | |
2340 | and | |
2341 | .b $: | |
2342 | are processed. | |
475d7a3d EA |
2343 | .sh 4 "Semantics of rewriting rule sets" |
2344 | .pp | |
2345 | There are five rewriting sets | |
2346 | that have specific semantics. | |
2347 | These are related as depicted by figure 2. | |
2348 | .(z | |
2349 | .hl | |
2350 | .ie n \{\ | |
2351 | .(c | |
2352 | +---+ | |
2353 | -->| 0 |-->resolved address | |
2354 | / +---+ | |
2355 | / +---+ +---+ | |
2356 | / ---->| 1 |-->| S |-- | |
2357 | +---+ / +---+ / +---+ +---+ \e +---+ | |
2358 | addr-->| 3 |-->| D |-- --->| 4 |-->msg | |
2359 | +---+ +---+ \e +---+ +---+ / +---+ | |
2360 | --->| 2 |-->| R |-- | |
2361 | +---+ +---+ | |
2362 | .)c | |
2363 | ||
2364 | .\} | |
2365 | .el .ie !"\*(.T"" \ | |
2366 | \{\ | |
2367 | .PS | |
2368 | boxwid = 0.3i | |
2369 | boxht = 0.3i | |
2370 | movewid = 0.3i | |
2371 | moveht = 0.3i | |
2372 | linewid = 0.3i | |
2373 | lineht = 0.3i | |
2374 | ||
2375 | box invis "addr"; arrow | |
2376 | Box3: box "3" | |
2377 | A1: arrow | |
2378 | BoxD: box "D"; line; L1: Here | |
2379 | C: [ | |
2380 | C1: arrow; box "1"; arrow; box "S"; line; E1: Here | |
2381 | move to C1 down 0.5; right | |
2382 | C2: arrow; box "2"; arrow; box "R"; line; E2: Here | |
2383 | ] with .w at L1 + (0.5, 0) | |
2384 | move to C.e right 0.5 | |
2385 | L4: arrow; box "4"; arrow; box invis "msg" | |
2386 | line from L1 to C.C1 | |
2387 | line from L1 to C.C2 | |
2388 | line from C.E1 to L4 | |
2389 | line from C.E2 to L4 | |
2390 | move to BoxD.n up 0.6; right | |
2391 | Box0: arrow; box "0" | |
2392 | arrow; box invis "resolved address" width 1.3 | |
2393 | line from 1/3 of the way between A1 and BoxD.w to Box0 | |
2394 | .PE | |
2395 | .\} | |
2396 | .el .sp 2i | |
2397 | .ce | |
2398 | Figure 2 \*- Rewriting set semantics | |
2399 | .(c | |
2400 | D \*- sender domain addition | |
2401 | S \*- mailer-specific sender rewriting | |
2402 | R \*- mailer-specific recipient rewriting | |
2403 | .)c | |
2404 | .hl | |
2405 | .)z | |
2406 | .pp | |
2407 | Ruleset three | |
2408 | should turn the address into | |
2409 | .q "canonical form." | |
2410 | This form should have the basic syntax: | |
2411 | .(b | |
2412 | local-part@host-domain-spec | |
2413 | .)b | |
2414 | If no | |
2415 | .q @ | |
2416 | sign is specified, | |
2417 | then the | |
2418 | host-domain-spec | |
2419 | .i may | |
2420 | be appended from the | |
2421 | sender address | |
2422 | (if the | |
2423 | .b C | |
2424 | flag is set in the mailer definition | |
2425 | corresponding to the | |
2426 | .i sending | |
2427 | mailer). | |
2428 | Ruleset three | |
2429 | is applied by sendmail | |
2430 | before doing anything with any address. | |
2431 | .pp | |
2432 | Ruleset zero | |
2433 | is applied after ruleset three | |
2434 | to addresses that are going to actually specify recipients. | |
2435 | It must resolve to a | |
2436 | .i "{mailer, host, user}" | |
2437 | triple. | |
2438 | The | |
2439 | .i mailer | |
2440 | must be defined in the mailer definitions | |
2441 | from the configuration file. | |
2442 | The | |
2443 | .i host | |
2444 | is defined into the | |
2445 | .b $h | |
2446 | macro | |
2447 | for use in the argv expansion of the specified mailer. | |
2448 | .pp | |
2449 | Rulesets one and two | |
2450 | are applied to all sender and recipient addresses respectively. | |
2451 | They are applied before any specification | |
2452 | in the mailer definition. | |
2453 | They must never resolve. | |
2454 | .pp | |
2455 | Ruleset four is applied to all addresses | |
2456 | in the message. | |
2457 | It is typically used | |
2458 | to translate internal to external form. | |
2459 | .sh 4 "IPC mailers" | |
2460 | .pp | |
2461 | Some special processing occurs | |
337767a9 EA |
2462 | if the ruleset zero resolves to an IPC mailer |
2463 | (that is, a mailer that has | |
2464 | .q [IPC] | |
2465 | listed as the Path in the | |
2466 | .b M | |
2467 | configuration line. | |
475d7a3d EA |
2468 | The host name passed after |
2469 | .q $@ | |
2470 | has MX expansion performed; | |
2471 | this looks the name up in DNS to find alternate delivery sites. | |
2472 | .pp | |
2473 | The host name can also be provided as a dotted quad in square brackets; | |
2474 | for example: | |
2475 | .(b | |
2476 | [128.32.149.78] | |
2477 | .)b | |
2478 | This causes direct conversion of the numeric value | |
2479 | to a TCP/IP host address. | |
2480 | .pp | |
337767a9 EA |
2481 | The host name passed in after the |
2482 | .q $@ | |
2483 | may also be a colon-separated list of hosts. | |
2484 | Each is separately MX expanded and the results are concatenated | |
2485 | to make (essentially) one long MX list. | |
2486 | The intent here is to create | |
2487 | .q fake | |
2488 | MX records that are not published in DNS | |
2489 | for private internal networks. | |
2490 | .pp | |
475d7a3d EA |
2491 | As a final special case, the host name can be passed in |
2492 | as a text string | |
2493 | in square brackets: | |
2494 | .(b | |
2495 | [ucbvax.berkeley.edu] | |
2496 | .)b | |
2497 | This form avoids the MX mapping. | |
2498 | .b N.B.: | |
2499 | This is intended only for situations where you have a network firewall, | |
2500 | so that your MX record points to a gateway machine; | |
2501 | this machine could then do direct delivery to machines | |
2502 | within your local domain. | |
2503 | Use of this feature directly violates RFC 1123 section 5.3.5: | |
2504 | it should not be used lightly. | |
2505 | .sh 3 "D \*- define macro" | |
2fb78b49 EA |
2506 | .pp |
2507 | Macros are named with a single character. | |
2508 | These may be selected from the entire ASCII set, | |
2509 | but user-defined macros | |
2510 | should be selected from the set of upper case letters only. | |
2511 | Lower case letters | |
2512 | and special symbols | |
2513 | are used internally. | |
2514 | .pp | |
2515 | The syntax for macro definitions is: | |
2516 | .(b F | |
2517 | .b D \c | |
2518 | .i x\|val | |
2519 | .)b | |
2520 | where | |
2521 | .i x | |
2522 | is the name of the macro | |
4da134f8 | 2523 | and |
2fb78b49 EA |
2524 | .i val |
2525 | is the value it should have. | |
2fb78b49 | 2526 | .pp |
de7324ac EA |
2527 | Macros are interpolated |
2528 | using the construct | |
2529 | .b $ \c | |
2530 | .i x , | |
2531 | where | |
2532 | .i x | |
2533 | is the name of the macro to be interpolated. | |
7c1a78dc EA |
2534 | This interpolation is done when the configuration file is read, |
2535 | except in | |
2536 | .b M | |
2537 | lines. | |
2538 | The special construct | |
2539 | .b $& \c | |
2540 | .i x | |
2541 | can be used in | |
2542 | .b R | |
2543 | lines to get deferred interpolation. | |
2fb78b49 | 2544 | .pp |
de7324ac | 2545 | Conditionals can be specified using the syntax: |
4da134f8 | 2546 | .(b |
de7324ac | 2547 | $?x text1 $| text2 $. |
4da134f8 | 2548 | .)b |
de7324ac EA |
2549 | This interpolates |
2550 | .i text1 | |
2551 | if the macro | |
2552 | .b $x | |
2553 | is set, | |
2fb78b49 | 2554 | and |
de7324ac EA |
2555 | .i text2 |
2556 | otherwise. | |
2557 | The | |
2558 | .q else | |
2559 | (\c | |
2560 | .b $| ) | |
2561 | clause may be omitted. | |
4da134f8 | 2562 | .pp |
7c1a78dc EA |
2563 | Lower case macro names are reserved to have |
2564 | special semantics, | |
2565 | used to pass information in or out of sendmail, | |
2566 | and special characters are reserved to | |
2567 | provide conditionals, etc. | |
2568 | Upper case names | |
2569 | (that is, | |
2570 | .b $A | |
2571 | through | |
2572 | .b $Z ) | |
2573 | are specifically reserved for configuration file authors. | |
2574 | .pp | |
de7324ac EA |
2575 | The following macros |
2576 | .i must | |
2577 | be defined to transmit information into | |
2578 | .i sendmail: | |
0a9ea158 | 2579 | .(b |
de7324ac EA |
2580 | .ta 4n |
2581 | e The SMTP entry message | |
2582 | j The \*(lqofficial\*(rq domain name for this site | |
2583 | l The format of the UNIX from line | |
2584 | n The name of the daemon (for error messages) | |
2585 | o The set of "operators" in addresses | |
2586 | q default format of sender address | |
2fb78b49 | 2587 | .)b |
4da134f8 | 2588 | The |
de7324ac EA |
2589 | .b $e |
2590 | macro is printed out when SMTP starts up. | |
2591 | The first word must be the | |
2592 | .b $j | |
2593 | macro. | |
2594 | The | |
2595 | .b $j | |
2596 | macro | |
2597 | should be in RFC821 format. | |
2598 | The | |
2599 | .b $l | |
2fb78b49 | 2600 | and |
de7324ac EA |
2601 | .b $n |
2602 | macros can be considered constants | |
2603 | except under terribly unusual circumstances. | |
2604 | The | |
2605 | .b $o | |
2606 | macro consists of a list of characters | |
2607 | which will be considered tokens | |
2608 | and which will separate tokens | |
2609 | when doing parsing. | |
2610 | For example, if | |
2611 | .q @ | |
2612 | were in the | |
2613 | .b $o | |
2614 | macro, then the input | |
2615 | .q a@b | |
2616 | would be scanned as three tokens: | |
2617 | .q a, | |
2618 | .q @, | |
2619 | and | |
2620 | .q b. | |
2621 | Finally, the | |
2622 | .b $q | |
2623 | macro specifies how an address should appear in a message | |
2624 | when it is defaulted. | |
2625 | For example, on our system these definitions are: | |
2fb78b49 | 2626 | .(b |
859d056a | 2627 | De$j Sendmail $v/$Z ready at $b |
de7324ac | 2628 | DnMAILER-DAEMON |
91679fc8 | 2629 | DlFrom $g $d |
859d056a EA |
2630 | Do.:%@!^/[] |
2631 | Dq$?x$x <$g>$|$g$. | |
2632 | Dj$w | |
2fb78b49 | 2633 | .)b |
de7324ac EA |
2634 | An acceptable alternative for the |
2635 | .b $q | |
2636 | macro is | |
859d056a | 2637 | .q "$g$?x ($x)$." . |
de7324ac | 2638 | These correspond to the following two formats: |
2fb78b49 | 2639 | .(b |
de7324ac | 2640 | Eric Allman <eric@CS.Berkeley.EDU> |
859d056a | 2641 | eric@CS.Berkeley.EDU (Eric Allman) |
2fb78b49 | 2642 | .)b |
859d056a EA |
2643 | .i Sendmail |
2644 | properly quotes names that have special characters | |
2645 | if the first form is used. | |
55c435aa | 2646 | .pp |
de7324ac EA |
2647 | Some macros are defined by |
2648 | .i sendmail | |
2649 | for interpolation into argv's for mailers | |
2650 | or for other contexts. | |
2651 | These macros are: | |
2652 | .(b | |
2653 | a The origination date in RFC 822 format | |
2654 | b The current date in RFC 822 format | |
2655 | c The hop count | |
2656 | d The date in UNIX (ctime) format | |
2657 | f The sender (from) address | |
2658 | g The sender address relative to the recipient | |
2659 | h The recipient host | |
2660 | i The queue id | |
a3d50769 | 2661 | k The UUCP node name (from the uname system call) |
de7324ac EA |
2662 | m The domain part of the \fIgethostname\fP return value |
2663 | p Sendmail's pid | |
2664 | r Protocol used to receive the message | |
2665 | s Sender's host name | |
2666 | t A numeric representation of the current time | |
2667 | u The recipient user | |
2668 | v The version number of sendmail | |
2669 | w The hostname of this site | |
2670 | x The full name of the sender | |
2671 | z The home directory of the recipient | |
403c2581 | 2672 | _ The validated sender address |
de7324ac | 2673 | .)b |
55c435aa | 2674 | .pp |
de7324ac | 2675 | There are three types of dates that can be used. |
55c435aa | 2676 | The |
de7324ac EA |
2677 | .b $a |
2678 | and | |
2679 | .b $b | |
2680 | macros are in RFC 822 format; | |
2681 | .b $a | |
2682 | is the time as extracted from the | |
2683 | .q Date: | |
2684 | line of the message | |
2685 | (if there was one), | |
2686 | and | |
2687 | .b $b | |
2688 | is the current date and time | |
2689 | (used for postmarks). | |
2690 | If no | |
2691 | .q Date: | |
2692 | line is found in the incoming message, | |
2693 | .b $a | |
2694 | is set to the current time also. | |
55c435aa | 2695 | The |
de7324ac EA |
2696 | .b $d |
2697 | macro is equivalent to the | |
859d056a | 2698 | .b $b |
de7324ac EA |
2699 | macro in UNIX |
2700 | (ctime) | |
2701 | format. | |
55c435aa | 2702 | .pp |
8b73c824 | 2703 | The |
de7324ac EA |
2704 | .b $f |
2705 | macro is the id of the sender | |
2706 | as originally determined; | |
2707 | when mailing to a specific host | |
2708 | the | |
2709 | .b $g | |
2710 | macro is set to the address of the sender | |
2711 | .ul | |
2712 | relative to the recipient. | |
2713 | For example, | |
2714 | if I send to | |
3dfefb78 | 2715 | .q bollard@matisse.CS.Berkeley.EDU |
de7324ac | 2716 | from the machine |
3dfefb78 | 2717 | .q vangogh.CS.Berkeley.EDU |
de7324ac EA |
2718 | the |
2719 | .b $f | |
2720 | macro will be | |
2721 | .q eric | |
2722 | and the | |
2723 | .b $g | |
2724 | macro will be | |
3dfefb78 | 2725 | .q eric@vangogh.CS.Berkeley.EDU. |
55c435aa | 2726 | .pp |
de7324ac | 2727 | The |
de7324ac EA |
2728 | .b $x |
2729 | macro is set to the full name of the sender. | |
2730 | This can be determined in several ways. | |
2731 | It can be passed as flag to | |
2732 | .i sendmail. | |
2733 | The second choice is the value of the | |
2734 | .q Full-name: | |
2735 | line in the header if it exists, | |
2736 | and the third choice is the comment field | |
2737 | of a | |
2738 | .q From: | |
2739 | line. | |
2740 | If all of these fail, | |
2741 | and if the message is being originated locally, | |
2742 | the full name is looked up in the | |
2743 | .i /etc/passwd | |
2744 | file. | |
55c435aa | 2745 | .pp |
de7324ac EA |
2746 | When sending, |
2747 | the | |
2748 | .b $h , | |
2749 | .b $u , | |
8b73c824 | 2750 | and |
de7324ac EA |
2751 | .b $z |
2752 | macros get set to the host, user, and home directory | |
2753 | (if local) | |
2754 | of the recipient. | |
2755 | The first two are set from the | |
2756 | .b $@ | |
2757 | and | |
2758 | .b $: | |
2759 | part of the rewriting rules, respectively. | |
8b73c824 EA |
2760 | .pp |
2761 | The | |
de7324ac | 2762 | .b $p |
2fb78b49 EA |
2763 | and |
2764 | .b $t | |
2765 | macros are used to create unique strings | |
2766 | (e.g., for the | |
2767 | .q Message-Id: | |
2768 | field). | |
2769 | The | |
2770 | .b $i | |
2771 | macro is set to the queue id on this host; | |
2772 | if put into the timestamp line | |
2773 | it can be extremely useful for tracking messages. | |
2774 | The | |
2fb78b49 EA |
2775 | .b $v |
2776 | macro is set to be the version number of | |
2777 | .i sendmail ; | |
2778 | this is normally put in timestamps | |
2779 | and has been proven extremely useful for debugging. | |
2780 | The | |
b01d261b EA |
2781 | .b $w |
2782 | macro is set to the name of this host | |
2783 | if it can be determined. | |
2784 | The | |
2fb78b49 EA |
2785 | .b $c |
2786 | field is set to the | |
2787 | .q "hop count," | |
2788 | i.e., the number of times this message has been processed. | |
2789 | This can be determined | |
2790 | by the | |
2791 | .b \-h | |
2792 | flag on the command line | |
2793 | or by counting the timestamps in the message. | |
4da134f8 | 2794 | .pp |
2fb78b49 EA |
2795 | The |
2796 | .b $r | |
2797 | and | |
2798 | .b $s | |
2799 | fields are set to the protocol used to communicate with sendmail | |
f13b6b36 | 2800 | and the sending hostname. |
403c2581 EA |
2801 | The |
2802 | .b $_ | |
2803 | is set to a validated sender host name. | |
2804 | If the sender is running an RFC 1413 compliant IDENT server, | |
2805 | it will include the user name on that host. | |
de7324ac | 2806 | .sh 3 "C and F \*- define classes" |
2fb78b49 | 2807 | .pp |
dd905b60 | 2808 | Classes of phrases may be defined |
de7324ac EA |
2809 | to match on the left hand side of rewriting rules, |
2810 | where a | |
dd905b60 EA |
2811 | .q phrase |
2812 | is a sequence of characters that do not contain space characters. | |
de7324ac EA |
2813 | For example |
2814 | a class of all local names for this site | |
2815 | might be created | |
2816 | so that attempts to send to oneself | |
2817 | can be eliminated. | |
2818 | These can either be defined directly in the configuration file | |
2819 | or read in from another file. | |
2820 | Classes may be given names | |
2821 | from the set of upper case letters. | |
2822 | Lower case letters and special characters | |
2823 | are reserved for system use. | |
b66b7f9a | 2824 | .pp |
de7324ac EA |
2825 | The syntax is: |
2826 | .(b F | |
2827 | .b C \c | |
dd905b60 EA |
2828 | .i c\|phrase1 |
2829 | .i phrase2... | |
de7324ac EA |
2830 | .br |
2831 | .b F \c | |
2832 | .i c\|file | |
2833 | .)b | |
2834 | The first form defines the class | |
2835 | .i c | |
2836 | to match any of the named words. | |
2837 | It is permissible to split them among multiple lines; | |
2838 | for example, the two forms: | |
b66b7f9a | 2839 | .(b |
de7324ac | 2840 | CHmonet ucbmonet |
b66b7f9a | 2841 | .)b |
de7324ac EA |
2842 | and |
2843 | .(b | |
2844 | CHmonet | |
2845 | CHucbmonet | |
2846 | .)b | |
2847 | are equivalent. | |
2848 | The second form | |
2849 | reads the elements of the class | |
2850 | .i c | |
2851 | from the named | |
2852 | .i file . | |
4da134f8 | 2853 | .pp |
7901972a EA |
2854 | The |
2855 | .b $~ | |
2856 | (match entries not in class) | |
2857 | only matches a single word; | |
2858 | multi-word entries in the class are ignored in this context. | |
2859 | .pp | |
de7324ac EA |
2860 | The class |
2861 | .b $=w | |
2862 | is set to be the set of all names | |
2863 | this host is known by. | |
2864 | This can be used to match local hostnames. | |
c3e97ee9 EA |
2865 | .pp |
2866 | The class | |
2867 | .b $=k | |
2868 | is set to be the same as | |
2869 | .b $k , | |
2870 | that is, the UUCP node name. | |
de7324ac EA |
2871 | .sh 3 "M \*- define mailer" |
2872 | .pp | |
2873 | Programs and interfaces to mailers | |
2874 | are defined in this line. | |
2875 | The format is: | |
2876 | .(b F | |
2877 | .b M \c | |
2878 | .i name , | |
2879 | {\c | |
2880 | .i field =\c | |
2881 | .i value \|}* | |
2882 | .)b | |
2883 | where | |
2884 | .i name | |
2885 | is the name of the mailer | |
2886 | (used internally only) | |
2887 | and the | |
2888 | .q field=name | |
2889 | pairs define attributes of the mailer. | |
2890 | Fields are: | |
4da134f8 | 2891 | .(b |
de7324ac EA |
2892 | .ta 1i |
2893 | Path The pathname of the mailer | |
2894 | Flags Special flags for this mailer | |
2895 | Sender A rewriting set for sender addresses | |
2896 | Recipient A rewriting set for recipient addresses | |
2897 | Argv An argument vector to pass to this mailer | |
2898 | Eol The end-of-line string for this mailer | |
2899 | Maxsize The maximum message length to this mailer | |
2900 | Linelimit The maximum line length in the message body | |
403c2581 | 2901 | Directory The working directory for the mailer |
4da134f8 | 2902 | .)b |
de7324ac EA |
2903 | Only the first character of the field name is checked. |
2904 | .pp | |
2905 | The following flags may be set in the mailer description. | |
2906 | Any other flags may be used freely | |
2907 | to conditionally assign headers to messages | |
2908 | destined for particular mailers. | |
2909 | .nr ii 4n | |
50d4a65c EA |
2910 | .ip a |
2911 | Run Extended SMTP (ESMTP) protocol (defined in RFCs 1425, 1426, and 1427). | |
6d5ff626 EA |
2912 | .ip c |
2913 | Do not include comments in addresses. | |
2914 | This should only be used if you have to work around | |
2915 | a remote mailer that gets confused by comments. | |
de7324ac EA |
2916 | .ip C |
2917 | If mail is | |
2918 | .i received | |
2919 | from a mailer with this flag set, | |
2920 | any addresses in the header that do not have an at sign | |
2921 | (\c | |
2922 | .q @ ) | |
2923 | after being rewritten by ruleset three | |
2924 | will have the | |
2925 | .q @domain | |
2926 | clause from the sender | |
2927 | tacked on. | |
2928 | This allows mail with headers of the form: | |
4da134f8 | 2929 | .(b |
de7324ac EA |
2930 | From: usera@hosta |
2931 | To: userb@hostb, userc | |
4da134f8 | 2932 | .)b |
de7324ac EA |
2933 | to be rewritten as: |
2934 | .(b | |
2935 | From: usera@hosta | |
2936 | To: userb@hostb, userc@hosta | |
2937 | .)b | |
2938 | automatically. | |
2939 | .ip D | |
2940 | This mailer wants a | |
2941 | .q Date: | |
2942 | header line. | |
2943 | .ip e | |
2944 | This mailer is expensive to connect to, | |
2945 | so try to avoid connecting normally; | |
2946 | any necessary connection will occur during a queue run. | |
2947 | .ip E | |
2948 | Escape lines beginning with | |
f13b6b36 | 2949 | .q From |
de7324ac EA |
2950 | in the message with a `>' sign. |
2951 | .ip f | |
2952 | The mailer wants a | |
2953 | .b \-f | |
2954 | .i from | |
2955 | flag, | |
2956 | but only if this is a network forward operation | |
2957 | (i.e., | |
2958 | the mailer will give an error | |
2959 | if the executing user | |
2960 | does not have special permissions). | |
2961 | .ip F | |
2962 | This mailer wants a | |
2963 | .q From: | |
2964 | header line. | |
2965 | .ip h | |
2966 | Upper case should be preserved in host names | |
2967 | for this mailer. | |
f13b6b36 | 2968 | .ip I |
de7324ac EA |
2969 | This mailer will be speaking SMTP |
2970 | to another | |
f13b6b36 | 2971 | .i sendmail |
de7324ac EA |
2972 | \*- |
2973 | as such it can use special protocol features. | |
2974 | This option is not required | |
2975 | (i.e., | |
2976 | if this option is omitted the transmission will still operate successfully, | |
2977 | although perhaps not as efficiently as possible). | |
2978 | .ip l | |
2979 | This mailer is local | |
2980 | (i.e., | |
2981 | final delivery will be performed). | |
2982 | .ip L | |
2983 | Limit the line lengths as specified in RFC821. | |
2984 | This deprecated option should be replaced by the | |
2985 | .b L= | |
2986 | mail declaration. | |
2987 | For historic reasons, the | |
2988 | .b L | |
2989 | flag also sets the | |
2990 | .b 7 | |
2991 | flag. | |
f13b6b36 EA |
2992 | .ip m |
2993 | This mailer can send to multiple users | |
2994 | on the same host | |
2995 | in one transaction. | |
2996 | When a | |
2997 | .b $u | |
2998 | macro occurs in the | |
2999 | .i argv | |
3000 | part of the mailer definition, | |
3001 | that field will be repeated as necessary | |
3002 | for all qualifying users. | |
3003 | .ip M | |
3004 | This mailer wants a | |
3005 | .q Message-Id: | |
3006 | header line. | |
3007 | .ip n | |
3008 | Do not insert a UNIX-style | |
3009 | .q From | |
3010 | line on the front of the message. | |
3011 | .ip p | |
e920f7ff | 3012 | Use the route-addr style reverse-path in the SMTP |
f13b6b36 EA |
3013 | .q "MAIL FROM:" |
3014 | command | |
3015 | rather than just the return address; | |
e920f7ff EA |
3016 | although this is required in RFC821 section 3.1, |
3017 | many hosts do not process reverse-paths properly. | |
3018 | Reverse-paths are officially discouraged by RFC 1123. | |
f13b6b36 EA |
3019 | .ip P |
3020 | This mailer wants a | |
3021 | .q Return-Path: | |
3022 | line. | |
3023 | .ip r | |
3024 | Same as | |
3025 | .b f , | |
3026 | but sends a | |
2fb78b49 | 3027 | .b \-r |
f13b6b36 EA |
3028 | flag. |
3029 | .ip s | |
3030 | Strip quote characters off of the address | |
3031 | before calling the mailer. | |
3032 | .ip S | |
3033 | Don't reset the userid | |
3034 | before calling the mailer. | |
3035 | This would be used in a secure environment | |
3036 | where | |
3037 | .i sendmail | |
3038 | ran as root. | |
3039 | This could be used to avoid forged addresses. | |
3040 | This flag is suppressed if given from an | |
3041 | .q unsafe | |
3042 | environment | |
3043 | (e.g, a user's mail.cf file). | |
3044 | .ip u | |
3045 | Upper case should be preserved in user names | |
3046 | for this mailer. | |
3047 | .ip U | |
3048 | This mailer wants Unix-style | |
3049 | .q From | |
3050 | lines with the ugly UUCP-style | |
3051 | .q "remote from <host>" | |
3052 | on the end. | |
3053 | .ip x | |
3054 | This mailer wants a | |
3055 | .q Full-Name: | |
3056 | header line. | |
3057 | .ip X | |
3058 | This mailer want to use the hidden dot algorithm | |
3059 | as specified in RFC821; | |
3060 | basically, | |
3061 | any line beginning with a dot | |
3062 | will have an extra dot prepended | |
3063 | (to be stripped at the other end). | |
3064 | This insures that lines in the message containing a dot | |
3065 | will not terminate the message prematurely. | |
3066 | .ip 7 | |
3067 | Strip all output to seven bits. | |
3068 | This is the default if the | |
3069 | .b L | |
3070 | flag is set. | |
3071 | Note that setting this is not | |
3072 | sufficient to get full eight bit data passed through | |
3073 | .i sendmail ; | |
3074 | the | |
3075 | .b 8 | |
3076 | option must also be set. | |
de7324ac EA |
3077 | .pp |
3078 | The mailer with the special name | |
3079 | .q error | |
3080 | can be used to generate a user error. | |
3081 | The (optional) host field is an exit status to be returned, | |
3082 | and the user field is a message to be printed. | |
3083 | The exit status may be numeric or one of the values | |
3084 | USAGE, NOUSER, NOHOST, UNAVAILABLE, SOFTWARE, TEMPFAIL, PROTOCOL, or CONFIG | |
3085 | to return the corresponding EX_ exit code. | |
3086 | For example, the entry: | |
3087 | .(b | |
3088 | $#error $@ NOHOST $: Host unknown in this domain | |
3089 | .)b | |
3090 | on the RHS of a rule | |
3091 | will cause the specified error to be generated | |
3092 | and the | |
3093 | .q "Host unknown" | |
3094 | exit status to be returned | |
3095 | if the LHS matches. | |
3096 | This mailer is only functional in ruleset zero. | |
fa2fc92a EA |
3097 | .pp |
3098 | The mailer named | |
3099 | .q local | |
3100 | .i must | |
3101 | be defined in every configuration file. | |
3102 | This is used to deliver local mail, | |
3103 | and is treated specially in several ways. | |
3104 | Additionally, three other mailers named | |
3105 | .q prog , | |
3106 | .q *file* , | |
3107 | and | |
3108 | .q *include* | |
3109 | may be defined to tune the delivery of messages to programs, | |
3110 | files, | |
3111 | and :include: lists respectively. | |
3112 | They default to: | |
3113 | .(b | |
3114 | Mprog, P=/bin/sh, F=lsD, A=sh \-c $u | |
3115 | M*file*, F=lsDEu, A=NULL | |
3116 | M*include*, F=su, A=NULL | |
3117 | .)b | |
6ebbc09a EA |
3118 | .pp |
3119 | The Sender and Recipient rewriting sets | |
3120 | may either be a simple integer | |
3121 | or may be two integers separated by a slash; | |
3122 | if so, the first rewriting set is applied to envelope | |
3123 | addresses | |
3124 | and the second is applied to headers. | |
403c2581 EA |
3125 | .pp |
3126 | The Directory | |
3127 | is actually a colon-separated path of directories to try. | |
3128 | For example, the definition | |
3129 | .q D=$z:/ | |
3130 | first tries to execute in the recipient's home directory; | |
3131 | if that is not available, | |
3132 | it tries to execute in the root of the filesystem. | |
3133 | This is intended to be used only on the | |
3134 | .q prog | |
3135 | mailer, | |
3136 | since some shells (such as | |
3137 | .i csh ) | |
3138 | refuse to execute if they cannot read the home directory. | |
3139 | Since the queue directory is not normally readable by normal users | |
3140 | .i csh | |
3141 | scripts as recipients can fail. | |
de7324ac EA |
3142 | .sh 3 "H \*- define header" |
3143 | .pp | |
3144 | The format of the header lines that sendmail inserts into the message | |
3145 | are defined by the | |
3146 | .b H | |
3147 | line. | |
3148 | The syntax of this line is: | |
3149 | .(b F | |
3150 | .b H [\c | |
3151 | .b ? \c | |
3152 | .i mflags \c | |
3153 | .b ? ]\c | |
3154 | .i hname \c | |
3155 | .b : | |
3156 | .i htemplate | |
3157 | .)b | |
3158 | Continuation lines in this spec | |
3159 | are reflected directly into the outgoing message. | |
3160 | The | |
3161 | .i htemplate | |
3162 | is macro expanded before insertion into the message. | |
3163 | If the | |
3164 | .i mflags | |
3165 | (surrounded by question marks) | |
3166 | are specified, | |
3167 | at least one of the specified flags | |
3168 | must be stated in the mailer definition | |
3169 | for this header to be automatically output. | |
3170 | If one of these headers is in the input | |
3171 | it is reflected to the output | |
3172 | regardless of these flags. | |
3173 | .pp | |
3174 | Some headers have special semantics | |
3175 | that will be described below. | |
3176 | .sh 3 "O \*- set option" | |
3177 | .pp | |
3178 | There are a number of | |
3179 | .q random | |
3180 | options that | |
3181 | can be set from a configuration file. | |
3182 | Options are represented by single characters. | |
3183 | The syntax of this line is: | |
3184 | .(b F | |
3185 | .b O \c | |
3186 | .i o\|value | |
3187 | .)b | |
3188 | This sets option | |
3189 | .i o | |
3190 | to be | |
3191 | .i value . | |
3192 | Depending on the option, | |
3193 | .i value | |
3194 | may be a string, an integer, | |
3195 | a boolean | |
3196 | (with legal values | |
3197 | .q t , | |
3198 | .q T , | |
3199 | .q f , | |
3200 | or | |
3201 | .q F ; | |
3202 | the default is TRUE), | |
3203 | or | |
3204 | a time interval. | |
3205 | .pp | |
3206 | The options supported are: | |
3207 | .nr ii 1i | |
3208 | .ip a\fIN\fP | |
3209 | If set, | |
3210 | wait up to | |
3211 | .i N | |
3212 | minutes for an | |
3213 | .q @:@ | |
3214 | entry to exist in the alias database | |
3215 | before starting up. | |
3216 | If it does not appear in | |
3217 | .i N | |
3218 | minutes, | |
3219 | rebuild the database | |
3220 | (if the | |
3221 | .b D | |
3222 | option is also set) | |
3223 | or issue a warning. | |
3224 | .ip A\fIfile\fP | |
3225 | Use the named | |
3226 | .i file | |
3227 | as the alias file. | |
3228 | If no file is specified, | |
3229 | use | |
3230 | .i aliases | |
3231 | in the current directory. | |
50d4a65c | 3232 | .ip b\fIN\fP/\fIM\fP |
59baf33c EA |
3233 | Insist on at least |
3234 | .i N | |
3235 | blocks free on the filesystem that holds the queue files | |
3236 | before accepting email via SMTP. | |
3237 | If there is insufficient space | |
3238 | .i sendmail | |
3239 | gives a 452 response | |
3240 | to the MAIL command. | |
859d056a | 3241 | This invites the sender to try again later. |
50d4a65c EA |
3242 | The optional |
3243 | .i M | |
3244 | is a maximum message size advertised in the ESMTP EHLO response. | |
3245 | It is currently otherwise unused. | |
de7324ac EA |
3246 | .ip B\fIc\fP |
3247 | Set the blank substitution character to | |
3248 | .i c . | |
3249 | Unquoted spaces in addresses are replaced by this character. | |
55aab950 | 3250 | Defaults to space (i.e., no change is made). |
de7324ac EA |
3251 | .ip c |
3252 | If an outgoing mailer is marked as being expensive, | |
3253 | don't connect immediately. | |
3254 | This requires that queueing be compiled in, | |
3255 | since it will depend on a queue run process to | |
3256 | actually send the mail. | |
3257 | .ip C\fIN\fP | |
3258 | Checkpoints the queue every | |
3259 | .i N | |
3260 | (default 10) | |
3261 | addresses sent. | |
3262 | If your system crashes during delivery to a large list, | |
3263 | this prevents retransmission to any but the last | |
3264 | .I N | |
3265 | recipients. | |
3266 | .ip d\fIx\fP | |
3267 | Deliver in mode | |
3268 | .i x . | |
3269 | Legal modes are: | |
3270 | .(b | |
3271 | .ta 4n | |
3272 | i Deliver interactively (synchronously) | |
3273 | b Deliver in background (asynchronously) | |
3274 | q Just queue the message (deliver during queue run) | |
3275 | .)b | |
56ba89fb EA |
3276 | Defaults to ``b'' if no option is specified, |
3277 | ``i'' if it is specified but given no argument | |
3278 | (i.e., ``Od'' is equivalent to ``Odi''). | |
de7324ac EA |
3279 | .ip D |
3280 | If set, | |
3281 | rebuild the alias database if necessary and possible. | |
3282 | If this option is not set, | |
3283 | .i sendmail | |
3284 | will never rebuild the alias database | |
3285 | unless explicitly requested | |
3286 | using | |
3287 | .b \-bi . | |
3288 | .ip e\fIx\fP | |
3289 | Dispose of errors using mode | |
3290 | .i x . | |
3291 | The values for | |
3292 | .i x | |
3293 | are: | |
3294 | .(b | |
3295 | p Print error messages (default) | |
3296 | q No messages, just give exit status | |
3297 | m Mail back errors | |
3298 | w Write back errors (mail if user not logged in) | |
3299 | e Mail back errors and give zero exit stat always | |
3300 | .)b | |
3301 | .ip E\fIfile/message\fP | |
3302 | Prepend error messages with the indicated message. | |
3303 | If it begins with a slash, | |
3304 | it is assumed to be the pathname of a file | |
3305 | containing a message (this is the recommended setting). | |
3306 | Otherwise, it is a literal message. | |
3307 | The error file might contain the name, email address, and/or phone number | |
3308 | of a local postmaster who could provide assistance | |
3309 | in to end users. | |
3310 | If the option is missing or null, | |
3311 | or if it names a file which does not exist or which is not readable, | |
3312 | no message is printed. | |
3313 | .ip f | |
3314 | Save | |
3315 | Unix-style | |
3316 | .q From | |
3317 | lines at the front of headers. | |
3318 | Normally they are assumed redundant | |
3319 | and discarded. | |
3320 | .ip F\fImode\fP | |
3321 | The file mode for queue files. | |
3322 | .ip g\fIn\fP | |
3323 | Set the default group id | |
3324 | for mailers to run in | |
3325 | to | |
3326 | .i n . | |
55aab950 | 3327 | Defaults to 1. |
de7324ac EA |
3328 | .ip G |
3329 | Allow fuzzy matching on the GECOS field. | |
3330 | If this flag is set, | |
3331 | and the usual user name lookups fail | |
3332 | (that is, there is no alias with this name and a | |
3333 | .i getpwnam | |
3334 | fails), | |
3335 | sequentially search the password file | |
3336 | for a matching entry in the GECOS field. | |
3337 | This also requires that MATCHGECOS | |
3338 | be turned on during compilation. | |
3339 | This option is not recommended. | |
3340 | .ip h\fIN\fP | |
3341 | The maximum hop count. | |
3342 | Messages that have been processed more than | |
3343 | .i N | |
3344 | times are assumed to be in a loop and are rejected. | |
55aab950 | 3345 | Defaults to 25. |
de7324ac EA |
3346 | .ip H\fIfile\fP |
3347 | Specify the help file | |
3348 | for SMTP. | |
3349 | .ip i | |
3350 | Ignore dots in incoming messages. | |
859d056a EA |
3351 | This is always disabled (that is, dots are always accepted) |
3352 | when reading SMTP mail. | |
de7324ac EA |
3353 | .ip I |
3354 | Insist that the BIND name server be running | |
3355 | to resolve host names. | |
3356 | If this is not set and the name server is not running, | |
3357 | the | |
3358 | .i /etc/hosts | |
3359 | file will be considered complete. | |
3360 | In general, you do want to set this option | |
3361 | if your | |
3362 | .i /etc/hosts | |
3363 | file does not include all hosts known to you | |
3364 | or if you are using the MX (mail forwarding) feature of the BIND name server. | |
3365 | The name server will still be consulted | |
3366 | even if this option is not set, but | |
3367 | .i sendmail | |
3368 | will feel free to resort to reading | |
3369 | .i /etc/hosts | |
3370 | if the name server is not available. | |
3371 | Thus, you should | |
3372 | .i never | |
3373 | set this option if you do not run the name server. | |
3374 | .ip J\fIpath\fP | |
3375 | Set the path for searching for users' .forward files. | |
3376 | The default is | |
3377 | .q $z/.forward . | |
3378 | Some sites that use the automounter may prefer to change this to | |
3379 | .q /var/forward/$u | |
3380 | to search a file with the same name as the user in a system directory. | |
3381 | It can also be set to a sequence of paths separated by colons; | |
3382 | .i sendmail | |
3383 | stops at the first file it can successfully and safely open. | |
3384 | For example, | |
3385 | .q /var/forward/$u:$z/.forward | |
3386 | will search first in /var/forward/\c | |
3387 | .i username | |
3388 | and then in | |
3389 | .i ~username /.forward | |
3390 | (but only if the first file does not exist). | |
3391 | .ip k\fIN\fP | |
3392 | The maximum number of open connections that will be cached at a time. | |
3393 | The default is one. | |
3394 | This delays closing the the current connection until | |
3395 | either this invocation of sendmail needs to connect to another host | |
3396 | or it terminates. | |
3397 | Setting it to zero defaults to the old behavior, | |
3398 | that is, connections are closed immediately. | |
3399 | .ip K\fItimeout\fP | |
3400 | The maximum amount of time a cached connection will be permitted to idle | |
3401 | without activity. | |
3402 | If this time is exceeded, | |
3403 | the connection is immediately closed. | |
3404 | This value should be small (on the order of ten minutes). | |
3405 | Before | |
3406 | .b sendmail | |
3407 | uses a cached connection, | |
3408 | it always sends a NOOP (no operation) command | |
3409 | to check the connection; | |
3410 | if this fails, it reopens the connection. | |
3411 | This keeps your end from failing if the other end times out. | |
3412 | The point of this option is to be a good network neighbor | |
3413 | and avoid using up excessive resources | |
3414 | on the other end. | |
3415 | The default is five minutes. | |
3416 | .ip L\fIn\fP | |
3417 | Set the default log level to | |
3418 | .i n . | |
55aab950 | 3419 | Defaults to 9. |
de7324ac EA |
3420 | .ip m |
3421 | Send to me too, | |
3422 | even if I am in an alias expansion. | |
3423 | .ip M\fIx\|value\fP | |
3424 | Set the macro | |
3425 | .i x | |
3426 | to | |
3427 | .i value . | |
3428 | This is intended only for use from the command line. | |
56ba89fb EA |
3429 | .ip n |
3430 | Validate the RHS of aliases when rebuilding the alias database. | |
de7324ac EA |
3431 | .ip o |
3432 | Assume that the headers may be in old format, | |
3433 | i.e., | |
3434 | spaces delimit names. | |
3435 | This actually turns on | |
3436 | an adaptive algorithm: | |
3437 | if any recipient address contains a comma, parenthesis, | |
3438 | or angle bracket, | |
3439 | it will be assumed that commas already exist. | |
3440 | If this flag is not on, | |
3441 | only commas delimit names. | |
3442 | Headers are always output with commas between the names. | |
a99d3cb3 EA |
3443 | .ip O\fIoptions\fP |
3444 | Set server SMTP options. | |
3445 | The options are | |
3446 | .i key=value | |
3447 | pairs. | |
3448 | Known keys are: | |
3449 | .(b | |
3450 | .ta 1i | |
3451 | Port Name/number of listening port (defaults to "smtp") | |
3452 | Addr Address mask (defaults INADDR_ANY) | |
3453 | Family Address family (defaults to INET) | |
3454 | .)b | |
3455 | The | |
3456 | .i Addr ess | |
3457 | mask may be a numeric address in dot notation | |
3458 | or a network name. | |
59baf33c EA |
3459 | .ip p\fI\|opt,opt,...\fP |
3460 | Set the privacy | |
3461 | .i opt ions. | |
3462 | ``Privacy'' is really a misnomer; | |
859d056a | 3463 | many of these are just a way of insisting on stricter adherence |
59baf33c EA |
3464 | to the SMTP protocol. |
3465 | The | |
3466 | .i opt ions | |
3467 | can be selected from: | |
3468 | .(b | |
859d056a | 3469 | .ta \w'needvrfyhelo'u+3n |
59baf33c | 3470 | public Allow open access |
475d7a3d EA |
3471 | needmailhelo Insist on HELO or EHLO command before MAIL |
3472 | needexpnhelo Insist on HELO or EHLO command before EXPN | |
59baf33c | 3473 | noexpn Disallow EXPN entirely |
475d7a3d | 3474 | needvrfyhelo Insist on HELO or EHLO command before VRFY |
59baf33c | 3475 | novrfy Disallow VRFY entirely |
890cda2d EA |
3476 | restrictmailq Restrict mailq command |
3477 | goaway Disallow essentially all SMTP status queries | |
59baf33c | 3478 | .)b |
890cda2d EA |
3479 | The |
3480 | .q goaway | |
3481 | pseudo-flag sets all flags except | |
3482 | .q restrictmailq . | |
3483 | If mailq is restricted, | |
3484 | only people in the same group as the queue directory | |
3485 | can print the queue. | |
de7324ac EA |
3486 | .ip P\fIpostmaster\fP |
3487 | If set, | |
3488 | copies of error messages will be sent to the named | |
3489 | .i postmaster . | |
475d7a3d | 3490 | Only the header of the failed message is sent. |
de7324ac EA |
3491 | Since most errors are user problems, |
3492 | this is probably not a good idea on large sites, | |
3493 | and arguably contains all sorts of privacy violations, | |
3494 | but it seems to be popular with certain operating systems vendors. | |
3495 | .ip q\fIfactor\fP | |
3496 | Use | |
3497 | .i factor | |
3498 | as the multiplier in the map function | |
3499 | to decide when to just queue up jobs rather than run them. | |
3500 | This value is divided by the difference between the current load average | |
3501 | and the load average limit | |
3502 | (\c | |
3503 | .b x | |
3504 | flag) | |
3505 | to determine the maximum message priority | |
3506 | that will be sent. | |
55aab950 | 3507 | Defaults to 600000. |
de7324ac EA |
3508 | .ip Q\fIdir\fP |
3509 | Use the named | |
3510 | .i dir | |
3511 | as the queue directory. | |
859d056a | 3512 | .ip r\|\fItimeouts\fP |
de7324ac EA |
3513 | Timeout reads after |
3514 | .i time | |
3515 | interval. | |
e920f7ff EA |
3516 | The |
3517 | .i timeouts | |
3518 | argument is a list of | |
3519 | .i keyword=value | |
3520 | pairs. | |
3521 | The recognized timeouts and their default values, and their | |
3522 | minimum values specified in RFC 1123 section 5.3.2 are: | |
3523 | .(b | |
859d056a | 3524 | .ta \w'datafinal'u+3n |
e920f7ff | 3525 | initial wait for initial greeting message [5m, 5m] |
475d7a3d | 3526 | helo reply to HELO or EHLO command [5m, none] |
e920f7ff EA |
3527 | mail reply to MAIL command [10m, 5m] |
3528 | rcpt reply to RCPT command [1h, 5m] | |
3529 | datainit reply to DATA command [5m, 2m] | |
3530 | datablock data block read [1h, 3m] | |
3531 | datafinal reply to final ``.'' in data [1h, 10m] | |
3532 | rset reply to RSET command [5m, none] | |
3533 | quit reply to QUIT command [2m, none] | |
859d056a | 3534 | misc reply to NOOP and VERB commands [2m, none] |
e920f7ff EA |
3535 | command command read [1h, 5m] |
3536 | .)b | |
3537 | All but | |
3538 | .q command | |
3539 | apply to client SMTP. | |
3540 | For back compatibility, | |
3541 | a timeout with no ``keyword='' part | |
3542 | will set all of the longer values. | |
de7324ac EA |
3543 | .ip s |
3544 | Be super-safe when running things, | |
3545 | i.e., | |
3546 | always instantiate the queue file, | |
3547 | even if you are going to attempt immediate delivery. | |
3548 | .i Sendmail | |
3549 | always instantiates the queue file | |
3550 | before returning control the the client | |
3551 | under any circumstances. | |
3552 | .ip S\fIfile\fP | |
3553 | Log statistics in the named | |
3554 | .i file . | |
3555 | .ip t\fIS,D\fP | |
3556 | Set the local time zone name to | |
3557 | .i S | |
3558 | for standard time and | |
3559 | .i D | |
3560 | for daylight time; | |
3561 | this is only used under version six. | |
31e506e2 | 3562 | .ip T\fIrtime/wtime\fP |
de7324ac | 3563 | Set the queue timeout to |
31e506e2 | 3564 | .i rtime . |
de7324ac EA |
3565 | After this interval, |
3566 | messages that have not been successfully sent | |
3567 | will be returned to the sender. | |
31e506e2 EA |
3568 | Defaults to five days. |
3569 | The optional | |
3570 | .i wtime | |
3571 | is the time after which a warning message is sent. | |
3572 | If it is missing or zero | |
3573 | then no warning messages are sent. | |
de7324ac EA |
3574 | .ip u\fIn\fP |
3575 | Set the default userid for mailers to | |
3576 | .i n . | |
3577 | Mailers without the | |
3578 | .i S | |
3579 | flag in the mailer definition | |
3580 | will run as this user. | |
55aab950 | 3581 | Defaults to 1. |
de7324ac EA |
3582 | .ip U\fIudbspec\fP |
3583 | The user database specification. | |
3584 | .ip v | |
3585 | Run in verbose mode. | |
56ba89fb EA |
3586 | If this is set, |
3587 | .i sendmail | |
3588 | adjusts options | |
3589 | .b c | |
3590 | (don't connect to expensive mailers) | |
3591 | and | |
3592 | .b d | |
3593 | (delivery mode) | |
3594 | so that all mail is delivered completely | |
3595 | in a single job | |
3596 | so that you can see the entire delivery process. | |
3597 | Option | |
3598 | .b v | |
3599 | should | |
3600 | .i never | |
3601 | be set in the configuration file; | |
3602 | it is intended for command line use only. | |
a99d3cb3 EA |
3603 | .ip V\fIfallbackhost\fP |
3604 | If specified, the | |
3605 | .i fallbackhost | |
3606 | acts like a very low priority MX | |
3607 | on every host. | |
3608 | This is intended to be used by sites with poor network connectivity. | |
de7324ac EA |
3609 | .ip x\fILA\fP |
3610 | When the system load average exceeds | |
3611 | .i LA , | |
3612 | just queue messages | |
3613 | (i.e., don't try to send them). | |
55aab950 | 3614 | Defaults to 8. |
de7324ac EA |
3615 | .ip X\fILA\fP |
3616 | When the system load average exceeds | |
3617 | .i LA , | |
3618 | refuse incoming SMTP connections. | |
55aab950 | 3619 | Defaults to 12. |
de7324ac EA |
3620 | .ip y\fIfact\fP |
3621 | The indicated | |
3622 | .i fact or | |
3623 | is added to the priority (thus | |
3624 | .i lowering | |
3625 | the priority of the job) | |
3626 | for each recipient, | |
3627 | i.e., this value penalizes jobs with large numbers of recipients. | |
55aab950 | 3628 | Defaults to 30000. |
de7324ac EA |
3629 | .ip Y |
3630 | If set, | |
3631 | deliver each job that is run from the queue in a separate process. | |
3632 | Use this option if you are short of memory, | |
3633 | since the default tends to consume considerable amounts of memory | |
3634 | while the queue is being processed. | |
3635 | .ip z\fIfact\fP | |
3636 | The indicated | |
3637 | .i fact or | |
3638 | is multiplied by the message class | |
3639 | (determined by the Precedence: field in the user header | |
3640 | and the | |
3641 | .b P | |
3642 | lines in the configuration file) | |
3643 | and subtracted from the priority. | |
3644 | Thus, messages with a higher Priority: will be favored. | |
55aab950 | 3645 | Defaults to 1800. |
de7324ac EA |
3646 | .ip Z\fIfact\fP |
3647 | The | |
3648 | .i fact or | |
3649 | is added to the priority | |
3650 | every time a job is processed. | |
3651 | Thus, | |
3652 | each time a job is processed, | |
3653 | its priority will be decreased by the indicated value. | |
3654 | In most environments this should be positive, | |
3655 | since hosts that are down are all too often down for a long time. | |
55aab950 | 3656 | Defaults to 90000. |
de7324ac EA |
3657 | .ip 8 |
3658 | Preserve eight bits of data in the body on input. | |
3659 | Normally the input is stripped to seven bits as per RFC822. | |
3660 | See also the | |
3661 | .b L | |
3662 | mailer flag. | |
3663 | .lp | |
3664 | All options can be specified on the command line using the | |
3665 | \-o flag, | |
3666 | but most will cause | |
3667 | .i sendmail | |
3668 | to relinquish its setuid permissions. | |
3669 | The options that will not cause this are | |
859d056a | 3670 | b, d, e, E, i, L, m, o, p, r, s, v, C, and 8. |
de7324ac EA |
3671 | Also, M (define macro) when defining the r or s macros |
3672 | is also considered | |
3673 | .q safe . | |
de7324ac EA |
3674 | .sh 3 "P \*- precedence definitions" |
3675 | .pp | |
3676 | Values for the | |
3677 | .q "Precedence:" | |
3678 | field may be defined using the | |
3679 | .b P | |
3680 | control line. | |
3681 | The syntax of this field is: | |
3682 | .(b | |
3683 | \fBP\fP\fIname\fP\fB=\fP\fInum\fP | |
3684 | .)b | |
3685 | When the | |
3686 | .i name | |
3687 | is found in a | |
3688 | .q Precedence: | |
3689 | field, | |
3690 | the message class is set to | |
3691 | .i num . | |
3692 | Higher numbers mean higher precedence. | |
3693 | Numbers less than zero | |
3694 | have the special property | |
55aab950 EA |
3695 | that if an error occurs during processing |
3696 | the body of the message will not be returned; | |
3697 | this is expected to be used for | |
3698 | .q "bulk" | |
3699 | mail such as through mailing lists. | |
de7324ac EA |
3700 | The default precedence is zero. |
3701 | For example, | |
3702 | our list of precedences is: | |
3703 | .(b | |
3704 | Pfirst-class=0 | |
3705 | Pspecial-delivery=100 | |
859d056a | 3706 | Plist=\-30 |
55aab950 | 3707 | Pbulk=\-60 |
de7324ac EA |
3708 | Pjunk=\-100 |
3709 | .)b | |
859d056a EA |
3710 | People writing mailing list exploders |
3711 | are encouraged to use | |
3712 | .q "Precedence: list" . | |
3713 | Older versions of | |
3714 | .i sendmail | |
3715 | (which discarded all error returns for negative precedences) | |
3716 | didn't recognize this name, giving it a default precedence of zero. | |
3717 | This allows list maintainers to see error returns | |
3718 | on both old and new versions of | |
3719 | .i sendmail . | |
de7324ac EA |
3720 | .sh 3 "V \*- configuration version level" |
3721 | .pp | |
3722 | To provide compatibility with old configuration files, | |
3723 | the | |
3724 | .b V | |
3725 | line has been added to define some very basic semantics | |
3726 | of the configuration file. | |
3727 | These are not intended to be long term supports; | |
3728 | rather, they describe compatibility features | |
3729 | which will probably be removed in future releases. | |
3730 | .pp | |
3731 | .q Old | |
e920f7ff EA |
3732 | configuration files are defined as version level one. |
3733 | Version level two files make the following changes: | |
de7324ac EA |
3734 | .np |
3735 | Host name canonification ($[ ... $]) | |
3736 | appends a dot if the name is recognized; | |
3737 | this gives the config file a way of finding out if anything matched. | |
3738 | (Actually, this just initializes the | |
3739 | .q host | |
3740 | map with the | |
3741 | .q \-a. | |
3742 | flag \*- you can reset it to anything you prefer | |
3743 | by declaring the map explicitly.) | |
3744 | .np | |
3745 | Default host name extension is consistent throughout processing; | |
e920f7ff | 3746 | version level one configurations turned off domain extension |
de7324ac EA |
3747 | (that is, adding the local domain name) |
3748 | during certain points in processing. | |
e920f7ff | 3749 | Version level two configurations are expected to include a trailing dot |
de7324ac EA |
3750 | to indicate that the name is already canonical. |
3751 | .np | |
3752 | Local names that are not aliases | |
3753 | are passed through a new distinguished ruleset five; | |
3754 | this can be used to append a local relay. | |
3755 | This behaviour can be prevented by resolving the local name | |
3756 | with an initial `@'. | |
3757 | That is, something that resolves to a local mailer and a user name of | |
3758 | .q vikki | |
3759 | will be passed through ruleset five, | |
3760 | but a user name of | |
3761 | .q @vikki | |
3762 | will have the `@' stripped, | |
3763 | will not be passed through ruleset five, | |
3764 | but will otherwise be treated the same as the prior example. | |
3765 | The expectation is that this might be used to implement a policy | |
3766 | where mail sent to | |
3767 | .q vikki | |
3768 | was handled by a central hub, | |
3769 | but mail sent to | |
3770 | .q vikki@localhost | |
3771 | was delivered directly. | |
3772 | .pp | |
e920f7ff | 3773 | Version level three files |
de7324ac EA |
3774 | allow # initiated comments on all lines. |
3775 | Exceptions are backslash escaped # marks | |
3776 | and the $# syntax. | |
3777 | .sh 3 "K \*- key file declaration" | |
3778 | .pp | |
3779 | Special maps can be defined using the line: | |
3780 | .(b | |
3781 | Kmapname mapclass arguments | |
3782 | .)b | |
3783 | The | |
3784 | .i mapname | |
3785 | is the handle by which this map is referenced in the rewriting rules. | |
3786 | The | |
3787 | .i mapclass | |
3788 | is the name of a type of map; | |
3789 | these are compiled in to sendmail. | |
3790 | The | |
3791 | .i arguments | |
3792 | are interpreted depending on the class; | |
3793 | typically, | |
3794 | there would be a single argument naming the file containing the map. | |
3795 | .pp | |
3796 | Maps are referenced using the syntax: | |
3797 | .(b | |
3798 | $( \fImap\fP \fIkey\fP $@ \fIarguments\fP $: \fIdefault\fP $) | |
3799 | .)b | |
3800 | where either or both of the | |
3801 | .i arguments | |
3802 | or | |
3803 | .i default | |
3804 | portion may be omitted. | |
3805 | The | |
3806 | .i arguments | |
3807 | may appear more than once. | |
3808 | The indicated | |
3809 | .i key | |
3810 | and | |
3811 | .i arguments | |
3812 | are passed to the appropriate mapping function. | |
3813 | If it returns a value, it replaces the input. | |
3814 | If it does not return a value and the | |
3815 | .i default | |
3816 | is specified, the | |
3817 | .i default | |
3818 | replaces the input. | |
3819 | Otherwise, the input is unchanged. | |
3820 | .pp | |
3821 | During replacement of either a map value or default | |
3822 | the string | |
3823 | .q %\fIn\fP | |
3824 | (where | |
3825 | .i n | |
3826 | is a digit) | |
3827 | is replaced by the corresponding | |
3828 | .i argument . | |
3829 | Argument zero | |
3dfefb78 | 3830 | is always the database key. |
de7324ac EA |
3831 | For example, the rule |
3832 | .(b | |
3833 | .ta 1.5i | |
3834 | R$- ! $+ $: $(uucp $1 $@ $2 $: %1 @ %0 . UUCP $) | |
3835 | .)b | |
3836 | Looks up the UUCP name in a (user defined) UUCP map; | |
3837 | if not found it turns it into | |
3838 | .q \&.UUCP | |
3839 | form. | |
3840 | The database might contain records like: | |
3841 | .(b | |
3842 | decvax %1@%0.DEC.COM | |
3843 | research %1@%0.ATT.COM | |
3844 | .)b | |
3845 | .pp | |
3846 | The built in map with both name and class | |
3847 | .q host | |
3848 | is the host name canonicalization lookup. | |
3849 | Thus, | |
3850 | the syntax: | |
3851 | .(b | |
3852 | $(host \fIhostname\fP$) | |
3853 | .)b | |
3854 | is equivalent to: | |
3855 | .(b | |
3856 | $[\fIhostname\fP$] | |
3857 | .)b | |
3858 | .pp | |
3859 | There are four predefined database lookup classes: | |
3860 | .q dbm , | |
3861 | .q btree , | |
3862 | .q hash , | |
3863 | and | |
3864 | .q nis . | |
3865 | The first requires that sendmail be compiled with the | |
3866 | .b ndbm | |
3867 | library; | |
3868 | the second two require the | |
3869 | .b db | |
3870 | library, | |
3871 | and the third requires that sendmail be compiled with NIS support. | |
3872 | All four accept as arguments the some optional flags | |
3873 | and a filename (or a mapname for NIS). | |
3874 | Known flags are: | |
3875 | .ip "\-o" | |
3876 | Indicates that this map is optional \*- that is, | |
3877 | if it cannot be opened, | |
3878 | no error is produced, | |
3879 | and sendmail will behave as if the map existed but was empty. | |
3880 | .ip "\-N" | |
3881 | Normally sendmail does not include the trailing null byte | |
3882 | on a string as part of the key. | |
3883 | If this flag is indicated, | |
3884 | it will be included. | |
3885 | This is for compatibility with some methods of building the maps. | |
3886 | .ip "\-a\fIx\fP" | |
3887 | Append the character | |
3888 | .i x | |
3889 | on successful matches. | |
3890 | For example, the default | |
3891 | .i host | |
3892 | map appends a dot on successful matches. | |
3893 | .ip "\-d\fIdomain\fP" | |
3894 | Use the indicated | |
3895 | .i domain | |
3896 | instead of the default domain. | |
3897 | Used only for NIS maps. | |
3898 | .ip "\-f" | |
3899 | Fold upper to lower case before looking up the key. | |
3900 | .ip "\-m" | |
3901 | Match only (without replacing the value). | |
3902 | If you only care about the existence of a key and not the value | |
3903 | (as you might when searching the NIS map | |
3904 | .q hosts.byname | |
3905 | for example), | |
3906 | this flag prevents the map from substituting the value. | |
3907 | However, | |
3908 | The \-a argument is still appended on a match, | |
3909 | and the default is still taken if the match fails. | |
3910 | .pp | |
3911 | The | |
3912 | .i dbm | |
3913 | map appends the strings | |
3914 | .q \&.pag | |
3915 | and | |
3916 | .q \&.dir | |
3917 | to the given filename; | |
3918 | the two | |
3919 | .i db -based | |
3920 | maps do not. | |
3921 | .pp | |
3922 | The program | |
3923 | .i makemap (8) | |
3924 | can be used to build any of the three database-oriented maps. | |
3925 | It takes the following flags: | |
3926 | .ip \-f | |
f86ff76b | 3927 | Do not fold upper to lower case in the map. |
de7324ac EA |
3928 | .ip \-N |
3929 | Include null bytes in keys. | |
3930 | .ip \-o | |
3931 | Append to an existing (old) file. | |
3932 | .ip \-r | |
3933 | Allow replacement of existing keys; | |
3934 | normally, re-inserting an existing key is an error. | |
3935 | .ip \-v | |
3936 | Print what is happening. | |
3937 | .pp | |
6a197ea4 EA |
3938 | There are also two builtin maps that are, |
3939 | strictly speaking, | |
3940 | not database lookups. | |
3941 | .pp | |
3942 | The | |
3943 | .q host | |
3944 | map does host domain canonification; | |
3945 | given a host name it calls the name server | |
3946 | to find the canonical name for that host. | |
3947 | .pp | |
3948 | The | |
3949 | .q dequote | |
3950 | map strips double quotes (") from a name. | |
3951 | It does not strip backslashes. | |
3952 | It will not strip quotes if the resulting string | |
3953 | would contain unscannable syntax | |
3954 | (that is, basic errors like unbalanced angle brackets; | |
3955 | more sophisticated errors such as unknown hosts are not checked). | |
3956 | The intent is for use when trying to accept mail from systems such as | |
3957 | DECnet | |
3958 | that routinely quote odd syntax such as | |
3959 | .(b | |
3960 | "49ers::ubell" | |
3961 | .)b | |
3962 | A typical usage is probably something like: | |
3963 | .(b | |
3964 | Kdequote dequote | |
3965 | ||
3966 | \&... | |
3967 | ||
3968 | R$\- $: $(dequote $1 $) | |
3969 | R$\- $+ $: $>3 $1 $2 | |
3970 | .)b | |
3971 | Care must be taken to prevent unexpected results; | |
3972 | for example, | |
3973 | .(b | |
3974 | "|someprogram < input > output" | |
3975 | .)b | |
3976 | will have quotes stripped, | |
3977 | but the result is probably not what you had in mind. | |
3978 | Fortunately these cases are rare. | |
3979 | .pp | |
de7324ac EA |
3980 | New classes can be added in the routine |
3981 | .b setupmaps | |
3982 | in file | |
3983 | .b conf.c . | |
f13b6b36 | 3984 | .sh 2 "Building a Configuration File From Scratch" |
bbdc3cab | 3985 | .pp |
f13b6b36 EA |
3986 | Building a configuration table from scratch is an extremely difficult job. |
3987 | Fortunately, | |
3988 | it is almost never necessary to do so; | |
3989 | nearly every situation that may come up | |
3990 | may be resolved by changing an existing table. | |
3991 | In any case, | |
3992 | it is critical that you understand what it is that you are trying to do | |
3993 | and come up with a philosophy for the configuration table. | |
3994 | This section is intended to explain what the real purpose | |
3995 | of a configuration table is | |
3996 | and to give you some ideas | |
3997 | for what your philosophy might be. | |
859d056a EA |
3998 | .pp |
3999 | .b "Do not even consider" | |
4000 | writing your own configuration file | |
4001 | without carefully studying | |
4002 | RFC 821, 822, and 1123. | |
4003 | You should also read RFC 976 | |
4004 | if you are doing UUCP exchange. | |
f13b6b36 | 4005 | .sh 3 "What you are trying to do" |
55c435aa | 4006 | .pp |
f13b6b36 EA |
4007 | The configuration table has three major purposes. |
4008 | The first and simplest | |
4009 | is to set up the environment for | |
4010 | .i sendmail . | |
4011 | This involves setting the options, | |
4012 | defining a few critical macros, | |
4013 | etc. | |
4014 | Since these are described in other places, | |
4015 | we will not go into more detail here. | |
bbdc3cab | 4016 | .pp |
f13b6b36 EA |
4017 | The second purpose is to rewrite addresses in the message. |
4018 | This should typically be done in two phases. | |
4019 | The first phase maps addresses in any format | |
4020 | into a canonical form. | |
4021 | This should be done in ruleset three. | |
4022 | The second phase maps this canonical form | |
4023 | into the syntax appropriate for the receiving mailer. | |
4024 | .i Sendmail | |
4025 | does this in three subphases. | |
4026 | Rulesets one and two | |
4027 | are applied to all sender and recipient addresses respectively. | |
4028 | After this, | |
4029 | you may specify per-mailer rulesets | |
4030 | for both sender and recipient addresses; | |
4031 | this allows mailer-specific customization. | |
4032 | Finally, | |
4033 | ruleset four is applied to do any default conversion | |
4034 | to external form. | |
bbdc3cab | 4035 | .pp |
f13b6b36 EA |
4036 | The third purpose |
4037 | is to map addresses into the actual set of instructions | |
4038 | necessary to get the message delivered. | |
4039 | Ruleset zero must resolve to the internal form, | |
4040 | which is in turn used as a pointer to a mailer descriptor. | |
4041 | The mailer descriptor describes the interface requirements | |
4042 | of the mailer. | |
4043 | .sh 3 "Philosophy" | |
bbdc3cab | 4044 | .pp |
f13b6b36 EA |
4045 | The particular philosophy you choose will depend heavily |
4046 | on the size and structure of your organization. | |
4047 | I will present a few possible philosophies here. | |
093461e4 EA |
4048 | There are as many philosophies as there are config designers; |
4049 | feel free to develop your own. | |
bbdc3cab | 4050 | .pp |
f13b6b36 EA |
4051 | One general point applies to all of these philosophies: |
4052 | it is almost always a mistake | |
890cda2d | 4053 | to try to do full host route resolution. |
f13b6b36 | 4054 | For example, |
6d5ff626 EA |
4055 | if you are on a UUCP-only site |
4056 | and you are trying to get names of the form | |
f13b6b36 | 4057 | .q user@host |
6d5ff626 | 4058 | to the Internet, |
f13b6b36 | 4059 | it does not pay to route them to |
6d5ff626 | 4060 | .q xyzvax!decvax!ucbvax!c70!user@host |
f90dac5e EA |
4061 | since you then depend on several links not under your control, |
4062 | some of which are likely to misparse it anyway. | |
f13b6b36 | 4063 | The best approach to this problem |
6d5ff626 EA |
4064 | is to simply forward the message for |
4065 | .q user@host | |
4066 | to | |
4067 | .q xyzvax | |
f13b6b36 EA |
4068 | and let xyzvax |
4069 | worry about it from there. | |
4070 | In summary, | |
4071 | just get the message closer to the destination, | |
4072 | rather than determining the full path. | |
4073 | .sh 4 "Large site, many hosts \*- minimum information" | |
bbdc3cab | 4074 | .pp |
f13b6b36 EA |
4075 | Berkeley is an example of a large site, |
4076 | i.e., more than two or three hosts | |
4077 | and multiple mail connections. | |
4078 | We have decided that the only reasonable philosophy | |
4079 | in our environment | |
4080 | is to designate one host as the guru for our site. | |
4081 | It must be able to resolve any piece of mail it receives. | |
4082 | The other sites should have the minimum amount of information | |
4083 | they can get away with. | |
4084 | In addition, | |
4085 | any information they do have | |
4086 | should be hints rather than solid information. | |
55c435aa | 4087 | .pp |
f13b6b36 EA |
4088 | For example, |
4089 | a typical site on our local ether network is | |
3dfefb78 EA |
4090 | .q monet |
4091 | (actually | |
4092 | .q monet.CS.Berkeley.EDU ). | |
f13b6b36 EA |
4093 | When monet receives mail for delivery, |
4094 | it checks whether it knows | |
4095 | that the destination host is directly reachable; | |
4096 | if so, mail is sent to that host. | |
4097 | If it receives mail for any unknown host, | |
4098 | it just passes it directly to | |
3dfefb78 | 4099 | .q ucbvax.CS.Berkeley.EDU , |
f13b6b36 EA |
4100 | our master host. |
4101 | Ucbvax may determine that the host name is illegal | |
4102 | and reject the message, | |
4103 | or may be able to do delivery. | |
4104 | However, it is important to note that when a new mail connection is added, | |
4105 | the only host that | |
4106 | .i must | |
4107 | have its tables updated | |
4108 | is ucbvax; | |
4109 | the others | |
4110 | .i may | |
4111 | be updated if convenient, | |
4112 | but this is not critical. | |
55c435aa | 4113 | .pp |
f13b6b36 EA |
4114 | This picture is slightly muddied |
4115 | due to network connections that are not actually located | |
4116 | on ucbvax. | |
4117 | For example, | |
4118 | some UUCP connections are currently on | |
4119 | .q ucbarpa. | |
4120 | However, | |
4121 | monet | |
4122 | .i "does not" | |
4123 | know about this; | |
4124 | the information is hidden totally between ucbvax and ucbarpa. | |
4125 | Mail going from monet to a UUCP host | |
4126 | is transferred via the ethernet | |
4127 | from monet to ucbvax, | |
4128 | then via the ethernet from ucbvax to ucbarpa, | |
4129 | and then is submitted to UUCP. | |
4130 | Although this involves some extra hops, | |
4131 | we feel this is an acceptable tradeoff. | |
55c435aa | 4132 | .pp |
f13b6b36 EA |
4133 | An interesting point is that it would be possible |
4134 | to update monet | |
4135 | to send appropriate UUCP mail directly to ucbarpa | |
4136 | if the load got too high; | |
4137 | if monet failed to note a host as connected to ucbarpa | |
4138 | it would go via ucbvax as before, | |
4139 | and if monet incorrectly sent a message to ucbarpa | |
4140 | it would still be sent by ucbarpa | |
4141 | to ucbvax as before. | |
4142 | The only problem that can occur is loops, | |
4143 | for example, | |
4144 | if ucbarpa thought that ucbvax had the UUCP connection | |
4145 | and vice versa. | |
4146 | For this reason, | |
4147 | updates should | |
4148 | .i always | |
4149 | happen to the master host first. | |
55c435aa | 4150 | .pp |
f13b6b36 EA |
4151 | This philosophy results as much from the need |
4152 | to have a single source for the configuration files | |
4153 | (typically built using | |
4154 | .i m4 \|(1) | |
4155 | or some similar tool) | |
4156 | as any logical need. | |
4157 | Maintaining more than three separate tables by hand | |
4158 | is essentially an impossible job. | |
4159 | .sh 4 "Small site \*- complete information" | |
55c435aa | 4160 | .pp |
f13b6b36 EA |
4161 | A small site |
4162 | (two or three hosts and few external connections) | |
4163 | may find it more reasonable to have complete information | |
4164 | at each host. | |
4165 | This would require that each host | |
4166 | know exactly where each network connection is, | |
4167 | possibly including the names of each host on that network. | |
4168 | As long as the site remains small | |
4169 | and the the configuration remains relatively static, | |
4170 | the update problem will probably not be too great. | |
4171 | .sh 4 "Single host" | |
55c435aa | 4172 | .pp |
f13b6b36 EA |
4173 | This is in some sense the trivial case. |
4174 | The only major issue is trying to insure that you don't | |
4175 | have to know too much about your environment. | |
4176 | For example, | |
4177 | if you have a UUCP connection | |
4178 | you might find it useful to know about the names of hosts | |
4179 | connected directly to you, | |
4180 | but this is really not necessary | |
4181 | since this may be determined from the syntax. | |
093461e4 EA |
4182 | .sh 4 "A completely different philosophy" |
4183 | .pp | |
4184 | This is adapted from Bruce Lilly. | |
4185 | Any errors in interpretation are mine. | |
4186 | .pp | |
4187 | Do minimal changes in ruleset 3: | |
4188 | fix some common but unambiguous errors (e.g. trailing dot on domains) and | |
4189 | hide bang paths foo!bar into bar@foo.UUCP. | |
4190 | The resulting "canonical" form is any valid RFC822/RFC1123/RFC976 address. | |
4191 | .pp | |
4192 | Ruleset 0 does the bulk of the work. | |
4193 | It removes the trailing "@.UUCP" that hides bang paths, | |
4194 | strips anything not needed to resolve, | |
4195 | e.g. the phrase from phrase <route-addr> and from named groups, | |
4196 | rejects unparseable addresses using $#error, | |
4197 | and finally | |
4198 | resolves to a mailer/host/user triple. | |
4199 | Ruleset 0 is rather lengthy | |
4200 | as it has to handle 3 basic address forms: | |
4201 | RFC976 bang paths, | |
4202 | RFC1123 %-hacks | |
4203 | (including vanilla RFC822 local-part@domain), | |
4204 | and RFC822 source routes. | |
4205 | It's also complicated by having to handle named lists. | |
4206 | .pp | |
4207 | The header rewriting rulesets 1 and 2 | |
4208 | remove the trailing "@.UUCP" that hides bang paths. | |
4209 | Ruleset 2 also strips the $# mailer $@ host (for test mode). | |
4210 | .pp | |
4211 | Ruleset 4 does absolutely nothing. | |
4212 | .pp | |
4213 | The per-mailer rewriting rulesets conform the envelope and | |
4214 | header addresses to the requirements of the specific | |
4215 | mailer. | |
4216 | .pp | |
4217 | Lots of rulesets-as-subroutines are used. | |
4218 | .pp | |
4219 | As a result, header addresses are subject to minimal munging | |
4220 | (per RFC1123), and the general plan is per RFC822 sect. 3.4.10. | |
f13b6b36 | 4221 | .sh 3 "Relevant issues" |
55c435aa | 4222 | .pp |
f13b6b36 EA |
4223 | The canonical form you use |
4224 | should almost certainly be as specified in | |
6d5ff626 | 4225 | the Internet protocols |
f13b6b36 EA |
4226 | RFC819 and RFC822. |
4227 | Copies of these RFC's are included on the | |
4228 | .i sendmail | |
4229 | tape | |
4230 | as | |
4231 | .i doc/rfc819.lpr | |
4232 | and | |
4233 | .i doc/rfc822.lpr . | |
55c435aa | 4234 | .pp |
f13b6b36 EA |
4235 | RFC822 |
4236 | describes the format of the mail message itself. | |
4237 | .i Sendmail | |
4238 | follows this RFC closely, | |
4239 | to the extent that many of the standards described in this document | |
4240 | can not be changed without changing the code. | |
4241 | In particular, | |
4242 | the following characters have special interpretations: | |
4243 | .(b | |
4244 | < > ( ) " \e | |
4245 | .)b | |
4246 | Any attempt to use these characters for other than their RFC822 | |
4247 | purpose in addresses is probably doomed to disaster. | |
4da134f8 | 4248 | .pp |
f13b6b36 EA |
4249 | RFC819 |
4250 | describes the specifics of the domain-based addressing. | |
4251 | This is touched on in RFC822 as well. | |
4252 | Essentially each host is given a name | |
4253 | which is a right-to-left dot qualified pseudo-path | |
4254 | from a distinguished root. | |
4255 | The elements of the path need not be physical hosts; | |
4256 | the domain is logical rather than physical. | |
4257 | For example, | |
4258 | at Berkeley | |
4259 | one legal host might be | |
4260 | .q a.CC.Berkeley.EDU ; | |
4261 | reading from right to left, | |
4262 | .q EDU | |
4263 | is a top level domain | |
4264 | comprising educational institutions, | |
4265 | .q Berkeley | |
4266 | is a logical domain name, | |
4267 | .q CC | |
4268 | represents the Computer Center, | |
4269 | (in this case a strictly logical entity), | |
4270 | and | |
4271 | .q a | |
4272 | is a host in the Computer Center. | |
4273 | .pp | |
4274 | Beware when reading RFC819 | |
4275 | that there are a number of errors in it. | |
4276 | .sh 3 "How to proceed" | |
4277 | .pp | |
4278 | Once you have decided on a philosophy, | |
4279 | it is worth examining the available configuration tables | |
4280 | to decide if any of them are close enough | |
4281 | to steal major parts of. | |
4282 | Even under the worst of conditions, | |
4283 | there is a fair amount of boiler plate that can be collected safely. | |
4284 | .pp | |
4285 | The next step is to build ruleset three. | |
4286 | This will be the hardest part of the job. | |
4287 | Beware of doing too much to the address in this ruleset, | |
4288 | since anything you do will reflect through | |
4289 | to the message. | |
4290 | In particular, | |
4291 | stripping of local domains is best deferred, | |
4292 | since this can leave you with addresses with no domain spec at all. | |
4293 | Since | |
4da134f8 | 4294 | .i sendmail |
f13b6b36 EA |
4295 | likes to append the sending domain to addresses with no domain, |
4296 | this can change the semantics of addresses. | |
4297 | Also try to avoid | |
4298 | fully qualifying domains in this ruleset. | |
4299 | Although technically legal, | |
4300 | this can lead to unpleasantly and unnecessarily long addresses | |
4301 | reflected into messages. | |
4302 | The Berkeley configuration files | |
4303 | define ruleset nine | |
4304 | to qualify domain names and strip local domains. | |
4305 | This is called from ruleset zero | |
4306 | to get all addresses into a cleaner form. | |
4307 | .pp | |
4308 | Once you have ruleset three finished, | |
4309 | the other rulesets should be relatively trivial. | |
4310 | If you need hints, | |
4311 | examine the supplied configuration tables. | |
4312 | .sh 3 "Testing the rewriting rules \*- the \-bt flag" | |
4313 | .pp | |
4314 | When you build a configuration table, | |
4315 | you can do a certain amount of testing | |
4316 | using the | |
4317 | .q "test mode" | |
4318 | of | |
4319 | .i sendmail . | |
4320 | For example, | |
4321 | you could invoke | |
4da134f8 | 4322 | .i sendmail |
f13b6b36 EA |
4323 | as: |
4324 | .(b | |
4325 | sendmail \-bt \-Ctest.cf | |
4326 | .)b | |
4327 | which would read the configuration file | |
4328 | .q test.cf | |
4329 | and enter test mode. | |
4330 | In this mode, | |
4331 | you enter lines of the form: | |
4332 | .(b | |
4333 | rwset address | |
4334 | .)b | |
4335 | where | |
4336 | .i rwset | |
4337 | is the rewriting set you want to use | |
4da134f8 | 4338 | and |
f13b6b36 EA |
4339 | .i address |
4340 | is an address to apply the set to. | |
4341 | Test mode shows you the steps it takes | |
4342 | as it proceeds, | |
4343 | finally showing you the address it ends up with. | |
4344 | You may use a comma separated list of rwsets | |
093461e4 | 4345 | for sequential application of rules to an input. |
f13b6b36 | 4346 | For example: |
6362a767 | 4347 | .(b |
093461e4 | 4348 | 3,1,21,4 monet:bollard |
6362a767 | 4349 | .)b |
f13b6b36 EA |
4350 | first applies ruleset three to the input |
4351 | .q monet:bollard. | |
4352 | Ruleset one is then applied to the output of ruleset three, | |
4353 | followed similarly by rulesets twenty-one and four. | |
4da134f8 | 4354 | .pp |
f13b6b36 EA |
4355 | If you need more detail, |
4356 | you can also use the | |
4357 | .q \-d21 | |
4358 | flag to turn on more debugging. | |
4359 | For example, | |
6362a767 | 4360 | .(b |
f13b6b36 | 4361 | sendmail \-bt \-d21.99 |
6362a767 | 4362 | .)b |
f13b6b36 EA |
4363 | turns on an incredible amount of information; |
4364 | a single word address | |
4365 | is probably going to print out several pages worth of information. | |
093461e4 EA |
4366 | .pp |
4367 | You should be warned that internally, | |
4368 | .b sendmail | |
4369 | applies ruleset 3 to all addresses. | |
4370 | In this version of sendmail, you will have to do that manually. | |
4371 | For example, older versions allowed you to use | |
4372 | .(b | |
4373 | 0 bruce@broadcast.sony.com | |
4374 | .)b | |
4375 | This version requires that you use: | |
4376 | .(b | |
4377 | 3,0 bruce@broadcast.sony.com | |
4378 | .)b | |
f13b6b36 EA |
4379 | .sh 3 "Building mailer descriptions" |
4380 | .pp | |
4381 | To add an outgoing mailer to your mail system, | |
4382 | you will have to define the characteristics of the mailer. | |
4383 | .pp | |
4384 | Each mailer must have an internal name. | |
4385 | This can be arbitrary, | |
4386 | except that the names | |
4387 | .q local | |
4388 | and | |
4389 | .q prog | |
4390 | must be defined. | |
4391 | .pp | |
4392 | The pathname of the mailer must be given in the P field. | |
4393 | If this mailer should be accessed via an IPC connection, | |
4394 | use the string | |
4395 | .q [IPC] | |
4396 | instead. | |
4397 | .pp | |
4398 | The F field defines the mailer flags. | |
4399 | You should specify an | |
4400 | .q f | |
4401 | or | |
4402 | .q r | |
4403 | flag to pass the name of the sender as a | |
4404 | .b \-f | |
4405 | or | |
4406 | .b \-r | |
4407 | flag respectively. | |
4408 | These flags are only passed if they were passed to | |
4409 | .i sendmail, | |
4410 | so that mailers that give errors under some circumstances | |
4411 | can be placated. | |
4412 | If the mailer is not picky | |
4413 | you can just specify | |
4414 | .q "\-f $g" | |
4415 | in the argv template. | |
4416 | If the mailer must be called as | |
4417 | .b root | |
4418 | the | |
4419 | .q S | |
4420 | flag should be given; | |
4421 | this will not reset the userid | |
4422 | before calling the mailer\**. | |
4423 | .(f | |
4424 | \**\c | |
4425 | .i Sendmail | |
4426 | must be running setuid to root | |
4427 | for this to work. | |
4428 | .)f | |
4429 | If this mailer is local | |
4430 | (i.e., will perform final delivery | |
4431 | rather than another network hop) | |
4432 | the | |
4433 | .q l | |
4434 | flag should be given. | |
4435 | Quote characters | |
4436 | (backslashes and " marks) | |
4437 | can be stripped from addresses if the | |
4438 | .q s | |
4439 | flag is specified; | |
4440 | if this is not given | |
4441 | they are passed through. | |
4442 | If the mailer is capable of sending to more than one user | |
4443 | on the same host | |
4444 | in a single transaction | |
4445 | the | |
4446 | .q m | |
4447 | flag should be stated. | |
4448 | If this flag is on, | |
4449 | then the argv template containing | |
4450 | .b $u | |
4451 | will be repeated for each unique user | |
4452 | on a given host. | |
4453 | The | |
4454 | .q e | |
4455 | flag will mark the mailer as being | |
4456 | .q expensive, | |
4457 | which will cause | |
4458 | .i sendmail | |
4459 | to defer connection | |
4460 | until a queue run\**. | |
4461 | .(f | |
4462 | \**The | |
4463 | .q c | |
4464 | configuration option must be given | |
4465 | for this to be effective. | |
4466 | .)f | |
4467 | .pp | |
4468 | An unusual case is the | |
4469 | .q C | |
4470 | flag. | |
4471 | This flag applies to the mailer that the message is received from, | |
4472 | rather than the mailer being sent to; | |
4473 | if set, | |
4474 | the domain spec of the sender | |
4475 | (i.e., the | |
4476 | .q @host.domain | |
4477 | part) | |
4478 | is saved | |
4479 | and is appended to any addresses in the message | |
4480 | that do not already contain a domain spec. | |
4481 | For example, | |
4482 | a message of the form: | |
4da134f8 | 4483 | .(b |
3dfefb78 EA |
4484 | From: eric@vangogh.CS.Berkeley.EDU |
4485 | To: wnj@monet.CS.Berkeley.EDU, mckusick | |
4da134f8 | 4486 | .)b |
f13b6b36 EA |
4487 | will be modified to: |
4488 | .(b | |
3dfefb78 EA |
4489 | From: eric@vangogh.CS.Berkeley.EDU |
4490 | To: wnj@monet.CS.Berkeley.EDU, mckusick@vangogh.CS.Berkeley.EDU | |
f13b6b36 EA |
4491 | .)b |
4492 | .i "if and only if" | |
f3e184c1 | 4493 | the |
f13b6b36 EA |
4494 | .q C |
4495 | flag is defined in the mailer corresponding to | |
3dfefb78 | 4496 | .q eric@vangogh.CS.Berkeley.EDU. |
f13b6b36 EA |
4497 | .pp |
4498 | Other flags are described | |
4499 | in Appendix C. | |
4500 | .pp | |
4501 | The S and R fields in the mailer description | |
4502 | are per-mailer rewriting sets | |
4503 | to be applied to sender and recipient addresses | |
4504 | respectively. | |
4505 | These are applied after the sending domain is appended | |
4506 | and the general rewriting sets | |
4507 | (numbers one and two) | |
4508 | are applied, | |
4509 | but before the output rewrite | |
4510 | (ruleset four) | |
4511 | is applied. | |
4512 | A typical use is to append the current domain | |
4513 | to addresses that do not already have a domain. | |
4514 | For example, | |
4515 | a header of the form: | |
4516 | .(b | |
4517 | From: eric | |
4518 | .)b | |
4519 | might be changed to be: | |
4520 | .(b | |
3dfefb78 | 4521 | From: eric@vangogh.CS.Berkeley.EDU |
f13b6b36 EA |
4522 | .)b |
4523 | or | |
4524 | .(b | |
4525 | From: ucbvax!eric | |
4526 | .)b | |
4527 | depending on the domain it is being shipped into. | |
4528 | These sets can also be used | |
4529 | to do special purpose output rewriting | |
4530 | in cooperation with ruleset four. | |
4531 | .pp | |
4532 | The E field defines the string to use | |
4533 | as an end-of-line indication. | |
4534 | A string containing only newline is the default. | |
4535 | The usual backslash escapes | |
4536 | (\er, \en, \ef, \eb) | |
4537 | may be used. | |
4538 | .pp | |
4539 | Finally, | |
4540 | an argv template is given as the E field. | |
4541 | It may have embedded spaces. | |
4542 | If there is no argv with a | |
4543 | .b $u | |
4544 | macro in it, | |
f3e184c1 | 4545 | .i sendmail |
f13b6b36 EA |
4546 | will speak SMTP |
4547 | to the mailer. | |
4548 | If the pathname for this mailer is | |
4549 | .q [IPC], | |
4550 | the argv should be | |
4551 | .(b | |
4552 | IPC $h [ \fIport\fP ] | |
4553 | .)b | |
4554 | where | |
4555 | .i port | |
4556 | is the optional port number | |
4557 | to connect to. | |
4558 | .pp | |
4559 | For example, | |
4560 | the specifications: | |
4561 | .(b | |
4562 | .ta \w'Mlocal, 'u +\w'P=/bin/mail, 'u +\w'F=rlsm, 'u +\w'S=10, 'u +\w'R=20, 'u | |
4563 | Mlocal, P=/bin/mail, F=rlsm S=10, R=20, A=mail \-d $u | |
4564 | Mether, P=[IPC], F=meC, S=11, R=21, A=IPC $h, M=100000 | |
4565 | .)b | |
4566 | specifies a mailer to do local delivery | |
4567 | and a mailer for ethernet delivery. | |
4568 | The first is called | |
4569 | .q local, | |
4570 | is located in the file | |
4571 | .q /bin/mail, | |
4572 | takes a picky | |
4573 | .b \-r | |
4574 | flag, | |
4575 | does local delivery, | |
4576 | quotes should be stripped from addresses, | |
4577 | and multiple users can be delivered at once; | |
4578 | ruleset ten | |
4579 | should be applied to sender addresses in the message | |
4580 | and ruleset twenty | |
4581 | should be applied to recipient addresses; | |
4582 | the argv to send to a message will be the word | |
4583 | .q mail, | |
4584 | the word | |
4585 | .q \-d, | |
4586 | and words containing the name of the receiving user. | |
4587 | If a | |
4588 | .b \-r | |
4589 | flag is inserted | |
4590 | it will be between the words | |
4591 | .q mail | |
4592 | and | |
4593 | .q \-d. | |
4594 | The second mailer is called | |
4595 | .q ether, | |
4596 | it should be connected to via an IPC connection, | |
4597 | it can handle multiple users at once, | |
4598 | connections should be deferred, | |
4599 | and any domain from the sender address | |
4600 | should be appended to any receiver name | |
4601 | without a domain; | |
4602 | sender addresses should be processed by ruleset eleven | |
4603 | and recipient addresses by ruleset twenty-one. | |
4604 | There is a 100,000 byte limit on messages passed through this mailer. | |
4605 | .sh 2 "The User Database" | |
4606 | .pp | |
4607 | If you have a version of sendmail with the user database package | |
4608 | compiled in, | |
4609 | the handling of sender and recipient addresses | |
4610 | is modified. | |
4611 | .pp | |
4612 | The location of this database is controlled with the | |
4613 | .b U | |
4614 | option. | |
4615 | .sh 3 "Structure of the user database" | |
4616 | .pp | |
4617 | The database is a sorted (BTree-based) structure. | |
4618 | User records are stored with the key: | |
55c435aa | 4619 | .(b |
f13b6b36 | 4620 | \fIuser-name\fP\fB:\fP\fIfield-name\fP |
55c435aa | 4621 | .)b |
f13b6b36 EA |
4622 | The sorted database format ensures that user records are clustered together. |
4623 | Meta-information is always stored with a leading colon. | |
4624 | .pp | |
4625 | Field names define both the syntax and semantics of the value. | |
4626 | Defined fields include: | |
4627 | .nr ii 1i | |
4628 | .ip maildrop | |
4629 | The delivery address for this user. | |
4630 | There may be multiple values of this record. | |
4631 | In particular, | |
4632 | mailing lists will have one | |
4633 | .i maildrop | |
4634 | record for each user on the list. | |
4635 | .ip "mailname" | |
4636 | The outgoing mailname for this user. | |
4637 | For each outgoing name, | |
4638 | there should be an appropriate | |
4639 | .i maildrop | |
4640 | record for that name to allow return mail. | |
4641 | See also | |
4642 | .i :default:mailname . | |
4643 | .ip fullname | |
4644 | The full name of the user. | |
4645 | .ip office-address | |
4646 | The office address for this user. | |
4647 | .ip office-phone | |
4648 | The office phone number for this user. | |
4649 | .ip office-fax | |
4650 | The office FAX number for this user. | |
4651 | .ip home-address | |
4652 | The home address for this user. | |
4653 | .ip home-phone | |
4654 | The home phone number for this user. | |
4655 | .ip home-fax | |
4656 | The home FAX number for this user. | |
4657 | .ip project | |
4658 | A (short) description of the project this person is affiliated with. | |
4659 | In the University this is often just the name of their graduate advisor. | |
4660 | .ip plan | |
4661 | A pointer to a file from which plan information can be gathered. | |
4662 | .pp | |
4663 | As of this writing, | |
4664 | only a few of these fields are actually being used by sendmail: | |
4665 | .i maildrop | |
4666 | and | |
4667 | .i mailname . | |
4668 | A | |
4669 | .i finger | |
4670 | program that uses the other fields is planned. | |
4671 | .sh 3 "User database semantics" | |
4672 | .pp | |
4673 | When the rewriting rules submit an address to the local mailer, | |
4674 | the user name is passed through the alias file. | |
4675 | If no alias is found (or if the alias points back to the same address), | |
4676 | the name (with | |
4677 | .q :maildrop | |
4678 | appended) | |
4679 | is then used as a key in the user database. | |
4680 | If no match occurs (or if the maildrop points at the same address), | |
4681 | forwarding is tried. | |
4682 | .pp | |
4683 | If the first token of the user name returned by ruleset 0 | |
4684 | is an | |
4685 | .q @ | |
4686 | sign, the user database lookup is skipped. | |
4687 | The intent is that the user database will act as a set of defaults | |
4688 | for a cluster (in our case, the Computer Science Division); | |
4689 | mail sent to a specific machine should ignore these defaults. | |
4690 | .pp | |
4691 | When mail is sent, | |
4692 | the name of the sending user is looked up in the database. | |
4693 | If that user has a | |
4694 | .q mailname | |
4695 | record, | |
4696 | the value of that record is used as their outgoing name. | |
4697 | For example, I might have a record: | |
55c435aa | 4698 | .(b |
f13b6b36 | 4699 | eric:mailname Eric.Allman@CS.Berkeley.EDU |
55c435aa | 4700 | .)b |
f13b6b36 EA |
4701 | This would cause my outgoing mail to be sent as Eric.Allman. |
4702 | .pp | |
4703 | If a | |
4704 | .q maildrop | |
4705 | is found for the user, | |
4706 | but no corresponding | |
4707 | .q maildrop | |
4708 | record exists, | |
4709 | the record | |
4710 | .q :default:mailname | |
4711 | is consulted. | |
4712 | If present, this is the name of a host to override the local host. | |
4713 | For example, in our case we would set it to | |
4714 | .q CS.Berkeley.EDU . | |
4715 | The effect is that anyone known in the database | |
4716 | gets their outgoing mail stamped as | |
4717 | .q user@CS.Berkeley.EDU , | |
4718 | but people not listed in the database use the local hostname. | |
4719 | .sh 1 "OTHER CONFIGURATION" | |
4da134f8 EA |
4720 | .pp |
4721 | There are some configuration changes that can be made by | |
4722 | recompiling | |
4723 | .i sendmail . | |
f13b6b36 EA |
4724 | This section describes what changes can be made |
4725 | and what has to be modified to make them. | |
4726 | .sh 2 "Parameters in src/Makefile" | |
55c435aa | 4727 | .pp |
102e8f9c EA |
4728 | These parameters are intended to describe the compilation environment, |
4729 | not site policy, | |
4730 | and should normally be defined in src/Makefile. | |
55c435aa EA |
4731 | .ip NDBM |
4732 | If set, | |
4733 | the new version of the DBM library | |
4734 | that allows multiple databases will be used. | |
102e8f9c EA |
4735 | If neither NDBM nor NEWDB are set, |
4736 | a much less efficient method of alias lookup is used. | |
55c435aa EA |
4737 | .ip NEWDB |
4738 | If set, use the new database package from Berkeley (from 4.4BSD). | |
4739 | This package is substantially faster than DBM or NDBM. | |
102e8f9c EA |
4740 | If NEWDB and NDBM are both set, |
4741 | sendmail will read DBM files, | |
55c435aa | 4742 | but will create and use NEWDB files. |
102e8f9c EA |
4743 | .ip YPCOMPAT |
4744 | If set together with | |
4745 | .i both | |
4746 | NEWDB and NDBM, | |
4747 | .i sendmail | |
4748 | will create both DBM and NEWDB files if and only if | |
4749 | the file /var/yp/Makefile | |
4750 | exists and is readable. | |
4751 | This is intended for compatibility with Sun Microsystems' | |
4752 | .i mkalias | |
4753 | program used on YP masters. | |
dfd63518 EA |
4754 | .ip SYSTEM5 |
4755 | Set all of the compilation parameters appropriate for System V. | |
55c435aa EA |
4756 | .ip LOCKF |
4757 | Use System V | |
4758 | .b lockf | |
4759 | instead of Berkeley | |
4760 | .b flock . | |
32c5f422 EA |
4761 | Due to the highly unusual semantics of locks |
4762 | across forks in | |
55c435aa EA |
4763 | .b lockf , |
4764 | this should never be used unless absolutely necessary. | |
dfd63518 EA |
4765 | Set by default if |
4766 | SYSTEM5 is set. | |
55c435aa EA |
4767 | .ip SYS5TZ |
4768 | Use System V | |
4769 | time zone semantics. | |
dfd63518 EA |
4770 | .ip HASINITGROUPS |
4771 | Set this if your system has the | |
4772 | .i initgroups() | |
4773 | call | |
4774 | (if you have multiple group support). | |
4775 | This is the default if SYSTEM5 is | |
4776 | .i not | |
4777 | defined or if you are on HPUX. | |
4778 | .ip HASUNAME | |
4779 | Set this if you have the | |
59baf33c | 4780 | .i uname (2) |
dfd63518 EA |
4781 | system call (or corresponding library routine). |
4782 | Set by default if | |
4783 | SYSTEM5 | |
4784 | is set. | |
59baf33c EA |
4785 | .ip HASSTATFS |
4786 | Set this if you have the | |
4787 | .i statfs (2) | |
4788 | system call. | |
4789 | This will allow you to give a temporary failure | |
4790 | message to incoming SMTP email | |
4791 | when you are low on disk space. | |
4792 | It is set by default on 4.4 BSD and OSF/1 systems. | |
f90dac5e EA |
4793 | .ip HASUSTAT |
4794 | Set if you have the | |
4795 | .i ustat (2) | |
4796 | system call. | |
4797 | This is an alternative implementation of disk space control. | |
4798 | You should only set one of HASSTATFS or HASUSTAT; | |
4799 | the first is preferred. | |
4800 | .ip _PATH_SENDMAILCF | |
4801 | The pathname of the sendmail.cf file. | |
4802 | .ip _PATH_SENDMAILFC | |
4803 | The pathname of the sendmail.fc file. | |
4804 | .ip _PATH_SENDMAILPID | |
4805 | The pathname of the sendmail.pid file. | |
55c435aa EA |
4806 | .ip LA_TYPE |
4807 | The load average type. | |
4808 | Details are described below. | |
de7324ac EA |
4809 | .lp |
4810 | The are four built-in ways of computing the load average. | |
4811 | .i Sendmail | |
4812 | tries to auto-configure them based on imperfect guesses; | |
4813 | you can select one using the | |
4814 | .i cc | |
4815 | option | |
4816 | .b \-DLA_TYPE= \c | |
4817 | .i type , | |
4818 | where | |
4819 | .i type | |
4820 | is: | |
4821 | .ip LA_INT | |
4822 | The kernel stores the load average in the kernel as an array of long integers. | |
4823 | The actual values are scaled by a factor FSCALE | |
4824 | (default 256). | |
4825 | .ip LA_FLOAT | |
4826 | The kernel stores the load average in the kernel as an array of | |
4827 | double precision floats. | |
4828 | .ip LA_SUBR | |
4829 | Call the | |
4830 | .i getloadavg | |
4831 | routine to get the load average as an array of doubles. | |
4832 | .ip LA_ZERO | |
4833 | Always return zero as the load average. | |
4834 | This is the fallback case. | |
4835 | .lp | |
4836 | If type | |
4837 | .sm LA_INT | |
4838 | or | |
4839 | .sm LA_FLOAT | |
4840 | is specified, | |
4841 | you may also need to specify | |
4842 | .sm _PATH_UNIX | |
4843 | (the path to your system binary) | |
4844 | and | |
4845 | .sm LA_AVENRUN | |
4846 | (the name of the variable containing the load average in the kernel; | |
4847 | usually | |
4848 | .q _avenrun | |
4849 | or | |
4850 | .q avenrun ). | |
f13b6b36 | 4851 | .sh 2 "Parameters in src/conf.h" |
b16e27c4 EA |
4852 | .pp |
4853 | Parameters and compilation options | |
4854 | are defined in conf.h. | |
4855 | Most of these need not normally be tweaked; | |
4856 | common parameters are all in sendmail.cf. | |
4857 | However, the sizes of certain primitive vectors, etc., | |
4858 | are included in this file. | |
4859 | The numbers following the parameters | |
4860 | are their default value. | |
74b6e641 | 4861 | .nr ii 1.2i |
367a5dcd | 4862 | .ip "MAXLINE [1024]" |
b16e27c4 EA |
4863 | The maximum line length of any input line. |
4864 | If message lines exceed this length | |
4865 | they will still be processed correctly; | |
4866 | however, header lines, | |
4867 | configuration file lines, | |
4868 | alias lines, | |
4869 | etc., | |
4870 | must fit within this limit. | |
367a5dcd | 4871 | .ip "MAXNAME [256]" |
b16e27c4 EA |
4872 | The maximum length of any name, |
4873 | such as a host or a user name. | |
b16e27c4 EA |
4874 | .ip "MAXPV [40]" |
4875 | The maximum number of parameters to any mailer. | |
4876 | This limits the number of recipients that may be passed in one transaction. | |
f13b6b36 EA |
4877 | It can be set to any arbitrary number above about 10, |
4878 | since | |
4879 | .i sendmail | |
4880 | will break up a delivery into smaller batches as needed. | |
4881 | A higher number may reduce load on your system, however. | |
b16e27c4 EA |
4882 | .ip "MAXATOM [100]" |
4883 | The maximum number of atoms | |
4884 | (tokens) | |
4885 | in a single address. | |
4886 | For example, | |
4887 | the address | |
55c435aa EA |
4888 | .q "eric@CS.Berkeley.EDU" |
4889 | is seven atoms. | |
b16e27c4 EA |
4890 | .ip "MAXMAILERS [25]" |
4891 | The maximum number of mailers that may be defined | |
4892 | in the configuration file. | |
f13b6b36 | 4893 | .ip "MAXRWSETS [100]" |
b16e27c4 EA |
4894 | The maximum number of rewriting sets |
4895 | that may be defined. | |
4896 | .ip "MAXPRIORITIES [25]" | |
4897 | The maximum number of values for the | |
4898 | .q Precedence: | |
4899 | field that may be defined | |
4900 | (using the | |
4901 | .b P | |
4902 | line in sendmail.cf). | |
367a5dcd EA |
4903 | .ip "MAXUSERENVIRON [40]" |
4904 | The maximum number of items in the user environment | |
4905 | that will be passed to subordinate mailers. | |
f13b6b36 | 4906 | .ip "QUEUESIZE [1000]" |
4f24419a EA |
4907 | The maximum number of entries that will be processed |
4908 | in a single queue run. | |
f13b6b36 | 4909 | .ip "MAXMXHOSTS [20]" |
daae36f7 | 4910 | The maximum number of MX records we will accept for any single host. |
e920f7ff EA |
4911 | .ip "MAXIPADDR [16]" |
4912 | The maximum number of numeric IP addresses we will accept | |
4913 | for this host. | |
4914 | This does not limit the number the number of addresses for other hosts. | |
b16e27c4 EA |
4915 | .lp |
4916 | A number of other compilation options exist. | |
4917 | These specify whether or not specific code should be compiled in. | |
55c435aa | 4918 | .nr ii 1.2i |
4da134f8 EA |
4919 | .ip DEBUG |
4920 | If set, debugging information is compiled in. | |
4921 | To actually get the debugging output, | |
4922 | the | |
4923 | .b \-d | |
4924 | flag must be used. | |
f13b6b36 EA |
4925 | .b "WE STRONGLY RECOMMEND THAT THIS BE LEFT ON." |
4926 | Some people, believing that it was a security hole | |
4927 | (it was, once) | |
4928 | have turned it off and thus crippled debuggers. | |
959bbd2e | 4929 | .ip NETINET |
f13b6b36 | 4930 | If set, |
959bbd2e EA |
4931 | support for Internet protocol networking is compiled in. |
4932 | Previous versions of | |
4933 | .b sendmail | |
4934 | referred to this as | |
4935 | .sm DAEMON ; | |
4936 | this old usage is now incorrect. | |
4937 | .ip NETISO | |
4938 | If set, | |
337767a9 EA |
4939 | support for ISO protocol networking is compiled in |
4940 | (it may be appropriate to #define this in the Makefile instead of conf.h). | |
4da134f8 EA |
4941 | .ip LOG |
4942 | If set, | |
4943 | the | |
4944 | .i syslog | |
4945 | routine in use at some sites is used. | |
4946 | This makes an informational log record | |
4947 | for each message processed, | |
4948 | and makes a higher priority log record | |
4949 | for internal system errors. | |
f13b6b36 EA |
4950 | .ip MATCHGECOS |
4951 | Compile in the code to do ``fuzzy matching'' on the GECOS field | |
4952 | in /etc/passwd. | |
4953 | This also requires that option G be turned on. | |
4954 | .ip NAMED_BIND | |
4955 | Compile in code to use the | |
4956 | Berkeley Internet Name Domain (BIND) server | |
4957 | to resolve TCP/IP host names. | |
4958 | .ip NOTUNIX | |
4959 | If you are using a non-UNIX mail format, | |
4960 | you can set this flag to turn off special processing | |
4961 | of UNIX-style | |
4962 | .q "From " | |
4963 | lines. | |
4da134f8 EA |
4964 | .ip QUEUE |
4965 | This flag should be set to compile in the queueing code. | |
4966 | If this is not set, | |
4967 | mailers must accept the mail immediately | |
4968 | or it will be returned to the sender. | |
f13b6b36 EA |
4969 | .ip SETPROCTITLE |
4970 | If defined, | |
4971 | .i sendmail | |
4972 | will change its | |
4973 | .i argv | |
4974 | array to indicate its current status. | |
4975 | This can be used in conjunction with the | |
4976 | .i ps | |
4977 | command to find out just what it's up to. | |
4da134f8 EA |
4978 | .ip SMTP |
4979 | If set, | |
4980 | the code to handle user and server SMTP will be compiled in. | |
4981 | This is only necessary if your machine has some mailer | |
f13b6b36 EA |
4982 | that speaks SMTP |
4983 | (this means most machines everywhere). | |
4da134f8 EA |
4984 | .ip UGLYUUCP |
4985 | If you have a UUCP host adjacent to you which is not running | |
4986 | a reasonable version of | |
4987 | .i rmail , | |
4988 | you will have to set this flag to include the | |
4989 | .q "remote from sysname" | |
4990 | info on the from line. | |
4991 | Otherwise, UUCP gets confused about where the mail came from. | |
daae36f7 | 4992 | .ip USERDB |
55c435aa EA |
4993 | Include the |
4994 | .b experimental | |
4995 | Berkeley user information database package. | |
daae36f7 EA |
4996 | This adds a new level of local name expansion |
4997 | between aliasing and forwarding. | |
4998 | It also uses the NEWDB package. | |
55c435aa | 4999 | This may change in future releases. |
337767a9 EA |
5000 | .ip IDENTPROTO |
5001 | Compile in the IDENT protocol as defined in RFC 1413. | |
5002 | This defaults on for all systems except Ultrix, | |
5003 | which apparently has the interesting | |
5004 | .q feature | |
5005 | that when it receives a | |
5006 | .q "host unreachable" | |
5007 | message it closes all open connections to that host. | |
5008 | Since some firewall gateways send this error code | |
5009 | when you access an unauthorized port (such as 113, used by IDENT), | |
5010 | Ultrix cannot receive email from such hosts. | |
f13b6b36 | 5011 | .sh 2 "Configuration in src/conf.c" |
4da134f8 | 5012 | .pp |
de7324ac EA |
5013 | The following changes can be made in conf.c. |
5014 | .sh 3 "Built-in Header Semantics" | |
5015 | .pp | |
4da134f8 EA |
5016 | Not all header semantics are defined in the configuration file. |
5017 | Header lines that should only be included by certain mailers | |
5018 | (as well as other more obscure semantics) | |
5019 | must be specified in the | |
5020 | .i HdrInfo | |
5021 | table in | |
5022 | .i conf.c . | |
5023 | This table contains the header name | |
b16e27c4 EA |
5024 | (which should be in all lower case) |
5025 | and a set of header control flags (described below), | |
5026 | The flags are: | |
4da134f8 | 5027 | .ip H_ACHECK |
b16e27c4 EA |
5028 | Normally when the check is made to see if a header line is compatible |
5029 | with a mailer, | |
5030 | .i sendmail | |
5031 | will not delete an existing line. | |
5032 | If this flag is set, | |
5033 | .i sendmail | |
5034 | will delete | |
5035 | even existing header lines. | |
4da134f8 EA |
5036 | That is, |
5037 | if this bit is set and the mailer does not have flag bits set | |
b16e27c4 EA |
5038 | that intersect with the required mailer flags |
5039 | in the header definition in | |
5040 | sendmail.cf, | |
4da134f8 EA |
5041 | the header line is |
5042 | .i always | |
5043 | deleted. | |
5044 | .ip H_EOH | |
5045 | If this header field is set, | |
5046 | treat it like a blank line, | |
5047 | i.e., | |
5048 | it will signal the end of the header | |
5049 | and the beginning of the message text. | |
5050 | .ip H_FORCE | |
5051 | Add this header entry | |
5052 | even if one existed in the message before. | |
5053 | If a header entry does not have this bit set, | |
5054 | .i sendmail | |
5055 | will not add another header line if a header line | |
5056 | of this name already existed. | |
5057 | This would normally be used to stamp the message | |
5058 | by everyone who handled it. | |
5059 | .ip H_TRACE | |
5060 | If set, | |
5061 | this is a timestamp | |
5062 | (trace) | |
5063 | field. | |
5064 | If the number of trace fields in a message | |
5065 | exceeds a preset amount | |
5066 | the message is returned | |
5067 | on the assumption that it has an aliasing loop. | |
5068 | .ip H_RCPT | |
5069 | If set, | |
5070 | this field contains recipient addresses. | |
5071 | This is used by the | |
5072 | .b \-t | |
5073 | flag to determine who to send to | |
5074 | when it is collecting recipients from the message. | |
5075 | .ip H_FROM | |
5076 | This flag indicates that this field | |
5077 | specifies a sender. | |
5078 | The order of these fields in the | |
5079 | .i HdrInfo | |
5080 | table specifies | |
5081 | .i sendmail's | |
5082 | preference | |
5083 | for which field to return error messages to. | |
5084 | .nr ii 5n | |
5085 | .lp | |
5086 | Let's look at a sample | |
5087 | .i HdrInfo | |
5088 | specification: | |
5089 | .(b | |
be2fcca9 | 5090 | .ta 4n +\w'"return-receipt-to", 'u |
4da134f8 | 5091 | struct hdrinfo HdrInfo[] = |
367a5dcd | 5092 | \&{ |
69a914e1 | 5093 | /* originator fields, most to least significant */ |
be2fcca9 EA |
5094 | "resent-sender", H_FROM, |
5095 | "resent-from", H_FROM, | |
5096 | "sender", H_FROM, | |
5097 | "from", H_FROM, | |
5098 | "full-name", H_ACHECK, | |
69a914e1 | 5099 | /* destination fields */ |
be2fcca9 EA |
5100 | "to", H_RCPT, |
5101 | "resent-to", H_RCPT, | |
5102 | "cc", H_RCPT, | |
69a914e1 | 5103 | /* message identification and control */ |
be2fcca9 EA |
5104 | "message", H_EOH, |
5105 | "text", H_EOH, | |
69a914e1 | 5106 | /* trace fields */ |
be2fcca9 | 5107 | "received", H_TRACE|H_FORCE, |
4da134f8 | 5108 | |
be2fcca9 | 5109 | NULL, 0, |
4da134f8 | 5110 | }; |
4da134f8 | 5111 | .)b |
be2fcca9 | 5112 | This structure indicates that the |
4da134f8 EA |
5113 | .q To: , |
5114 | .q Resent-To: , | |
5115 | and | |
5116 | .q Cc: | |
be2fcca9 | 5117 | fields |
4da134f8 | 5118 | all specify recipient addresses. |
be2fcca9 EA |
5119 | Any |
5120 | .q Full-Name: | |
5121 | field will be deleted unless the required mailer flag | |
5122 | (indicated in the configuration file) | |
5123 | is specified. | |
4da134f8 EA |
5124 | The |
5125 | .q Message: | |
5126 | and | |
5127 | .q Text: | |
5128 | fields will terminate the header; | |
55c435aa | 5129 | these are used by random dissenters around the network world. |
4da134f8 EA |
5130 | The |
5131 | .q Received: | |
5132 | field will always be added, | |
5133 | and can be used to trace messages. | |
4da134f8 EA |
5134 | .pp |
5135 | There are a number of important points here. | |
5136 | First, | |
5137 | header fields are not added automatically just because they are in the | |
5138 | .i HdrInfo | |
5139 | structure; | |
5140 | they must be specified in the configuration file | |
5141 | in order to be added to the message. | |
5142 | Any header fields mentioned in the configuration file but not | |
5143 | mentioned in the | |
5144 | .i HdrInfo | |
5145 | structure have default processing performed; | |
5146 | that is, | |
5147 | they are added unless they were in the message already. | |
5148 | Second, | |
5149 | the | |
5150 | .i HdrInfo | |
5151 | structure only specifies cliched processing; | |
5152 | certain headers are processed specially by ad hoc code | |
5153 | regardless of the status specified in | |
5154 | .i HdrInfo . | |
5155 | For example, | |
5156 | the | |
5157 | .q Sender: | |
5158 | and | |
5159 | .q From: | |
5160 | fields are always scanned on ARPANET mail | |
6d5ff626 EA |
5161 | to determine the sender\**; |
5162 | .(f | |
5163 | \**Actually, this is no longer true in SMTP; | |
5164 | this information is contained in the envelope. | |
5165 | The older ARPANET protocols did not completely distinguish | |
5166 | envelope from header. | |
5167 | .)f | |
4da134f8 EA |
5168 | this is used to perform the |
5169 | .q "return to sender" | |
5170 | function. | |
5171 | The | |
5172 | .q "From:" | |
5173 | and | |
5174 | .q "Full-Name:" | |
5175 | fields are used to determine the full name of the sender | |
5176 | if possible; | |
5177 | this is stored in the macro | |
5178 | .b $x | |
5179 | and used in a number of ways. | |
de7324ac | 5180 | .sh 3 "Restricting Use of Email" |
4da134f8 | 5181 | .pp |
69a914e1 | 5182 | If it is necessary to restrict mail through a relay, |
4da134f8 EA |
5183 | the |
5184 | .i checkcompat | |
5185 | routine can be modified. | |
5186 | This routine is called for every recipient address. | |
d1e44f94 EA |
5187 | It returns an exit status |
5188 | indicating the status of the message. | |
5189 | The status | |
5190 | .sm EX_OK | |
5191 | accepts the address, | |
5192 | .sm EX_TEMPFAIL | |
5193 | queues the message for a later try, | |
5194 | and other values | |
5195 | (commonly | |
5196 | .sm EX_UNAVAILABLE ) | |
5197 | reject the message. | |
5198 | It is up to | |
4da134f8 EA |
5199 | .i checkcompat |
5200 | to print an error message | |
5201 | (using | |
5202 | .i usrerr ) | |
d1e44f94 | 5203 | if the message is rejected. |
4da134f8 EA |
5204 | For example, |
5205 | .i checkcompat | |
5206 | could read: | |
5207 | .(b | |
5208 | .re | |
74b6e641 | 5209 | .sz -1 |
69a914e1 | 5210 | .ta 4n +4n +4n +4n +4n +4n +4n |
d1e44f94 EA |
5211 | int |
5212 | checkcompat(to, e) | |
4da134f8 | 5213 | register ADDRESS *to; |
d1e44f94 | 5214 | register ENVELOPE *e; |
367a5dcd | 5215 | \&{ |
d1e44f94 EA |
5216 | register STAB *s; |
5217 | ||
5218 | s = stab("private", ST_MAILER, ST_FIND); | |
5219 | if (s != NULL && e\->e_from.q_mailer != LocalMailer && | |
5220 | to->q_mailer == s->s_mailer) | |
5221 | { | |
5222 | usrerr("No private net mail allowed through this machine"); | |
5223 | return (EX_UNAVAILABLE); | |
5224 | } | |
5225 | if (MsgSize > 50000 && to\->q_mailer != LocalMailer) | |
4da134f8 EA |
5226 | { |
5227 | usrerr("Message too large for non-local delivery"); | |
7a316267 | 5228 | NoReturn = TRUE; |
d1e44f94 | 5229 | return (EX_UNAVAILABLE); |
4da134f8 | 5230 | } |
d1e44f94 | 5231 | return (EX_OK); |
4da134f8 EA |
5232 | } |
5233 | .sz | |
5234 | .)b | |
5235 | This would reject messages greater than 50000 bytes | |
5236 | unless they were local. | |
7a316267 | 5237 | The |
f13b6b36 EA |
5238 | .i NoReturn |
5239 | flag can be sent to suppress the return of the actual body | |
5240 | of the message in the error return. | |
5241 | The actual use of this routine is highly dependent on the | |
5242 | implementation, | |
5243 | and use should be limited. | |
de7324ac | 5244 | .sh 3 "Load Average Computation" |
f13b6b36 EA |
5245 | .pp |
5246 | The routine | |
5247 | .i getla | |
5248 | should return an approximation of the current system load average | |
5249 | as an integer. | |
de7324ac EA |
5250 | There are four versions included on compilation flags |
5251 | as described above. | |
5252 | .sh 3 "New Database Map Classes" | |
f13b6b36 EA |
5253 | .pp |
5254 | New key maps can be added by creating a class initialization function | |
5255 | and a lookup function. | |
5256 | These are then added to the routine | |
5257 | .i setupmaps. | |
5258 | .pp | |
5259 | The initialization function is called as | |
5260 | .(b | |
5261 | \fIxxx\fP_map_init(MAP *map, char *mapname, char *args) | |
5262 | .)b | |
5263 | The | |
5264 | .i map | |
5265 | is an internal data structure. | |
5266 | The | |
5267 | .i mapname | |
5268 | is the name of the map (used for error messages). | |
5269 | The | |
5270 | .i args | |
5271 | is a pointer to the rest of the configuration file line; | |
5272 | flags and filenames can be extracted from this line. | |
5273 | The initialization function must return | |
5274 | .sm TRUE | |
5275 | if it successfully opened the map, | |
5276 | .sm FALSE | |
5277 | otherwise. | |
5278 | .pp | |
5279 | The lookup function is called as | |
5280 | .(b | |
e9305caa | 5281 | \fIxxx\fP_map_lookup(MAP *map, char buf[], int bufsize, char **av, int *statp) |
f13b6b36 EA |
5282 | .)b |
5283 | The | |
5284 | .i map | |
5285 | defines the map internally. | |
5286 | The parameters | |
5287 | .i buf | |
5288 | and | |
5289 | .i bufsize | |
5290 | have the input key. | |
5291 | This may be (and often is) used destructively. | |
5292 | The | |
5293 | .i av | |
5294 | is a list of arguments passed in from the rewrite line. | |
5295 | The lookup function should return a pointer to the new value. | |
e9305caa EA |
5296 | IF the map lookup fails, |
5297 | .i *statp | |
5298 | should be set to an exit status code; | |
5299 | in particular, it should be set to | |
5300 | .sm EX_TEMPFAIL | |
5301 | if recovery is to be attempted by the higher level code. | |
55aab950 EA |
5302 | .sh 3 "Queueing Function" |
5303 | .pp | |
5304 | The routine | |
5305 | .i shouldqueue | |
5306 | is called to decide if a message should be queued | |
5307 | or processed immediately. | |
5308 | Typically this compares the message priority to the current load average. | |
5309 | The default definition is: | |
5310 | .(b | |
5311 | bool | |
5312 | shouldqueue(pri, ctime) | |
5313 | long pri; | |
5314 | time_t ctime; | |
5315 | { | |
5316 | if (CurrentLA < QueueLA) | |
5317 | return (FALSE); | |
859d056a EA |
5318 | if (CurrentLA >= RefuseLA) |
5319 | return (TRUE); | |
55aab950 EA |
5320 | return (pri > (QueueFactor / (CurrentLA \- QueueLA + 1))); |
5321 | } | |
5322 | .)b | |
5323 | If the current load average | |
5324 | (global variable | |
5325 | .i CurrentLA , | |
5326 | which is set before this function is called) | |
859d056a | 5327 | is less than the low threshold load average |
55aab950 EA |
5328 | (option |
5329 | .b x , | |
5330 | variable | |
5331 | .i QueueLA ), | |
5332 | .i shouldqueue | |
5333 | returns | |
5334 | .sm FALSE | |
5335 | immediately | |
5336 | (that is, it should | |
5337 | .i not | |
5338 | queue). | |
859d056a EA |
5339 | If the current load average exceeds the high threshold load average |
5340 | (option | |
5341 | .b X , | |
5342 | variable | |
5343 | .i RefuseLA ), | |
5344 | .i shouldqueue | |
5345 | returns | |
5346 | .sm TRUE | |
5347 | immediately. | |
55aab950 EA |
5348 | Otherwise, it computes the function based on the message priority, |
5349 | the queue factor | |
5350 | (option | |
5351 | .b q , | |
5352 | global variable | |
5353 | .i QueueFactor ), | |
5354 | and the current and threshold load averages. | |
5355 | .pp | |
5356 | An implementation wishing to take the actual age of the message into account | |
5357 | can also use the | |
5358 | .i ctime | |
5359 | parameter, | |
5360 | which is the time that the message was first submitted to | |
5361 | .i sendmail . | |
5362 | Note that the | |
5363 | .i pri | |
5364 | parameter is already weighted | |
5365 | by the number of times the message has been tried | |
5366 | (although this tends to lower the priority of the message with time); | |
5367 | the expectation is that the | |
5368 | .i ctime | |
5369 | would be used as an | |
5370 | .q "escape clause" | |
5371 | to ensure that messages are eventually processed. | |
5372 | .sh 3 "Refusing Incoming SMTP Connections" | |
5373 | .pp | |
5374 | The function | |
5375 | .i refuseconnections | |
5376 | returns | |
5377 | .sm TRUE | |
5378 | if incoming SMTP connections should be refused. | |
5379 | The current implementation is based exclusively on the current load average | |
5380 | and the refuse load average option | |
5381 | (option | |
5382 | .b X , | |
5383 | global variable | |
5384 | .i RefuseLA ): | |
5385 | .(b | |
5386 | bool | |
5387 | refuseconnections() | |
5388 | { | |
859d056a | 5389 | return (CurrentLA >= RefuseLA); |
55aab950 EA |
5390 | } |
5391 | .)b | |
5392 | A more clever implementation | |
5393 | could look at more system resources. | |
5394 | .sh 3 "Load Average Computation" | |
5395 | .pp | |
5396 | The routine | |
5397 | .i getla | |
5398 | returns the current load average (as a rounded integer). | |
5399 | The distribution includes several possible implementations. | |
f13b6b36 EA |
5400 | .sh 2 "Configuration in src/daemon.c" |
5401 | .pp | |
5402 | The file | |
5403 | .i src/daemon.c | |
5404 | contains a number of routines that are dependent | |
5405 | on the local networking environment. | |
5406 | The version supplied is specific to 4.3 BSD. | |
5407 | .pp | |
5408 | In previous releases, | |
5409 | we recommended that you modify the routine | |
5410 | .i maphostname | |
5411 | if you wanted to generalize | |
5412 | .b $[ | |
5413 | \&...\& | |
5414 | .b $] | |
5415 | lookups. | |
5416 | We now recommend that you create a new keyed map instead. | |
f90dac5e | 5417 | .sh 1 "CHANGES IN VERSION 6" |
f13b6b36 EA |
5418 | .pp |
5419 | The following summarizes changes | |
5420 | since the last commonly available version of | |
5421 | .b sendmail | |
5422 | (5.67): | |
5423 | .sh 2 "Connection Caching" | |
5424 | .pp | |
5425 | Instead of closing SMTP connections immediately, | |
5426 | those connections are cached for possible future use. | |
5427 | The advent of MX records made this effective for mailing lists; | |
5428 | in addition, | |
5429 | substantial performance improvements can be expected for queue processing. | |
d1e44f94 EA |
5430 | .sh 2 "MX Piggybacking" |
5431 | .pp | |
5432 | If two hosts with different names in a single message | |
5433 | happen to have the same set of MX hosts, | |
5434 | they can be sent in the same transaction. | |
acbfac81 | 5435 | Version 6 notices this and tries to batch the messages. |
f13b6b36 EA |
5436 | .sh 2 "Eight-Bit Clean" |
5437 | .pp | |
5438 | Previous versions of | |
5439 | .b sendmail | |
5440 | used the 0200 bit for quoting. | |
5441 | This version avoids that use. | |
5442 | However, for compatibility with RFC 822, | |
5443 | the default is still to strip the eighth bit; | |
5444 | set option `8' to get full 8-bit clean processing. | |
5445 | .pp | |
5446 | Individual mailers can still produce seven bit out put using the | |
5447 | `7' mailer flag. | |
5448 | .sh 2 "User Database" | |
5449 | .pp | |
5450 | The user database is an as-yet experimental attempt | |
5451 | to provide unified large-site name support. | |
5452 | We are installing it at Berkeley; | |
5453 | future versions may show significant modifications. | |
5454 | .sh 2 "Improved BIND Support" | |
5455 | .pp | |
5456 | The BIND support, | |
5457 | particularly for MX records, | |
5458 | had a number of annoying | |
5459 | .q features | |
5460 | which have been removed in this release. | |
5461 | In particular, | |
5462 | these more tightly bind (pun intended) the name server to sendmail, | |
5463 | so that the name server resolution rules are incorporated directly into | |
5464 | .b sendmail . | |
5465 | .sh 2 "Keyed Files" | |
5466 | .pp | |
5467 | Generalized keyed files is an idea taken directly from | |
5468 | .sm IDA | |
5469 | .b sendmail | |
5470 | (albeit with a completely different implementation). | |
5471 | They can be useful on large sites. | |
de7324ac EA |
5472 | .pp |
5473 | R6 also understands YP. | |
9873c4c7 EA |
5474 | .sh 2 "Multi-Word Classes" |
5475 | .pp | |
5476 | Classes can now be multiple words. | |
5477 | For example, | |
5478 | .(b | |
5479 | CShofmann.CS.Berkeley.EDU | |
5480 | .)b | |
5481 | allows you to match the entire string | |
5482 | .q hofmann.CS.Berkeley.EDU | |
5483 | using the single construct | |
5484 | .q $=S . | |
25e4e430 EA |
5485 | .sh 2 "Deferred Macro Expansion" |
5486 | .pp | |
5487 | The | |
5488 | .b $& \c | |
5489 | .i x | |
5490 | construct has been adopted from | |
5491 | .sm IDA . | |
5492 | .sh 2 "IDENT Protocol Support" | |
5493 | .pp | |
5494 | The IDENT protocol as defined in RFC 1413 is supported. | |
f13b6b36 EA |
5495 | .sh 2 "Parsing Bug Fixes" |
5496 | .pp | |
5497 | A number of small bugs having to do with things like | |
5498 | backslash-escaped quotes inside of comments | |
5499 | have been fixed. | |
f90dac5e | 5500 | .sh 2 "Separate Envelope/Header Processing" |
f13b6b36 EA |
5501 | .pp |
5502 | Since the From: line is passed in separately from the envelope sender, | |
5503 | these have both been made visible; | |
5504 | the | |
91679fc8 EA |
5505 | .b $g |
5506 | macro is set to the envelope sender during processing | |
5507 | of mailer argument vectors | |
5508 | and the header sender during processing of headers. | |
6ebbc09a | 5509 | .pp |
f90dac5e EA |
5510 | It is also possible to specify separate per-mailer |
5511 | envelope and header processing. | |
6ebbc09a EA |
5512 | The |
5513 | .b S enderRWSet | |
5514 | and | |
5515 | .b R ecipientRWset | |
5516 | arguments for mailers | |
5517 | can be specified as | |
5518 | .i envelope/header | |
5519 | to give different rewritings for envelope versus header addresses. | |
f90dac5e EA |
5520 | .sh 2 "Owner-List Propagates to Envelope" |
5521 | .pp | |
5522 | When an alias has an associated owner\-list name, | |
5523 | that alias is used to change the envelope sender address. | |
5524 | This will cause downstream errors to be returned to that owner. | |
f13b6b36 EA |
5525 | .sh 2 "Dynamic Header Allocation" |
5526 | .pp | |
5527 | The fixed size limit on header lines has been eliminated. | |
5528 | .sh 2 "New Command Line Flag" | |
5529 | .pp | |
5530 | The \-p flag has been added | |
5531 | to pass in protocol information. | |
f90dac5e EA |
5532 | .sh 2 "New and Old Configuration Line Types" |
5533 | .pp | |
5534 | The | |
5535 | .b T | |
5536 | (Trusted users) configuration line has been deleted. | |
5537 | It will still be accepted but will be ignored. | |
5538 | .pp | |
5539 | The | |
5540 | .b K | |
5541 | line has been added to declare database maps. | |
5542 | .pp | |
5543 | The | |
5544 | .b V | |
5545 | line has been added to declare the configuration version level. | |
f13b6b36 EA |
5546 | .sh 2 "New Options" |
5547 | .pp | |
5548 | Several new options have been added, | |
5549 | many to support new features, | |
5550 | others to allow tuning that was previously available | |
5551 | only by recompiling. | |
de7324ac | 5552 | They are described in detail in Section 5.1.5. |
f13b6b36 | 5553 | Briefly, |
859d056a EA |
5554 | .ip b |
5555 | Insist on a minimum number of disk blocks. | |
f13b6b36 EA |
5556 | .ip C |
5557 | Set checkpoint interval. | |
5558 | .ip E | |
5559 | Default error message. | |
de7324ac EA |
5560 | .ip G |
5561 | Enable GECOS matching. | |
f13b6b36 EA |
5562 | .ip h |
5563 | Maximum hop count. | |
5564 | .ip J | |
5565 | Forward file path. | |
5566 | .ip k | |
5567 | Connection cache size | |
5568 | .ip K | |
5569 | Connection cache lifetime. | |
859d056a EA |
5570 | .ip p |
5571 | Privacy options. | |
f13b6b36 EA |
5572 | .ip U |
5573 | User database spec. | |
f13b6b36 EA |
5574 | .ip 8 |
5575 | Run eight bit clean. | |
859d056a EA |
5576 | .sh 2 "Extended Options" |
5577 | .pp | |
5578 | The | |
5579 | .b r | |
31e506e2 | 5580 | (read timeout), |
859d056a | 5581 | .b I |
31e506e2 EA |
5582 | (use BIND), |
5583 | and | |
5584 | .b T | |
5585 | (queue timeout) | |
859d056a EA |
5586 | options have been extended to pass in more information. |
5587 | .sh 2 "New Mailer Flag" | |
5588 | .pp | |
5589 | The | |
5590 | .b c | |
5591 | mailer flag will strip all comments | |
5592 | from addresses; | |
5593 | this should only be used as a last resort | |
5594 | when dealing with cranky mailers. | |
acbfac81 EA |
5595 | .sh 2 "New LHS Token" |
5596 | .pp | |
5597 | Version 6 allows | |
5598 | .b $@ | |
5599 | on the Left Hand Side of an | |
5600 | .q R | |
5601 | line to match zero tokens. | |
5602 | This is intended to be used to match the null input. | |
f13b6b36 EA |
5603 | .sh 2 "Bigger Defaults" |
5604 | .pp | |
acbfac81 | 5605 | Version 6 allows up to 100 rulesets instead of 30. |
f13b6b36 EA |
5606 | It is recommended that rulesets 0\-9 be reserved for |
5607 | .i sendmail 's | |
5608 | dedicated use in future releases. | |
5609 | .pp | |
5610 | The total number of MX records that can be used has been raised to 20. | |
5611 | .pp | |
5612 | The number of queued messages that can be handled at one time | |
5613 | has been raised from 600 to 1000. | |
d1e44f94 EA |
5614 | .sh 2 "Different Default Tuning Parameters" |
5615 | .pp | |
acbfac81 | 5616 | Version 6 has changed the default parameters |
d1e44f94 EA |
5617 | for tuning queue costs |
5618 | to make the number of recipients more important | |
5619 | than the size of the message (for small messages). | |
5620 | This is reasonable if you are connected with reasonably fast links. | |
de7324ac EA |
5621 | .sh 2 "Auto-Quoting in Addresses" |
5622 | .pp | |
5623 | Previously, the | |
5624 | .q "Full Name <email address>" | |
5625 | syntax would generate incorrect protocol output | |
5626 | if | |
5627 | .q "Full Name" | |
5628 | had special characters such as dot. | |
5629 | This version puts quotes around such names. | |
5630 | .sh 2 "Symbolic Names On Error Mailer" | |
5631 | .pp | |
5632 | Several names have been built in to the $@ portion of the $#error | |
5633 | mailer. | |
59baf33c EA |
5634 | .sh 2 "SMTP VRFY Doesn't Expand" |
5635 | .pp | |
5636 | Previous versions of | |
5637 | .i sendmail | |
5638 | treated VRFY and EXPN the same. | |
5639 | In this version, | |
5640 | VRFY doesn't expand aliases or follow .forward files. | |
5641 | .pp | |
5642 | As an optimization, if you run with your default delivery mode being | |
5643 | queue-only, | |
5644 | the RCPT command will also not chase aliases and .forward files. | |
5645 | It will chase them when it processes the queue. | |
337767a9 EA |
5646 | .sh 2 "[IPC] Mailers Allow Multiple Hosts" |
5647 | .pp | |
5648 | When an address resolves to a mailer that has | |
5649 | .q [IPC] | |
5650 | as its | |
5651 | .q Path , | |
5652 | the $@ part (host name) | |
5653 | can be a colon-separated list of hosts instead of a single hostname. | |
5654 | This asks sendmail to search the list for the first entry that is available | |
5655 | exactly as though it were an MX record. | |
5656 | The intent is to route internal traffic through internal networks | |
5657 | without publishing an MX record to the net. | |
5658 | MX expansion is still done on the individual items. | |
de7324ac EA |
5659 | .sh 2 "Portability and Security Enhancements" |
5660 | .pp | |
5661 | A number of internal changes have been made to enhance portability. | |
5662 | .pp | |
5663 | Several fixes have been made to increase the paranoia factor. | |
6d5ff626 EA |
5664 | .sh 1 "ACKNOWLEDGEMENTS" |
5665 | .pp | |
5666 | I've worked on | |
5667 | .i sendmail | |
5668 | for many years, | |
5669 | and many employers have been remarkably patient | |
5670 | about letting me work on a large project | |
5671 | that was not part of my official job. | |
5672 | This includes time on the INGRES Project at Berkeley, | |
5673 | at Britton Lee, | |
5674 | and again on the Mammoth Project at Berkeley. | |
5675 | .pp | |
5676 | Much of the second wave of improvements | |
5677 | should be credited to Bryan Costales of ICSI. | |
5678 | As he passed me drafts of his book on | |
5679 | .i sendmail | |
5680 | I was inspired to start working on things again. | |
5681 | Bryan was also available to bounce ideas off of. | |
5682 | .pp | |
5683 | Many, many people contributed chunks of code and ideas to | |
5684 | .i sendmail . | |
5685 | It has proven to be a group network effort. | |
50d4a65c EA |
5686 | Version 6 in particular was a group project. |
5687 | The following people made notable contributions: | |
5688 | .(l | |
5689 | Keith Bostic, CSRG, University of California, Berkeley | |
5690 | Michael J. Corrigan, University of California, San Diego | |
5691 | Bryan Costales, International Computer Science Institute | |
5692 | P{r (Pell) Emanuelsson | |
5693 | Craig Everhart, Transarc Corporation | |
5694 | Tom Ivar Helbekkmo, Norwegian School of Economics | |
5695 | Allan E. Johannesen, WPI | |
5696 | Takahiro Kanbe, FujiXerox | |
5697 | Brian Kantor, University of California, San Diego | |
5698 | Bruce Lilly, Sony U.S. | |
5699 | Nakamura Motonori, Kyoto University | |
5700 | John Gardiner Myers, Carnegie Mellon University | |
5701 | Neil Rickert, Northern Illinois University | |
5702 | Eric Wassenaar, National Institute for Nuclear and High Energy Physics, Amsterdam | |
5703 | Christophe Wolfhugel, INSA (???) | |
5704 | .)l | |
5705 | I apologize for anyone I have omitted, misspelled, misattributed, or | |
5706 | otherwise missed. | |
5707 | Many other people have contributed ideas, comments, and encouragement. | |
5708 | I appreciate their contribution as well. | |
f13b6b36 EA |
5709 | .++ A |
5710 | .+c "COMMAND LINE FLAGS" | |
5711 | .ba 0 | |
5712 | .nr ii 1i | |
5713 | .pp | |
5714 | Arguments must be presented with flags before addresses. | |
5715 | The flags are: | |
5716 | .ip \-b\fIx\fP | |
5717 | Set operation mode to | |
5718 | .i x . | |
5719 | Operation modes are: | |
5720 | .(b | |
5721 | .ta 4n | |
5722 | m Deliver mail (default) | |
5723 | s Speak SMTP on input side | |
5724 | d Run as a daemon | |
5725 | t Run in test mode | |
5726 | v Just verify addresses, don't collect or deliver | |
5727 | i Initialize the alias database | |
5728 | p Print the mail queue | |
5729 | z Freeze the configuration file | |
5730 | .)b | |
5731 | .ip \-C\fIfile\fP | |
5732 | Use a different configuration file. | |
5733 | .i Sendmail | |
5734 | runs as the invoking user (rather than root) | |
5735 | when this flag is specified. | |
5736 | .ip \-d\fIlevel\fP | |
5737 | Set debugging level. | |
5738 | .ip "\-f\ \fIaddr\fP" | |
5739 | The sender's machine address is | |
5740 | .i addr . | |
f13b6b36 EA |
5741 | .ip \-F\fIname\fP |
5742 | Sets the full name of this user to | |
5743 | .i name . | |
5744 | .ip "\-h\ \fIcnt\fP" | |
5745 | Sets the | |
5746 | .q "hop count" | |
5747 | to | |
5748 | .i cnt . | |
5749 | This represents the number of times this message has been processed | |
5750 | by | |
5751 | .i sendmail | |
5752 | (to the extent that it is supported by the underlying networks). | |
5753 | .i Cnt | |
5754 | is incremented during processing, | |
5755 | and if it reaches | |
5756 | MAXHOP | |
5757 | (currently 30) | |
5758 | .i sendmail | |
5759 | throws away the message with an error. | |
5760 | .ip \-n | |
5761 | Don't do aliasing or forwarding. | |
5762 | .ip "\-r\ \fIaddr\fP" | |
5763 | An obsolete form of | |
5764 | .b \-f . | |
5765 | .ip \-o\fIx\|value\fP | |
5766 | Set option | |
5767 | .i x | |
5768 | to the specified | |
5769 | .i value . | |
5770 | These options are described in Appendix B. | |
5771 | .ip \-p\fIprotocol\fP | |
5772 | Set the sending protocol. | |
5773 | Programs are encouraged to set this. | |
5774 | The protocol field can be in the form | |
5775 | .i protocol \c | |
5776 | .b : \c | |
5777 | .i host | |
5778 | to set both the sending protocol and sending host. | |
5779 | For example, | |
5780 | .q \-pUUCP:uunet | |
5781 | sets the sending protocol to UUCP | |
5782 | and the sending host to uunet. | |
5783 | (Some existing programs use \-oM to set the r and s macros; | |
5784 | this is equivalent to using \-p.) | |
5785 | .ip \-q\fItime\fP | |
5786 | Try to process the queued up mail. | |
5787 | If the time is given, | |
5788 | a sendmail will run through the queue at the specified interval | |
5789 | to deliver queued mail; | |
5790 | otherwise, it only runs once. | |
0780838b EA |
5791 | .ip \-q\fIXstring\fP |
5792 | Run the queue once, | |
5793 | limiting the jobs to those matching | |
5794 | .i Xstring . | |
5795 | The key letter | |
5796 | .i X | |
5797 | can be | |
5798 | .b I | |
5799 | to limit based on queue identifier, | |
5800 | .b R | |
5801 | to limit based on recipient, | |
5802 | or | |
5803 | .b S | |
5804 | to limit based on sender. | |
5805 | A particular queued job is accepted if one of the corresponding addresses | |
5806 | contains the indicated | |
5807 | .i string . | |
f13b6b36 EA |
5808 | .ip \-t |
5809 | Read the header for | |
5810 | .q To: , | |
5811 | .q Cc: , | |
5812 | and | |
5813 | .q Bcc: | |
5814 | lines, and send to everyone listed in those lists. | |
5815 | The | |
5816 | .q Bcc: | |
5817 | line will be deleted before sending. | |
5818 | Any addresses in the argument vector will be deleted | |
5819 | from the send list. | |
daae36f7 | 5820 | .pp |
f13b6b36 EA |
5821 | There are a number of options that may be specified as |
5822 | primitive flags | |
5823 | (provided for compatibility with | |
5824 | .i delivermail ). | |
5825 | These are the e, i, m, and v options. | |
5826 | Also, | |
5827 | the f option | |
5828 | may be specified as the | |
5829 | .b \-s | |
5830 | flag. | |
5831 | .+c "QUEUE FILE FORMATS" | |
5832 | .pp | |
5833 | This appendix describes the format of the queue files. | |
5834 | These files live in the directory defined by the | |
5835 | .b Q | |
5836 | option in the | |
5837 | .i sendmail.cf | |
5838 | file, usually | |
5839 | .i /var/spool/mqueue | |
daae36f7 | 5840 | or |
f13b6b36 EA |
5841 | .i /usr/spool/mqueue . |
5842 | .pp | |
5843 | All queue files have the name | |
b3c10f97 | 5844 | \fIx\fP\|\fBf\fP\fIAAA99999\fP |
f13b6b36 | 5845 | where |
b3c10f97 | 5846 | .i AAA99999 |
f13b6b36 EA |
5847 | is the |
5848 | .i id | |
5849 | for this message | |
5850 | and the | |
5851 | .i x | |
5852 | is a type. | |
b3c10f97 EA |
5853 | The first letter of the id encodes the hour of the day |
5854 | that the message was received by the system | |
5855 | (with A being the hour between midnight and 1:00AM). | |
f13b6b36 EA |
5856 | All files with the same id collectively define one message. |
5857 | .pp | |
5858 | The types are: | |
5859 | .nr ii 0.5i | |
5860 | .ip d | |
5861 | The data file. | |
5862 | The message body (excluding the header) is kept in this file. | |
5863 | .ip l | |
5864 | The lock file. | |
5865 | If this file exists, | |
5866 | the job is currently being processed, | |
5867 | and a queue run will not process the file. | |
5868 | For that reason, | |
5869 | an extraneous | |
5870 | .b lf | |
5871 | file can cause a job to apparently disappear | |
5872 | (it will not even time out!). | |
5873 | [Actually, this file is obsolete on most systems that support the | |
5874 | .b flock | |
daae36f7 | 5875 | or |
f13b6b36 EA |
5876 | .b lockf |
5877 | system calls.] | |
5878 | .ip n | |
5879 | This file is created when an id is being created. | |
5880 | It is a separate file to insure that no mail can ever be destroyed | |
5881 | due to a race condition. | |
5882 | It should exist for no more than a few milliseconds | |
5883 | at any given time. | |
5884 | [This is only used on old versions of | |
5885 | sendmail; | |
5886 | it is not used | |
5887 | on newer versions.] | |
5888 | .ip q | |
5889 | The queue control file. | |
5890 | This file contains the information necessary to process the job. | |
5891 | .ip t | |
5892 | A temporary file. | |
5893 | These are an image of the | |
5894 | .b qf | |
5895 | file when it is being rebuilt. | |
5896 | It should be renamed to a | |
5897 | .b qf | |
5898 | file very quickly. | |
5899 | .ip x | |
5900 | A transcript file, | |
5901 | existing during the life of a session | |
5902 | showing everything that happens | |
5903 | during that session. | |
367a5dcd | 5904 | .pp |
f13b6b36 EA |
5905 | The |
5906 | .b qf | |
5907 | file is structured as a series of lines | |
5908 | each beginning with a code letter. | |
5909 | The lines are as follows: | |
5910 | .ip D | |
5911 | The name of the data file. | |
5912 | There may only be one of these lines. | |
5913 | .ip H | |
5914 | A header definition. | |
5915 | There may be any number of these lines. | |
5916 | The order is important: | |
5917 | they represent the order in the final message. | |
5918 | These use the same syntax | |
5919 | as header definitions in the configuration file. | |
5920 | .ip C | |
5921 | The controlling address. | |
5922 | Recipient addresses following this line | |
5923 | will be flagged as having resulted from an alias of this name. | |
5924 | This affect the actual UNIX user id used for delivery. | |
5925 | .ip R | |
5926 | A recipient address. | |
5927 | This will normally be completely aliased, | |
5928 | but is actually realiased when the job is processed. | |
5929 | There will be one line | |
5930 | for each recipient. | |
5931 | .ip S | |
5932 | The sender address. | |
5933 | There may only be one of these lines. | |
5934 | .ip E | |
5935 | An error address. | |
5936 | If any such lines exist, | |
5937 | they represent the addresses that should receive error messages. | |
5938 | .ip T | |
5939 | The job creation time. | |
5940 | This is used to compute when to time out the job. | |
5941 | .ip P | |
5942 | The current message priority. | |
5943 | This is used to order the queue. | |
5944 | Higher numbers mean lower priorities. | |
5945 | The priority changes | |
5946 | as the message sits in the queue. | |
5947 | The initial priority depends on the message class | |
5948 | and the size of the message. | |
5949 | .ip M | |
5950 | A message. | |
5951 | This line is printed by the | |
5952 | .i mailq | |
5953 | command, | |
5954 | and is generally used to store status information. | |
5955 | It can contain any text. | |
d93f0185 EA |
5956 | .ip F |
5957 | Flag bits, represented as one letter per flag. | |
5958 | Defined flag bits are | |
5959 | .b r | |
5960 | indicating that this is a response message | |
5961 | and | |
5962 | .b w | |
5963 | indicating that a warning message has been sent | |
5964 | announcing that the mail has been delayed. | |
f13b6b36 EA |
5965 | .ip $ |
5966 | A macro definition. | |
5967 | The values of certain macros | |
5968 | (as of this writing, only | |
5969 | .b $r | |
5970 | and | |
5971 | .b $s ) | |
5972 | are passed through to the queue run phase. | |
40eb61ea EA |
5973 | .ip B |
5974 | The body type. | |
5975 | The remainder of the line is a text string defining the body type. | |
5976 | If this field is missing, | |
5977 | the body type is assumed to be | |
5978 | .q "undefined" | |
5979 | and no special processing is attempted. | |
5980 | Legal values are | |
5981 | .q 7BIT | |
5982 | and | |
5983 | .q 8BITMIME . | |
367a5dcd | 5984 | .pp |
f13b6b36 EA |
5985 | As an example, |
5986 | the following is a queue file sent to | |
5987 | .q eric@mammoth.Berkeley.EDU | |
5988 | and | |
5989 | .q bostic@okeeffe.CS.Berkeley.EDU \**: | |
5990 | .(f | |
5991 | \**This example is contrived and probably inaccurate for your environment. | |
5992 | Glance over it to get an idea; | |
5993 | nothing can replace looking at what your own system generates. | |
5994 | .)f | |
5995 | .(b | |
5996 | P835771 | |
5997 | T404261372 | |
b3c10f97 | 5998 | DdfAAA13557 |
f13b6b36 EA |
5999 | Seric |
6000 | Cdaemon | |
6001 | Eowner-sendmail@vangogh.CS.Berkeley.EDU | |
6002 | Ceric | |
6003 | Reric@mammoth.Berkeley.EDU | |
6004 | Rbostic@okeeffe.CS.Berkeley.EDU | |
6005 | H?P?return-path: <owner-sendmail@vangogh.CS.Berkeley.EDU> | |
b3c10f97 | 6006 | Hreceived: by vangogh.CS.Berkeley.EDU (5.108/2.7) id AAA06703; |
f13b6b36 EA |
6007 | Fri, 17 Jul 92 00:28:55 -0700 |
6008 | Hreceived: from mail.CS.Berkeley.EDU by vangogh.CS.Berkeley.EDU (5.108/2.7) | |
b3c10f97 | 6009 | id AAA06698; Fri, 17 Jul 92 00:28:54 -0700 |
f13b6b36 EA |
6010 | Hreceived: from [128.32.31.21] by mail.CS.Berkeley.EDU (5.96/2.5) |
6011 | id AA22777; Fri, 17 Jul 92 03:29:14 -0400 | |
6012 | Hreceived: by foo.bar.baz.de (5.57/Ultrix3.0-C) | |
6013 | id AA22757; Fri, 17 Jul 92 09:31:25 GMT | |
6014 | H?F?from: eric@foo.bar.baz.de (Eric Allman) | |
6015 | H?x?full-name: Eric Allman | |
6016 | Hmessage-id: <9207170931.AA22757@foo.bar.baz.de> | |
6017 | HTo: sendmail@vangogh.CS.Berkeley.EDU | |
6018 | Hsubject: this is an example message | |
6019 | .)b | |
6020 | This shows the name of the data file, | |
6021 | the person who sent the message, | |
6022 | the submission time | |
6023 | (in seconds since January 1, 1970), | |
6024 | the message priority, | |
6025 | the message class, | |
6026 | the recipients, | |
6027 | and the headers for the message. | |
69a914e1 EA |
6028 | .+c "SUMMARY OF SUPPORT FILES" |
6029 | .pp | |
6030 | This is a summary of the support files | |
6031 | that | |
6032 | .i sendmail | |
6033 | creates or generates. | |
f13b6b36 EA |
6034 | Many of these can be changed by editing the sendmail.cf file; |
6035 | check there to find the actual pathnames. | |
69a914e1 | 6036 | .nr ii 1i |
55c435aa | 6037 | .ip "/usr/\*(SD/sendmail" |
69a914e1 EA |
6038 | The binary of |
6039 | .i sendmail . | |
6040 | .ip /usr/bin/newaliases | |
55c435aa | 6041 | A link to /usr/\*(SD/sendmail; |
69a914e1 | 6042 | causes the alias database to be rebuilt. |
74b6e641 EA |
6043 | Running this program is completely equivalent to giving |
6044 | .i sendmail | |
6045 | the | |
6046 | .b \-bi | |
6047 | flag. | |
69a914e1 EA |
6048 | .ip /usr/bin/mailq |
6049 | Prints a listing of the mail queue. | |
74b6e641 EA |
6050 | This program is equivalent to using the |
6051 | .b \-bp | |
6052 | flag to | |
6053 | .i sendmail . | |
daae36f7 | 6054 | .ip /etc/sendmail.cf |
69a914e1 EA |
6055 | The configuration file, |
6056 | in textual form. | |
daae36f7 | 6057 | .ip /etc/sendmail.fc |
69a914e1 EA |
6058 | The configuration file |
6059 | represented as a memory image. | |
6060 | .ip /usr/lib/sendmail.hf | |
6061 | The SMTP help file. | |
daae36f7 | 6062 | .ip /etc/sendmail.st |
69a914e1 | 6063 | A statistics file; need not be present. |
859d056a EA |
6064 | .ip /etc/sendmail.pid |
6065 | Created in daemon mode; | |
6066 | it contains the process id of the current SMTP daemon. | |
6067 | If you use this in scripts; | |
6068 | use ``head \-1'' to get just the first line; | |
6069 | later versions of | |
6070 | .i sendmail | |
6071 | may add information to subsequent lines. | |
daae36f7 | 6072 | .ip /etc/aliases |
69a914e1 | 6073 | The textual version of the alias file. |
daae36f7 | 6074 | .ip /etc/aliases.{pag,dir} |
69a914e1 | 6075 | The alias file in |
74b6e641 | 6076 | .i dbm \|(3) |
69a914e1 | 6077 | format. |
daae36f7 | 6078 | .ip /var/spool/mqueue |
69a914e1 EA |
6079 | The directory in which the mail queue |
6080 | and temporary files reside. | |
daae36f7 | 6081 | .ip /var/spool/mqueue/qf* |
69a914e1 | 6082 | Control (queue) files for messages. |
daae36f7 | 6083 | .ip /var/spool/mqueue/df* |
69a914e1 | 6084 | Data files. |
daae36f7 | 6085 | .ip /var/spool/mqueue/tf* |
69a914e1 EA |
6086 | Temporary versions of the qf files, |
6087 | used during queue file rebuild. | |
daae36f7 | 6088 | .ip /var/spool/mqueue/xf* |
69a914e1 | 6089 | A transcript of the current session. |
28719ec2 JB |
6090 | .\".ro |
6091 | .\".ls 1 | |
6092 | .\".tp | |
6093 | .\".sp 2i | |
6094 | .\".in 0 | |
6095 | .\".ce 100 | |
6096 | .\".sz 24 | |
6097 | .\".b SENDMAIL | |
6098 | .\".sz 14 | |
6099 | .\".sp | |
6100 | .\"INSTALLATION AND OPERATION GUIDE | |
6101 | .\".sp | |
6102 | .\".sz 10 | |
6103 | .\"Eric Allman | |
6104 | .\"Britton-Lee, Inc. | |
6105 | .\".sp | |
50d4a65c | 6106 | .\"Version 6.42 |
28719ec2 JB |
6107 | .\".ce 0 |
6108 | .pn 2 | |
6109 | .bp | |
4da134f8 | 6110 | .ce |
74b6e641 | 6111 | .sz 12 |
4da134f8 | 6112 | TABLE OF CONTENTS |
74b6e641 | 6113 | .sz 10 |
28719ec2 | 6114 | .sp |
3702dbcc EA |
6115 | .\" remove some things to avoid "out of temp file space" problem |
6116 | .rm sh | |
6117 | .rm (x | |
6118 | .rm )x | |
6119 | .rm ip | |
6120 | .rm pp | |
6121 | .rm lp | |
6122 | .rm he | |
6123 | .rm fo | |
6124 | .rm eh | |
6125 | .rm oh | |
6126 | .rm ef | |
6127 | .rm of | |
4da134f8 | 6128 | .xp |