home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / sendmail-5.67 / doc / 07.sendmailop / op.me < prev    next >
Encoding:
Text File  |  1992-02-20  |  89.5 KB  |  3,942 lines

  1. .\" Copyright (c) 1983 Eric P. Allman
  2. .\" Copyright (c) 1983 The Regents of the University of California.
  3. .\" All rights reserved.
  4. .\"
  5. .\" Redistribution and use in source and binary forms, with or without
  6. .\" modification, are permitted provided that the following conditions
  7. .\" are met:
  8. .\" 1. Redistributions of source code must retain the above copyright
  9. .\"    notice, this list of conditions and the following disclaimer.
  10. .\" 2. Redistributions in binary form must reproduce the above copyright
  11. .\"    notice, this list of conditions and the following disclaimer in the
  12. .\"    documentation and/or other materials provided with the distribution.
  13. .\" 3. All advertising materials mentioning features or use of this software
  14. .\"    must display the following acknowledgement:
  15. .\"    This product includes software developed by the University of
  16. .\"    California, Berkeley and its contributors.
  17. .\" 4. Neither the name of the University nor the names of its contributors
  18. .\"    may be used to endorse or promote products derived from this software
  19. .\"    without specific prior written permission.
  20. .\"
  21. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  22. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  23. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  24. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  25. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  26. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  27. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  28. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  29. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  30. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  31. .\" SUCH DAMAGE.
  32. .\"
  33. .\"    @(#)op.me    5.13 (Berkeley) 4/17/91
  34. .\"
  35. .\" eqn % | troff -me
  36. .\"if n .ls 2
  37. .\".he 'Sendmail Installation and Operation Guide''%'
  38. .\".fo 'Version 5.13''Last Mod 4/17/91'
  39. .eh 'SMM:07-%''Sendmail Installation and Operation Guide'
  40. .oh 'Sendmail Installation and Operation Guide''SMM:07-%'
  41. .nr si 3n
  42. .de $0
  43. .(x
  44. .in \\$3u*3n
  45. .ti -3n
  46. \\$2.  \\$1
  47. .)x
  48. ..
  49. .de $C
  50. .(x
  51. .in 0
  52. \\$1 \\$2.  \\$3
  53. .)x
  54. ..
  55. .+c
  56. .(l C
  57. .sz 16
  58. .b SENDMAIL
  59. .sz 12
  60. .sp
  61. .b "INSTALLATION AND OPERATION GUIDE"
  62. .sz 10
  63. .sp
  64. .r
  65. Eric Allman
  66. University of California, Berkeley
  67. Mammoth Project
  68. .sp
  69. Version 5.13
  70. .sp
  71. For Sendmail Version 5.61
  72. .)l
  73. .sp 2
  74. .pp
  75. .i Sendmail
  76. implements a general purpose internetwork mail routing facility
  77. under the UNIX*
  78. .(f
  79. *UNIX is a trademark of Bell Laboratories.
  80. .)f
  81. operating system.
  82. It is not tied to any one transport protocol \*-
  83. its function may be likened to a crossbar switch,
  84. relaying messages from one domain into another.
  85. In the process,
  86. it can do a limited amount of message header editing
  87. to put the message into a format that is appropriate
  88. for the receiving domain.
  89. All of this is done under the control of a configuration file.
  90. .pp
  91. Due to the requirements of flexibility
  92. for
  93. .i sendmail ,
  94. the configuration file can seem somewhat unapproachable.
  95. However, there are only a few basic configurations
  96. for most sites,
  97. for which standard configuration files have been supplied.
  98. Most other configurations
  99. can be built by adjusting an existing configuration files
  100. incrementally.
  101. .pp
  102. Although
  103. .i sendmail
  104. is intended to run
  105. without the need for monitoring,
  106. it has a number of features
  107. that may be used to monitor or adjust the operation
  108. under unusual circumstances.
  109. These features are described.
  110. .pp
  111. Section one describes how to do a basic
  112. .i sendmail
  113. installation.
  114. Section two
  115. explains the day-to-day information you should know
  116. to maintain your mail system.
  117. If you have a relatively normal site,
  118. these two sections should contain sufficient information
  119. for you to install
  120. .i sendmail
  121. and keep it happy.
  122. Section three
  123. describes some parameters that may be safely tweaked.
  124. Section four
  125. has information regarding the command line arguments.
  126. Section five
  127. contains the nitty-gritty information about the configuration
  128. file.
  129. This section is for masochists
  130. and people who must write their own configuration file.
  131. The appendixes give a brief
  132. but detailed explanation of a number of features
  133. not described in the rest of the paper.
  134. .pp
  135. The references in this paper are actually found
  136. in the companion paper
  137. .ul
  138. Sendmail \- An Internetwork Mail Router.
  139. This other paper should be read before this manual
  140. to gain a basic understanding
  141. of how the pieces fit together.
  142. .pn 4
  143. .bp
  144. .sh 1 "BASIC INSTALLATION"
  145. .pp
  146. There are two basic steps to installing sendmail.
  147. The hard part is to build the configuration table.
  148. This is a file that sendmail reads when it starts up
  149. that describes the mailers it knows about,
  150. how to parse addresses,
  151. how to rewrite the message header,
  152. and the settings of various options.
  153. Although the configuration table is quite complex,
  154. a configuration can usually be built
  155. by adjusting an existing off-the-shelf configuration.
  156. The second part is actually doing the installation,
  157. i.e., creating the necessary files, etc.
  158. .pp
  159. The remainder of this section will describe the installation of sendmail
  160. assuming you can use one of the existing configurations
  161. and that the standard installation parameters are acceptable.
  162. All pathnames and examples
  163. are given from the root of the
  164. .i sendmail
  165. subtree,
  166. normally
  167. .i /usr/src/usr.lib/sendmail
  168. on 4.3BSD.
  169. .sh 2 "Off-The-Shelf Configurations"
  170. .pp
  171. Configuration files currently in use at Berkeley are in
  172. the directory
  173. .i cf
  174. of the sendmail directory.
  175. This directory contains three subdirectories:
  176. .i cf ,
  177. .i m4 ,
  178. and
  179. .i sitedep .
  180. The directory
  181. .i cf/m4
  182. contains site-independent
  183. .i m4 (1)
  184. include files that have information common to all configuration files,
  185. while
  186. .i cf/sitedep
  187. contains
  188. .i m4 (1)
  189. include files that have site-specific information in them.
  190. These files are used by the master configuration (``.mc'')
  191. in
  192. .i cf/cf
  193. and produce standard configuration files (with
  194. .q .cf
  195. suffix) when run through
  196. .i m4 (1).
  197. .pp
  198. Three off the shelf configurations are supplied
  199. to handle the basic cases:
  200. .np
  201. Internet sites running the nameserver
  202. (or using host tables wherein the fully-qualfied domain
  203. name of each host is listed first)
  204. can use
  205. .i cf/tcpproto.cf .
  206. For simple sites,
  207. you should be able to use this file without modification.
  208. This file is not in
  209. .i m4
  210. format.
  211. .np
  212. UUCP only sites can use
  213. .i cf/uucpproto.cf .
  214. This file is not in
  215. .i m4
  216. format.
  217. .np
  218. A group of machines at a single site
  219. connected by an ethernet (or other networking
  220. that supports TCP/IP)
  221. with (only) one host connected to the outside world
  222. via UUCP
  223. is represented by two configuration files:
  224. .i cf/tcpuucpproto.cf
  225. should be installed on the host with outside connections
  226. and
  227. .i cf/tcpproto.cf
  228. should be installed on all other hosts.
  229. .pp
  230. Some configuration will be needed in each of the
  231. above cases.
  232. Just be sure to correctly fill in the 
  233. .q blanks
  234. as shown in the instructions in the configuration file.
  235. Then install the file as
  236. .i /usr/lib/sendmail.cf .
  237. .pp
  238. If you are running a larger or more complex site, it
  239. is to your advantage to read the
  240. .q README
  241. file in the
  242. .i cf
  243. subdirectory.
  244. This file explains how to use
  245. .i m4 (1)
  246. to automatically create configuration files for
  247. non-standard situations.
  248. .sh 2 "Installation Using the Makefile"
  249. .pp
  250. A makefile exists in the root of the
  251. .i sendmail
  252. directory that will do all of these steps
  253. for a 4.3BSD system.
  254. It may have to be slightly tailored
  255. for use on other systems.
  256. .pp
  257. Before using this makefile, you should create a symbolic link from
  258. .i cf
  259. to the directory containing your configuration files.
  260. You should also have created your configuration file
  261. and left it in the file
  262. .q cf/\fIsystem\fP.cf
  263. where
  264. .i system
  265. is the name of your system
  266. (i.e., what is returned by
  267. .i hostname \|(1)).
  268. If you do not have
  269. .i hostname
  270. you can use the declaration
  271. .q HOST=\fIsystem\fP
  272. on the
  273. .i make \|(1)
  274. command line.
  275. You should also examine the file
  276. .i md/config.m4
  277. and change the
  278. .i m4
  279. macros there to reflect any libraries and compilation flags
  280. you may need.
  281. .pp
  282. The basic installation procedure is to type:
  283. .(b
  284. make
  285. make install
  286. make installcf
  287. .)b
  288. in the root directory of the
  289. .i sendmail
  290. distribution.
  291. This will make all binaries
  292. and install them in the standard places.
  293. The second and third
  294. .i make
  295. commands must be executed as the superuser (root).
  296. .sh 2 "Installation by Hand"
  297. .pp
  298. Along with building a configuration file,
  299. you will have to install the
  300. .i sendmail
  301. startup into your UNIX system.
  302. If you are doing this installation
  303. in conjunction with a regular Berkeley UNIX install,
  304. these steps will already be complete.
  305. Many of these steps will have to be executed as the superuser (root).
  306. .sh 3 "/usr/lib/sendmail"
  307. .pp
  308. The binary for sendmail is located in /usr/lib.
  309. If it becomes necessary to recompile and reinstall the
  310. entire system, the following sequence will do it:
  311. .(b
  312. cd src
  313. make clean
  314. make install
  315. .)b
  316. .sh 3 "/usr/lib/sendmail.cf"
  317. .pp
  318. The configuration file
  319. that you created earlier
  320. should be installed in /usr/lib/sendmail.cf:
  321. .(b
  322. cp cf/\fIsystem\fP.cf /usr/lib/sendmail.cf
  323. .)b
  324. .sh 3 "/usr/ucb/newaliases"
  325. .pp
  326. If you are running delivermail,
  327. it is critical that the
  328. .i newaliases
  329. command be replaced.
  330. This can just be a link to
  331. .i sendmail :
  332. .(b
  333. rm \-f /usr/ucb/newaliases
  334. ln /usr/lib/sendmail /usr/ucb/newaliases
  335. .)b
  336. .sh 3 "/usr/spool/mqueue"
  337. .pp
  338. The directory
  339. .i /usr/spool/mqueue
  340. should be created to hold the mail queue.
  341. This directory should be mode 755
  342. and owned by root.
  343. .sh 3 "/usr/lib/aliases*"
  344. .pp
  345. The system aliases are held in three files.
  346. The file
  347. .q /usr/lib/aliases
  348. is the master copy.
  349. A sample is given in
  350. .q lib/aliases
  351. which includes some aliases which
  352. .i must
  353. be defined:
  354. .(b
  355. cp lib/aliases /usr/lib/aliases
  356. .)b
  357. You should extend this file with any aliases that are apropos to your system.
  358. .pp
  359. Normally
  360. .i sendmail
  361. looks at a version of these files maintained by the
  362. .i dbm \|(3)
  363. routines.
  364. These are stored in
  365. .q /usr/lib/aliases.dir
  366. and
  367. .q /usr/lib/aliases.pag.
  368. These can initially be created as empty files,
  369. but they will have to be initialized promptly.
  370. These should be mode 644:
  371. .(b
  372. cp /dev/null /usr/lib/aliases.dir
  373. cp /dev/null /usr/lib/aliases.pag
  374. chmod 644 /usr/lib/aliases.*
  375. newaliases
  376. .)b
  377. .sh 3 "/usr/lib/sendmail.fc"
  378. .pp
  379. If you intend to install the frozen version of the configuration file
  380. (for quick startup)
  381. you should create the file /usr/lib/sendmail.fc
  382. and initialize it.
  383. This step may be safely skipped.
  384. .(b
  385. cp /dev/null /usr/lib/sendmail.fc
  386. /usr/lib/sendmail \-bz
  387. .)b
  388. .sh 3 "/etc/rc"
  389. .pp
  390. It will be necessary to start up the sendmail daemon when your system reboots.
  391. This daemon performs two functions:
  392. it listens on the SMTP socket for connections
  393. (to receive mail from a remote system)
  394. and it processes the queue periodically
  395. to insure that mail gets delivered when hosts come up.
  396. .pp
  397. Add the following lines to
  398. .q /etc/rc
  399. (or
  400. .q /etc/rc.local
  401. as appropriate)
  402. in the area where it is starting up the daemons:
  403. .(b
  404. if [ \-f /usr/lib/sendmail ]; then
  405.     (cd /usr/spool/mqueue; rm \-f [lnx]f*)
  406.     /usr/lib/sendmail \-bd \-q30m &
  407.     echo \-n ' sendmail' >/dev/console
  408. fi
  409. .)b
  410. The
  411. .q cd
  412. and
  413. .q rm
  414. commands insure that all lock files have been removed;
  415. extraneous lock files may be left around
  416. if the system goes down in the middle of processing a message.
  417. The line that actually invokes
  418. .i sendmail
  419. has two flags:
  420. .q \-bd
  421. causes it to listen on the SMTP port,
  422. and
  423. .q \-q30m
  424. causes it to run the queue every half hour.
  425. .pp
  426. If you are not running a version of UNIX
  427. that supports Berkeley TCP/IP,
  428. do not include the
  429. .b \-bd
  430. flag.
  431. .sh 3 "/usr/lib/sendmail.hf"
  432. .pp
  433. This is the help file used by the SMTP
  434. .b HELP
  435. command.
  436. It should be copied from
  437. .q lib/sendmail.hf :
  438. .(b
  439. cp lib/sendmail.hf /usr/lib
  440. .)b
  441. .sh 3 "/usr/lib/sendmail.st"
  442. .pp
  443. If you wish to collect statistics
  444. about your mail traffic,
  445. you should create the file
  446. .q /usr/lib/sendmail.st :
  447. .(b
  448. cp /dev/null /usr/lib/sendmail.st
  449. chmod 666 /usr/lib/sendmail.st
  450. .)b
  451. This file does not grow.
  452. It is printed with the program
  453. .q aux/mailstats.
  454. .sh 3 "/usr/ucb/newaliases"
  455. .pp
  456. If
  457. .i sendmail
  458. is invoked as
  459. .q newaliases,
  460. it will simulate the
  461. .b \-bi
  462. flag
  463. (i.e., will rebuild the alias database;
  464. see below).
  465. This should be a link to /usr/lib/sendmail.
  466. .sh 3 "/usr/ucb/mailq"
  467. .pp
  468. If
  469. .i sendmail
  470. is invoked as
  471. .q mailq,
  472. it will simulate the
  473. .b \-bp
  474. flag
  475. (i.e.,
  476. .i sendmail
  477. will print the contents of the mail queue;
  478. see below).
  479. This should be a link to /usr/lib/sendmail.
  480. .sh 1 "NORMAL OPERATIONS"
  481. .sh 2 "Quick Configuration Startup"
  482. .pp
  483. A fast version of the configuration file
  484. may be set up by using the
  485. .b \-bz
  486. flag:
  487. .(b
  488. /usr/lib/sendmail \-bz
  489. .)b
  490. This creates the file
  491. .i /usr/lib/sendmail.fc
  492. (\c
  493. .q "frozen configuration" ).
  494. This file is an image of
  495. .i sendmail 's
  496. data space after reading in the configuration file.
  497. If this file exists,
  498. it is used instead of
  499. .i /usr/lib/sendmail.cf
  500. .i sendmail.fc
  501. must be rebuilt manually every time
  502. .i sendmail.cf
  503. is changed.
  504. .pp
  505. The frozen configuration file will be ignored
  506. if a
  507. .b \-C
  508. flag is specified
  509. or if sendmail detects that it is out of date.
  510. However, the heuristics are not strong
  511. so this should not be trusted.
  512. .sh 2 "The System Log"
  513. .pp
  514. The system log is supported by the
  515. .i syslogd \|(8)
  516. program.
  517. .sh 3 "Format"
  518. .pp
  519. Each line in the system log
  520. consists of a timestamp,
  521. the name of the machine that generated it
  522. (for logging from several machines
  523. over the local area network),
  524. the word
  525. .q sendmail: ,
  526. and a message.
  527. .sh 3 "Levels"
  528. .pp
  529. If you have
  530. .i syslogd \|(8)
  531. or an equivalent installed,
  532. you will be able to do logging.
  533. There is a large amount of information that can be logged.
  534. The log is arranged as a succession of levels.
  535. At the lowest level
  536. only extremely strange situations are logged.
  537. At the highest level,
  538. even the most mundane and uninteresting events
  539. are recorded for posterity.
  540. As a convention,
  541. log levels under ten
  542. are considered
  543. .q useful;
  544. log levels above ten
  545. are usually for debugging purposes.
  546. .pp
  547. A complete description of the log levels
  548. is given in section 4.6.
  549. .sh 2 "The Mail Queue"
  550. .pp
  551. The mail queue should be processed transparently.
  552. However, you may find that manual intervention is sometimes necessary.
  553. For example,
  554. if a major host is down for a period of time
  555. the queue may become clogged.
  556. Although sendmail ought to recover gracefully when the host comes up,
  557. you may find performance unacceptably bad in the meantime.
  558. .sh 3 "Printing the queue"
  559. .pp
  560. The contents of the queue can be printed
  561. using the
  562. .i mailq
  563. command
  564. (or by specifying the
  565. .b \-bp
  566. flag to sendmail):
  567. .(b
  568. mailq
  569. .)b
  570. This will produce a listing of the queue id's,
  571. the size of the message,
  572. the date the message entered the queue,
  573. and the sender and recipients.
  574. .sh 3 "Format of queue files"
  575. .pp
  576. All queue files have the form
  577. \fIx\fP\|\fBf\fP\fIAA99999\fP
  578. where
  579. .i AA99999
  580. is the
  581. .i id
  582. for this file
  583. and the
  584. .i x
  585. is a type.
  586. The types are:
  587. .ip d
  588. The data file.
  589. The message body (excluding the header) is kept in this file.
  590. .ip l
  591. The lock file.
  592. If this file exists,
  593. the job is currently being processed,
  594. and a queue run will not process the file.
  595. For that reason,
  596. an extraneous
  597. .b lf
  598. file can cause a job to apparently disappear
  599. (it will not even time out!).
  600. .ip n
  601. This file is created when an id is being created.
  602. It is a separate file to insure that no mail can ever be destroyed
  603. due to a race condition.
  604. It should exist for no more than a few milliseconds
  605. at any given time.
  606. .ip q
  607. The queue control file.
  608. This file contains the information necessary to process the job.
  609. .ip t
  610. A temporary file.
  611. These are an image of the
  612. .b qf
  613. file when it is being rebuilt.
  614. It should be renamed to a
  615. .b qf
  616. file very quickly.
  617. .ip x
  618. A transcript file,
  619. existing during the life of a session
  620. showing everything that happens
  621. during that session.
  622. .pp
  623. The
  624. .b qf
  625. file is structured as a series of lines
  626. each beginning with a code letter.
  627. The lines are as follows:
  628. .ip D
  629. The name of the data file.
  630. There may only be one of these lines.
  631. .ip H
  632. A header definition.
  633. There may be any number of these lines.
  634. The order is important:
  635. they represent the order in the final message.
  636. These use the same syntax
  637. as header definitions in the configuration file.
  638. .ip R
  639. A recipient address.
  640. This will normally be completely aliased,
  641. but is actually realiased when the job is processed.
  642. There will be one line
  643. for each recipient.
  644. .ip S
  645. The sender address.
  646. There may only be one of these lines.
  647. .ip E
  648. An error address.
  649. If any such lines exist,
  650. they represent the addresses that should receive error messages.
  651. .ip T
  652. The job creation time.
  653. This is used to compute when to time out the job.
  654. .ip P
  655. The current message priority.
  656. This is used to order the queue.
  657. Higher numbers mean lower priorities.
  658. The priority changes
  659. as the message sits in the queue.
  660. The initial priority depends on the message class
  661. and the size of the message.
  662. .ip M
  663. A message.
  664. This line is printed by the
  665. .i mailq
  666. command,
  667. and is generally used to store status information.
  668. It can contain any text.
  669. .pp
  670. As an example,
  671. the following is a queue file sent to
  672. .q mckusick@calder
  673. and
  674. .q wnj :
  675. .(b
  676. DdfA13557
  677. Seric
  678. T404261372
  679. P132
  680. Rmckusick@calder
  681. Rwnj
  682. H?D?date: 23-Oct-82 15:49:32-PDT (Sat)
  683. H?F?from: eric (Eric Allman)
  684. H?x?full-name: Eric Allman
  685. Hsubject: this is an example message
  686. Hmessage-id: <8209232249.13557@UCBARPA.BERKELEY.EDU>
  687. Hreceived: by UCBARPA.BERKELEY.EDU (3.227 [10/22/82])
  688.     id A13557; 23-Oct-82 15:49:32-PDT (Sat)
  689. HTo: mckusick@calder, wnj
  690. .)b
  691. This shows the name of the data file,
  692. the person who sent the message,
  693. the submission time
  694. (in seconds since January 1, 1970),
  695. the message priority,
  696. the message class,
  697. the recipients,
  698. and the headers for the message.
  699. .sh 3 "Forcing the queue"
  700. .pp
  701. .i Sendmail
  702. should run the queue automatically
  703. at intervals.
  704. The algorithm is to read and sort the queue,
  705. and then to attempt to process all jobs in order.
  706. When it attempts to run the job,
  707. .i sendmail
  708. first checks to see if the job is locked.
  709. If so, it ignores the job.
  710. .pp
  711. There is no attempt to insure that only one queue processor
  712. exists at any time,
  713. since there is no guarantee that a job cannot take forever
  714. to process.
  715. Due to the locking algorithm,
  716. it is impossible for one job to freeze the queue.
  717. However,
  718. an uncooperative recipient host
  719. or a program recipient
  720. that never returns
  721. can accumulate many processes in your system.
  722. Unfortunately,
  723. there is no way to resolve this
  724. without violating the protocol.
  725. .pp
  726. In some cases,
  727. you may find that a major host going down
  728. for a couple of days
  729. may create a prohibitively large queue.
  730. This will result in
  731. .i sendmail
  732. spending an inordinate amount of time
  733. sorting the queue.
  734. This situation can be fixed by moving the queue to a temporary place
  735. and creating a new queue.
  736. The old queue can be run later when the offending host returns to service.
  737. .pp
  738. To do this,
  739. it is acceptable to move the entire queue directory:
  740. .(b
  741. cd /usr/spool
  742. mv mqueue omqueue; mkdir mqueue; chmod 755 mqueue
  743. .)b
  744. You should then kill the existing daemon
  745. (since it will still be processing in the old queue directory)
  746. and create a new daemon.
  747. .pp
  748. To run the old mail queue,
  749. run the following command:
  750. .(b
  751. /usr/lib/sendmail \-oQ/usr/spool/omqueue \-q
  752. .)b
  753. The
  754. .b \-oQ
  755. flag specifies an alternate queue directory
  756. and the
  757. .b \-q
  758. flag says to just run every job in the queue.
  759. If you have a tendency toward voyeurism,
  760. you can use the
  761. .b \-v
  762. flag to watch what is going on.
  763. .pp
  764. When the queue is finally emptied,
  765. you can remove the directory:
  766. .(b
  767. rmdir /usr/spool/omqueue
  768. .)b
  769. .sh 2 "The Alias Database"
  770. .pp
  771. The alias database exists in two forms.
  772. One is a text form,
  773. maintained in the file
  774. .i /usr/lib/aliases.
  775. The aliases are of the form
  776. .(b
  777. name: name1, name2, ...
  778. .)b
  779. Only local names may be aliased;
  780. e.g.,
  781. .(b
  782. eric@mit-xx: eric@berkeley.EDU
  783. .)b
  784. will not have the desired effect.
  785. Aliases may be continued by starting any continuation lines
  786. with a space or a tab.
  787. Blank lines and lines beginning with a sharp sign
  788. (\c
  789. .q # )
  790. are comments.
  791. .pp
  792. The second form is processed by the
  793. .i dbm \|(3)
  794. library.
  795. This form is in the files
  796. .i /usr/lib/aliases.dir
  797. and
  798. .i /usr/lib/aliases.pag.
  799. This is the form that
  800. .i sendmail
  801. actually uses to resolve aliases.
  802. This technique is used to improve performance.
  803. .sh 3 "Rebuilding the alias database"
  804. .pp
  805. The DBM version of the database
  806. may be rebuilt explicitly by executing the command
  807. .(b
  808. newaliases
  809. .)b
  810. This is equivalent to giving
  811. .i sendmail
  812. the
  813. .b \-bi
  814. flag:
  815. .(b
  816. /usr/lib/sendmail \-bi
  817. .)b
  818. .pp
  819. If the
  820. .q D
  821. option is specified in the configuration,
  822. .i sendmail
  823. will rebuild the alias database automatically
  824. if possible
  825. when it is out of date.
  826. The conditions under which it will do this are:
  827. .np
  828. The DBM version of the database is mode 666.   -or-
  829. .np
  830. .i Sendmail
  831. is running setuid to root.
  832. .lp
  833. Auto-rebuild can be dangerous
  834. on heavily loaded machines
  835. with large alias files;
  836. if it might take more than five minutes
  837. to rebuild the database,
  838. there is a chance that several processes will start the rebuild process
  839. simultaneously.
  840. .sh 3 "Potential problems"
  841. .pp
  842. There are a number of problems that can occur
  843. with the alias database.
  844. They all result from a
  845. .i sendmail
  846. process accessing the DBM version
  847. while it is only partially built.
  848. This can happen under two circumstances:
  849. One process accesses the database
  850. while another process is rebuilding it,
  851. or the process rebuilding the database dies
  852. (due to being killed or a system crash)
  853. before completing the rebuild.
  854. .pp
  855. Sendmail has two techniques to try to relieve these problems.
  856. First, it ignores interrupts while rebuilding the database;
  857. this avoids the problem of someone aborting the process
  858. leaving a partially rebuilt database.
  859. Second,
  860. at the end of the rebuild
  861. it adds an alias of the form
  862. .(b
  863. @: @
  864. .)b
  865. (which is not normally legal).
  866. Before sendmail will access the database,
  867. it checks to insure that this entry exists\**.
  868. .(f
  869. \**The
  870. .q a
  871. option is required in the configuration
  872. for this action to occur.
  873. This should normally be specified
  874. unless you are running
  875. .i delivermail
  876. in parallel with
  877. .i sendmail.
  878. .)f
  879. .i Sendmail
  880. will wait for this entry to appear,
  881. at which point it will force a rebuild itself\**.
  882. .(f
  883. \**Note:
  884. the
  885. .q D
  886. option must be specified in the configuration file
  887. for this operation to occur.
  888. If the
  889. .q D
  890. option is not specified,
  891. a warning message is generated and
  892. .i sendmail
  893. continues.
  894. .)f
  895. .sh 3 "List owners"
  896. .pp
  897. If an error occurs on sending to a certain address,
  898. say
  899. .q \fIx\fP ,
  900. .i sendmail
  901. will look for an alias
  902. of the form
  903. .q owner-\fIx\fP
  904. to receive the errors.
  905. This is typically useful
  906. for a mailing list
  907. where the submitter of the list
  908. has no control over the maintenance of the list itself;
  909. in this case the list maintainer would be the owner of the list.
  910. For example:
  911. .(b
  912. unix-wizards: eric@ucbarpa, wnj@monet, nosuchuser,
  913.     sam@matisse
  914. owner-unix-wizards: eric@ucbarpa
  915. .)b
  916. would cause
  917. .q eric@ucbarpa
  918. to get the error that will occur
  919. when someone sends to
  920. unix-wizards
  921. due to the inclusion of
  922. .q nosuchuser
  923. on the list.
  924. .sh 2 "Per-User Forwarding (.forward Files)"
  925. .pp
  926. As an alternative to the alias database,
  927. any user may put a file with the name
  928. .q .forward
  929. in his or her home directory.
  930. If this file exists,
  931. .i sendmail
  932. redirects mail for that user
  933. to the list of addresses listed in the .forward file.
  934. For example, if the home directory for user
  935. .q mckusick
  936. has a .forward file with contents:
  937. .(b
  938. mckusick@ernie
  939. kirk@calder
  940. .)b
  941. then any mail arriving for
  942. .q mckusick
  943. will be redirected to the specified accounts.
  944. .sh 2 "Special Header Lines"
  945. .pp
  946. Several header lines have special interpretations
  947. defined by the configuration file.
  948. Others have interpretations built into
  949. .i sendmail
  950. that cannot be changed without changing the code.
  951. These builtins are described here.
  952. .sh 3 "Return-Receipt-To:"
  953. .pp
  954. If this header is sent,
  955. a message will be sent to any specified addresses
  956. when the final delivery is complete,
  957. that is,
  958. when successfully delivered to a mailer with the
  959. .b l
  960. flag (local delivery) set in the mailer descriptor.
  961. .sh 3 "Errors-To:"
  962. .pp
  963. If errors occur anywhere during processing,
  964. this header will cause error messages to go to
  965. the listed addresses
  966. rather than to the sender.
  967. This is intended for mailing lists.
  968. .sh 3 "Apparently-To:"
  969. .pp
  970. If a message comes in with no recipients listed in the message
  971. (in a To:, Cc:, or Bcc: line)
  972. then
  973. .i sendmail
  974. will add an
  975. .q "Apparently-To:"
  976. header line for any recipients it is aware of.
  977. This is not put in as a standard recipient line
  978. to warn any recipients that the list is not complete.
  979. .pp
  980. At least one recipient line is required under RFC 822.
  981. .sh 1 "ARGUMENTS"
  982. .pp
  983. The complete list of arguments to
  984. .i sendmail
  985. is described in detail in Appendix A.
  986. Some important arguments are described here.
  987. .sh 2 "Queue Interval"
  988. .pp
  989. The amount of time between forking a process
  990. to run through the queue
  991. is defined by the
  992. .b \-q
  993. flag.
  994. If you run in mode
  995. .b f
  996. or
  997. .b a
  998. this can be relatively large,
  999. since it will only be relevant
  1000. when a host that was down comes back up.
  1001. If you run in
  1002. .b q
  1003. mode
  1004. it should be relatively short,
  1005. since it defines the maximum amount of time that a message
  1006. may sit in the queue.
  1007. .sh 2 "Daemon Mode"
  1008. .pp
  1009. If you allow incoming mail over an IPC connection,
  1010. you should have a daemon running.
  1011. This should be set by your
  1012. .i /etc/rc
  1013. file using the
  1014. .b \-bd
  1015. flag.
  1016. The
  1017. .b \-bd
  1018. flag and the
  1019. .b \-q
  1020. flag may be combined in one call:
  1021. .(b
  1022. /usr/lib/sendmail \-bd \-q30m
  1023. .)b
  1024. .sh 2 "Forcing the Queue"
  1025. .pp
  1026. In some cases you may find that the queue has gotten clogged for some reason.
  1027. You can force a queue run
  1028. using the
  1029. .b \-q
  1030. flag (with no value).
  1031. It is entertaining to use the
  1032. .b \-v
  1033. flag (verbose)
  1034. when this is done to watch what happens:
  1035. .(b
  1036. /usr/lib/sendmail \-q \-v
  1037. .)b
  1038. .sh 2 "Debugging"
  1039. .pp
  1040. There are a fairly large number of debug flags
  1041. built into
  1042. .i sendmail .
  1043. Each debug flag has a number and a level,
  1044. where higher levels means to print out more information.
  1045. The convention is that levels greater than nine are
  1046. .q absurd,
  1047. i.e.,
  1048. they print out so much information that you wouldn't normally
  1049. want to see them except for debugging that particular piece of code.
  1050. Debug flags are set using the
  1051. .b \-d
  1052. option;
  1053. the syntax is:
  1054. .(b
  1055. .ta \w'debug-option  'u
  1056. debug-flag:    \fB\-d\fP debug-list
  1057. debug-list:    debug-option [ , debug-option ]
  1058. debug-option:    debug-range [ . debug-level ]
  1059. debug-range:    integer | integer \- integer
  1060. debug-level:    integer
  1061. .)b
  1062. where spaces are for reading ease only.
  1063. For example,
  1064. .(b
  1065. \-d12    Set flag 12 to level 1
  1066. \-d12.3    Set flag 12 to level 3
  1067. \-d3-17    Set flags 3 through 17 to level 1
  1068. \-d3-17.4    Set flags 3 through 17 to level 4
  1069. .)b
  1070. For a complete list of the available debug flags
  1071. you will have to look at the code
  1072. (they are too dynamic to keep this documentation up to date).
  1073. .sh 2 "Trying a Different Configuration File"
  1074. .pp
  1075. An alternative configuration file
  1076. can be specified using the
  1077. .b \-C
  1078. flag; for example,
  1079. .(b
  1080. /usr/lib/sendmail \-Ctest.cf
  1081. .)b
  1082. uses the configuration file
  1083. .i test.cf
  1084. instead of the default
  1085. .i /usr/lib/sendmail.cf.
  1086. If the
  1087. .b \-C
  1088. flag has no value
  1089. it defaults to
  1090. .i sendmail.cf
  1091. in the current directory.
  1092. .sh 2 "Changing the Values of Options"
  1093. .pp
  1094. Options can be overridden using the
  1095. .b \-o
  1096. flag.
  1097. For example,
  1098. .(b
  1099. /usr/lib/sendmail \-oT2m
  1100. .)b
  1101. sets the
  1102. .b T
  1103. (timeout) option to two minutes
  1104. for this run only.
  1105. .sh 1 "TUNING"
  1106. .pp
  1107. There are a number of configuration parameters
  1108. you may want to change,
  1109. depending on the requirements of your site.
  1110. Most of these are set
  1111. using an option in the configuration file.
  1112. For example,
  1113. the line
  1114. .q OT3d
  1115. sets option
  1116. .q T
  1117. to the value
  1118. .q 3d
  1119. (three days).
  1120. .pp
  1121. Most of these options default appropriately for most sites.
  1122. However,
  1123. sites having very high mail loads may find they need to tune them
  1124. as appropriate for their mail load.
  1125. In particular,
  1126. sites experiencing a large number of small messages,
  1127. many of which are delivered to many recipients,
  1128. may find that they need to adjust the parameters
  1129. dealing with queue priorities.
  1130. .sh 2 "Timeouts"
  1131. .pp
  1132. All time intervals are set
  1133. using a scaled syntax.
  1134. For example,
  1135. .q 10m
  1136. represents ten minutes, whereas
  1137. .q 2h30m
  1138. represents two and a half hours.
  1139. The full set of scales is:
  1140. .(b
  1141. .ta 4n
  1142. s    seconds
  1143. m    minutes
  1144. h    hours
  1145. d    days
  1146. w    weeks
  1147. .)b
  1148. .sh 3 "Queue interval"
  1149. .pp
  1150. The argument to the
  1151. .b \-q
  1152. flag
  1153. specifies how often a subdaemon will run the queue.
  1154. This is typically set to between fifteen minutes
  1155. and one hour.
  1156. .sh 3 "Read timeouts"
  1157. .pp
  1158. It is possible to time out when reading the standard input
  1159. or when reading from a remote SMTP server.
  1160. Technically,
  1161. this is not acceptable within the published protocols.
  1162. However,
  1163. it might be appropriate to set it to something large
  1164. in certain environments
  1165. (such as an hour).
  1166. This will reduce the chance of large numbers of idle daemons
  1167. piling up on your system.
  1168. This timeout is set using the
  1169. .b r
  1170. option in the configuration file.
  1171. .sh 3 "Message timeouts"
  1172. .pp
  1173. After sitting in the queue for a few days,
  1174. a message will time out.
  1175. This is to insure that at least the sender is aware
  1176. of the inability to send a message.
  1177. The timeout is typically set to three days.
  1178. This timeout is set using the
  1179. .b T
  1180. option in the configuration file.
  1181. .pp
  1182. The time of submission is set in the queue,
  1183. rather than the amount of time left until timeout.
  1184. As a result, you can flush messages that have been hanging
  1185. for a short period
  1186. by running the queue
  1187. with a short message timeout.
  1188. For example,
  1189. .(b
  1190. /usr/lib/sendmail \-oT1d \-q
  1191. .)b
  1192. will run the queue
  1193. and flush anything that is one day old.
  1194. .sh 2 "Forking During Queue Runs"
  1195. .pp
  1196. By setting the
  1197. .b Y
  1198. option,
  1199. .i sendmail
  1200. will fork before each individual message
  1201. while running the queue.
  1202. This will prevent
  1203. .i sendmail
  1204. from consuming large amounts of memory,
  1205. so it may be useful in memory-poor environments.
  1206. However, if the
  1207. .b Y
  1208. option is not set,
  1209. .i sendmail
  1210. will keep track of hosts that are down during a queue run,
  1211. which can improve performance dramatically.
  1212. .sh 2 "Queue Priorities"
  1213. .pp
  1214. Every message is assigned a priority when it is first instantiated,
  1215. consisting of the message size (in bytes)
  1216. offset by the message class times the
  1217. .q "work class factor"
  1218. and the number of recipients times the
  1219. .q "work recipient factor."
  1220. The priority plus the creation time of the message
  1221. (in seconds since January 1, 1970)
  1222. are used to order the queue.
  1223. Higher numbers for the priority mean that the message will be processed later
  1224. when running the queue.
  1225. .pp
  1226. The message size is included so that large messages are penalized
  1227. relative to small messages.
  1228. The message class allows users to send
  1229. .q "high priority"
  1230. messages by including a
  1231. .q Precedence:
  1232. field in their message;
  1233. the value of this field is looked up in the
  1234. .b P
  1235. lines of the configuration file.
  1236. Since the number of recipients affects the amount of load a message presents
  1237. to the system,
  1238. this is also included into the priority.
  1239. .pp
  1240. The recipient and class factors
  1241. can be set in the configuration file using the
  1242. .b y
  1243. and
  1244. .b z
  1245. options respectively.
  1246. They default to 1000 (for the recipient factor)
  1247. and 1800
  1248. (for the class factor).
  1249. The initial priority is:
  1250. .(b
  1251. pri = size \- (class * z) + (nrcpt * y)
  1252. .)b
  1253. (Remember, higher values for this parameter actually mean
  1254. that the job will be treated with lower priority.)
  1255. .pp
  1256. The priority of a job can also be adjusted each time it is processed
  1257. (that is, each time an attempt is made to deliver it)
  1258. using the
  1259. .q "work time factor,"
  1260. set by the
  1261. .b Z
  1262. option.
  1263. This is added to the priority,
  1264. so it normally decreases the precedence of the job,
  1265. on the grounds that jobs that have failed many times
  1266. will tend to fail again in the future.
  1267. .sh 2 "Load Limiting"
  1268. .pp
  1269. .i Sendmail
  1270. can be asked to queue (but not deliver)
  1271. mail if the system load average gets too high
  1272. using the
  1273. .b x
  1274. option.
  1275. When the load average exceeds the value of the
  1276. .b x
  1277. option,
  1278. the delivery mode is set to
  1279. .b q
  1280. (queue only)
  1281. if the
  1282. .i "Queue Factor"
  1283. (\c
  1284. .b q
  1285. option)
  1286. divided by the difference in the current load average and the
  1287. .b x
  1288. option
  1289. plus one
  1290. exceeds the priority of the message \(em
  1291. that is, the message is queued iff:
  1292. .EQ
  1293. pri > QF over { LA - x + 1 }
  1294. .EN
  1295. The
  1296. .b q
  1297. option defaults to 10000,
  1298. so each point of load average is worth 10000
  1299. priority points
  1300. (as described above, that is, bytes + seconds + offsets).
  1301. .pp
  1302. For drastic cases,
  1303. the
  1304. .b X
  1305. option defines a load average at which sendmail will refuse
  1306. to accept network connections.
  1307. Locally generated mail
  1308. (including incoming UUCP mail)
  1309. is still accepted.
  1310. .sh 2 "Delivery Mode"
  1311. .pp
  1312. There are a number of delivery modes that
  1313. .i sendmail
  1314. can operate in,
  1315. set by the
  1316. .q d
  1317. configuration option.
  1318. These modes
  1319. specify how quickly mail will be delivered.
  1320. Legal modes are:
  1321. .(b
  1322. .ta 4n
  1323. i    deliver interactively (synchronously)
  1324. b    deliver in background (asynchronously)
  1325. q    queue only (don't deliver)
  1326. .)b
  1327. There are tradeoffs.
  1328. Mode
  1329. .q i
  1330. passes the maximum amount of information to the sender,
  1331. but is hardly ever necessary.
  1332. Mode
  1333. .q q
  1334. puts the minimum load on your machine,
  1335. but means that delivery may be delayed for up to the queue interval.
  1336. Mode
  1337. .q b
  1338. is probably a good compromise.
  1339. However, this mode can cause large numbers of processes
  1340. if you have a mailer that takes a long time to deliver a message.
  1341. .sh 2 "Log Level"
  1342. .pp
  1343. The level of logging can be set for sendmail.
  1344. The default using a standard configuration table is level 9.
  1345. The levels are as follows:
  1346. .ip 0
  1347. No logging.
  1348. .ip 1
  1349. Major problems only.
  1350. .ip 2
  1351. Message collections and failed deliveries.
  1352. .ip 3
  1353. Successful deliveries.
  1354. .ip 4
  1355. Messages being deferred
  1356. (due to a host being down, etc.).
  1357. .ip 5
  1358. Normal message queueups.
  1359. .ip 6
  1360. Unusual but benign incidents,
  1361. e.g.,
  1362. trying to process a locked queue file.
  1363. .ip 9
  1364. Log internal queue id to external message id mappings.
  1365. This can be useful for tracing a message
  1366. as it travels between several hosts.
  1367. .ip 12
  1368. Several messages that are basically only of interest
  1369. when debugging.
  1370. .ip 16
  1371. Verbose information regarding the queue.
  1372. .sh 2 "File Modes"
  1373. .pp
  1374. There are a number of files
  1375. that may have a number of modes.
  1376. The modes depend on what functionality you want
  1377. and the level of security you require.
  1378. .sh 3 "To suid or not to suid?"
  1379. .pp
  1380. .i Sendmail
  1381. can safely be made
  1382. setuid to root.
  1383. At the point where it is about to
  1384. .i exec \|(2)
  1385. a mailer,
  1386. it checks to see if the userid is zero;
  1387. if so,
  1388. it resets the userid and groupid to a default
  1389. (set by the
  1390. .b u
  1391. and
  1392. .b g
  1393. options).
  1394. (This can be overridden
  1395. by setting the
  1396. .b S
  1397. flag to the mailer
  1398. for mailers that are trusted
  1399. and must be called as root.)
  1400. However,
  1401. this will cause mail processing
  1402. to be accounted
  1403. (using
  1404. .i sa \|(8))
  1405. to root
  1406. rather than to the user sending the mail.
  1407. .sh 3 "Should my alias database be writable?"
  1408. .pp
  1409. At Berkeley
  1410. we have the alias database
  1411. (/usr/lib/aliases*)
  1412. mode 644.
  1413. While this is not as flexible as if the database
  1414. were more 666, it avoids potential security problems
  1415. with a globally writable database.
  1416. .pp
  1417. The database that
  1418. .i sendmail
  1419. actually used
  1420. is represented by the two files
  1421. .i aliases.dir
  1422. and
  1423. .i aliases.pag
  1424. (both in /usr/lib).
  1425. The mode on these files should match the mode
  1426. on /usr/lib/aliases.
  1427. If
  1428. .i aliases
  1429. is writable
  1430. and the
  1431. DBM
  1432. files
  1433. (\c
  1434. .i aliases.dir
  1435. and
  1436. .i aliases.pag )
  1437. are not,
  1438. users will be unable to reflect their desired changes
  1439. through to the actual database.
  1440. However,
  1441. if
  1442. .i aliases
  1443. is read-only
  1444. and the DBM files are writable,
  1445. a slightly sophisticated user
  1446. can arrange to steal mail anyway.
  1447. .pp
  1448. If your DBM files are not writable by the world
  1449. or you do not have auto-rebuild enabled
  1450. (with the
  1451. .q D
  1452. option),
  1453. then you must be careful to reconstruct the alias database
  1454. each time you change the text version:
  1455. .(b
  1456. newaliases
  1457. .)b
  1458. If this step is ignored or forgotten
  1459. any intended changes will also be ignored or forgotten.
  1460. .sh 1 "THE WHOLE SCOOP ON THE CONFIGURATION FILE"
  1461. .pp
  1462. This section describes the configuration file
  1463. in detail,
  1464. including hints on how to write one of your own
  1465. if you have to.
  1466. .pp
  1467. There is one point that should be made clear immediately:
  1468. the syntax of the configuration file
  1469. is designed to be reasonably easy to parse,
  1470. since this is done every time
  1471. .i sendmail
  1472. starts up,
  1473. rather than easy for a human to read or write.
  1474. On the
  1475. .q "future project"
  1476. list is a
  1477. configuration-file compiler.
  1478. .pp
  1479. An overview of the configuration file
  1480. is given first,
  1481. followed by details of the semantics.
  1482. .sh 2 "The Syntax"
  1483. .pp
  1484. The configuration file is organized as a series of lines,
  1485. each of which begins with a single character
  1486. defining the semantics for the rest of the line.
  1487. Lines beginning with a space or a tab
  1488. are continuation lines
  1489. (although the semantics are not well defined in many places).
  1490. Blank lines and lines beginning with a sharp symbol
  1491. (`#')
  1492. are comments.
  1493. .sh 3 "R and S \*- rewriting rules"
  1494. .pp
  1495. The core of address parsing
  1496. are the rewriting rules.
  1497. These are an ordered production system.
  1498. .i Sendmail
  1499. scans through the set of rewriting rules
  1500. looking for a match on the left hand side
  1501. (LHS)
  1502. of the rule.
  1503. When a rule matches,
  1504. the address is replaced by the right hand side
  1505. (RHS)
  1506. of the rule.
  1507. .pp
  1508. There are several sets of rewriting rules.
  1509. Some of the rewriting sets are used internally
  1510. and must have specific semantics.
  1511. Other rewriting sets
  1512. do not have specifically assigned semantics,
  1513. and may be referenced by the mailer definitions
  1514. or by other rewriting sets.
  1515. .pp
  1516. The syntax of these two commands are:
  1517. .(b F
  1518. .b S \c
  1519. .i n
  1520. .)b
  1521. Sets the current ruleset being collected to
  1522. .i n .
  1523. If you begin a ruleset more than once
  1524. it deletes the old definition.
  1525. .(b F
  1526. .b R \c
  1527. .i lhs
  1528. .i rhs
  1529. .i comments
  1530. .)b
  1531. The
  1532. fields must be separated
  1533. by at least one tab character;
  1534. there may be embedded spaces
  1535. in the fields.
  1536. The
  1537. .i lhs
  1538. is a pattern that is applied to the input.
  1539. If it matches,
  1540. the input is rewritten to the
  1541. .i rhs .
  1542. The
  1543. .i comments
  1544. are ignored.
  1545. .sh 3 "D \*- define macro"
  1546. .pp
  1547. Macros are named with a single character.
  1548. These may be selected from the entire ASCII set,
  1549. but user-defined macros
  1550. should be selected from the set of upper case letters only.
  1551. Lower case letters
  1552. and special symbols
  1553. are used internally.
  1554. .pp
  1555. The syntax for macro definitions is:
  1556. .(b F
  1557. .b D \c
  1558. .i x\|val
  1559. .)b
  1560. where
  1561. .i x
  1562. is the name of the macro
  1563. and
  1564. .i val
  1565. is the value it should have.
  1566. Macros can be interpolated in most places using the escape sequence
  1567. .b $ \c
  1568. .i x .
  1569. .sh 3 "C and F \*- define classes"
  1570. .pp
  1571. Classes of words may be defined
  1572. to match on the left hand side of rewriting rules,
  1573. where a
  1574. .q word
  1575. is a sequence of characters that do not contain characters
  1576. in the $o macro.
  1577. For example
  1578. a class of all local names for this site
  1579. might be created
  1580. so that attempts to send to oneself
  1581. can be eliminated.
  1582. These can either be defined directly in the configuration file
  1583. or read in from another file.
  1584. Classes may be given names
  1585. from the set of upper case letters.
  1586. Lower case letters and special characters
  1587. are reserved for system use.
  1588. .pp
  1589. The syntax is:
  1590. .(b F
  1591. .b C \c
  1592. .i c\|word1
  1593. .i word2...
  1594. .br
  1595. .b F \c
  1596. .i c\|file
  1597. .)b
  1598. The first form defines the class
  1599. .i c
  1600. to match any of the named words.
  1601. It is permissible to split them among multiple lines;
  1602. for example, the two forms:
  1603. .(b
  1604. CHmonet ucbmonet
  1605. .)b
  1606. and
  1607. .(b
  1608. CHmonet
  1609. CHucbmonet
  1610. .)b
  1611. are equivalent.
  1612. The second form
  1613. reads the elements of the class
  1614. .i c
  1615. from the named
  1616. .i file .
  1617. .sh 3 "M \*- define mailer"
  1618. .pp
  1619. Programs and interfaces to mailers
  1620. are defined in this line.
  1621. The format is:
  1622. .(b F
  1623. .b M \c
  1624. .i name ,
  1625. {\c
  1626. .i field =\c
  1627. .i value \|}*
  1628. .)b
  1629. where
  1630. .i name
  1631. is the name of the mailer
  1632. (used internally only)
  1633. and the
  1634. .q field=name
  1635. pairs define attributes of the mailer.
  1636. Fields are:
  1637. .(b
  1638. .ta 1i
  1639. Path    The pathname of the mailer
  1640. Flags    Special flags for this mailer
  1641. Sender    A rewriting set for sender addresses
  1642. Recipient    A rewriting set for recipient addresses
  1643. Argv    An argument vector to pass to this mailer
  1644. Eol    The end-of-line string for this mailer
  1645. Maxsize    The maximum message length to this mailer
  1646. .)b
  1647. Only the first character of the field name is checked.
  1648. .sh 3 "H \*- define header"
  1649. .pp
  1650. The format of the header lines that sendmail inserts into the message
  1651. are defined by the
  1652. .b H
  1653. line.
  1654. The syntax of this line is:
  1655. .(b F
  1656. .b H [\c
  1657. .b ? \c
  1658. .i mflags \c
  1659. .b ? ]\c
  1660. .i hname \c
  1661. .b :
  1662. .i htemplate
  1663. .)b
  1664. Continuation lines in this spec
  1665. are reflected directly into the outgoing message.
  1666. The
  1667. .i htemplate
  1668. is macro expanded before insertion into the message.
  1669. If the
  1670. .i mflags
  1671. (surrounded by question marks)
  1672. are specified,
  1673. at least one of the specified flags
  1674. must be stated in the mailer definition
  1675. for this header to be automatically output.
  1676. If one of these headers is in the input
  1677. it is reflected to the output
  1678. regardless of these flags.
  1679. .pp
  1680. Some headers have special semantics
  1681. that will be described below.
  1682. .sh 3 "O \*- set option"
  1683. .pp
  1684. There are a number of
  1685. .q random
  1686. options that
  1687. can be set from a configuration file.
  1688. Options are represented by single characters.
  1689. The syntax of this line is:
  1690. .(b F
  1691. .b O \c
  1692. .i o\|value
  1693. .)b
  1694. This sets option
  1695. .i o
  1696. to be
  1697. .i value .
  1698. Depending on the option,
  1699. .i value
  1700. may be a string, an integer,
  1701. a boolean
  1702. (with legal values
  1703. .q t ,
  1704. .q T ,
  1705. .q f ,
  1706. or
  1707. .q F ;
  1708. the default is TRUE),
  1709. or
  1710. a time interval.
  1711. .sh 3 "T \*- define trusted users"
  1712. .pp
  1713. Trusted users
  1714. are those users who are permitted
  1715. to override the sender address
  1716. using the
  1717. .b \-f
  1718. flag.
  1719. These typically are
  1720. .q root,
  1721. .q uucp,
  1722. and
  1723. .q network,
  1724. but on some users it may be convenient
  1725. to extend this list to include other users,
  1726. perhaps to support
  1727. a separate
  1728. UUCP
  1729. login for each host.
  1730. The syntax of this line is:
  1731. .(b F
  1732. .b T \c
  1733. .i user1
  1734. .i user2 ...
  1735. .)b
  1736. There may be more than one of these lines.
  1737. .sh 3 "P \*- precedence definitions"
  1738. .pp
  1739. Values for the
  1740. .q "Precedence:"
  1741. field may be defined using the
  1742. .b P
  1743. control line.
  1744. The syntax of this field is:
  1745. .(b
  1746. \fBP\fP\fIname\fP\fB=\fP\fInum\fP
  1747. .)b
  1748. When the
  1749. .i name
  1750. is found in a
  1751. .q Precedence:
  1752. field,
  1753. the message class is set to
  1754. .i num .
  1755. Higher numbers mean higher precedence.
  1756. Numbers less than zero
  1757. have the special property
  1758. that error messages will not be returned.
  1759. The default precedence is zero.
  1760. For example,
  1761. our list of precedences is:
  1762. .(b
  1763. Pfirst-class=0
  1764. Pspecial-delivery=100
  1765. Pjunk=\-100
  1766. .)b
  1767. .sh 2 "The Semantics"
  1768. .pp
  1769. This section describes the semantics of the configuration file.
  1770. .sh 3 "Special macros, conditionals"
  1771. .pp
  1772. Macros are interpolated
  1773. using the construct
  1774. .b $ \c
  1775. .i x ,
  1776. where
  1777. .i x
  1778. is the name of the macro to be interpolated.
  1779. In particular,
  1780. lower case letters are reserved to have
  1781. special semantics,
  1782. used to pass information in or out of sendmail,
  1783. and some special characters are reserved to
  1784. provide conditionals, etc.
  1785. .pp
  1786. Conditionals can be specified using the syntax:
  1787. .(b
  1788. $?x text1 $| text2 $.
  1789. .)b
  1790. This interpolates
  1791. .i text1
  1792. if the macro
  1793. .b $x
  1794. is set,
  1795. and
  1796. .i text2
  1797. otherwise.
  1798. The
  1799. .q else
  1800. (\c
  1801. .b $| )
  1802. clause may be omitted.
  1803. .pp
  1804. The following macros
  1805. .i must
  1806. be defined to transmit information into
  1807. .i sendmail:
  1808. .(b
  1809. .ta 4n
  1810. e    The SMTP entry message
  1811. j    The \*(lqofficial\*(rq domain name for this site
  1812. l    The format of the UNIX from line
  1813. n    The name of the daemon (for error messages)
  1814. o    The set of "operators" in addresses
  1815. q    default format of sender address
  1816. .)b
  1817. The
  1818. .b $e
  1819. macro is printed out when SMTP starts up.
  1820. The first word must be the
  1821. .b $j
  1822. macro.
  1823. The
  1824. .b $j
  1825. macro
  1826. should be in RFC821 format.
  1827. The
  1828. .b $l
  1829. and
  1830. .b $n
  1831. macros can be considered constants
  1832. except under terribly unusual circumstances.
  1833. The
  1834. .b $o
  1835. macro consists of a list of characters
  1836. which will be considered tokens
  1837. and which will separate tokens
  1838. when doing parsing.
  1839. For example, if
  1840. .q @
  1841. were in the
  1842. .b $o
  1843. macro, then the input
  1844. .q a@b
  1845. would be scanned as three tokens:
  1846. .q a,
  1847. .q @,
  1848. and
  1849. .q b.
  1850. Finally, the
  1851. .b $q
  1852. macro specifies how an address should appear in a message
  1853. when it is defaulted.
  1854. For example, on our system these definitions are:
  1855. .(b
  1856. De$j Sendmail $v ready at $b
  1857. DnMAILER-DAEMON
  1858. DlFrom $g  $d
  1859. Do.:%@!^=/
  1860. Dq$g$?x ($x)$.
  1861. Dj$H.$D
  1862. .)b
  1863. An acceptable alternative for the
  1864. .b $q
  1865. macro is
  1866. .q "$?x$x $.<$g>" .
  1867. These correspond to the following two formats:
  1868. .(b
  1869. eric@Berkeley (Eric Allman)
  1870. Eric Allman <eric@Berkeley>
  1871. .)b
  1872. .pp
  1873. Some macros are defined by
  1874. .i sendmail
  1875. for interpolation into argv's for mailers
  1876. or for other contexts.
  1877. These macros are:
  1878. .(b
  1879. a    The origination date in RFC 822 format
  1880. b    The current date in RFC 822 format
  1881. c    The hop count
  1882. d    The date in UNIX (ctime) format
  1883. f    The sender (from) address
  1884. g    The sender address relative to the recipient
  1885. h    The recipient host
  1886. i    The queue id
  1887. p    Sendmail's pid
  1888. r    Protocol used
  1889. s    Sender's host name
  1890. t    A numeric representation of the current time
  1891. u    The recipient user
  1892. v    The version number of sendmail
  1893. w    The hostname of this site
  1894. x    The full name of the sender
  1895. z    The home directory of the recipient
  1896. .)b
  1897. .pp
  1898. There are three types of dates that can be used.
  1899. The
  1900. .b $a
  1901. and
  1902. .b $b
  1903. macros are in RFC 822 format;
  1904. .b $a
  1905. is the time as extracted from the
  1906. .q Date:
  1907. line of the message
  1908. (if there was one),
  1909. and
  1910. .b $b
  1911. is the current date and time
  1912. (used for postmarks).
  1913. If no
  1914. .q Date:
  1915. line is found in the incoming message,
  1916. .b $a
  1917. is set to the current time also.
  1918. The
  1919. .b $d
  1920. macro is equivalent to the
  1921. .b $a
  1922. macro in UNIX
  1923. (ctime)
  1924. format.
  1925. .pp
  1926. The
  1927. .b $f
  1928. macro is the id of the sender
  1929. as originally determined;
  1930. when mailing to a specific host
  1931. the
  1932. .b $g
  1933. macro is set to the address of the sender
  1934. .ul
  1935. relative to the recipient.
  1936. For example,
  1937. if I send to
  1938. .q bollard@matisse
  1939. from the machine
  1940. .q ucbarpa
  1941. the
  1942. .b $f
  1943. macro will be
  1944. .q eric
  1945. and the
  1946. .b $g
  1947. macro will be
  1948. .q eric@ucbarpa.
  1949. .pp
  1950. The
  1951. .b $x
  1952. macro is set to the full name of the sender.
  1953. This can be determined in several ways.
  1954. It can be passed as flag to
  1955. .i sendmail.
  1956. The second choice is the value of the
  1957. .q Full-name:
  1958. line in the header if it exists,
  1959. and the third choice is the comment field
  1960. of a
  1961. .q From:
  1962. line.
  1963. If all of these fail,
  1964. and if the message is being originated locally,
  1965. the full name is looked up in the
  1966. .i /etc/passwd
  1967. file.
  1968. .pp
  1969. When sending,
  1970. the
  1971. .b $h ,
  1972. .b $u ,
  1973. and
  1974. .b $z
  1975. macros get set to the host, user, and home directory
  1976. (if local)
  1977. of the recipient.
  1978. The first two are set from the
  1979. .b $@
  1980. and
  1981. .b $:
  1982. part of the rewriting rules, respectively.
  1983. .pp
  1984. The
  1985. .b $p
  1986. and
  1987. .b $t
  1988. macros are used to create unique strings
  1989. (e.g., for the
  1990. .q Message-Id:
  1991. field).
  1992. The
  1993. .b $i
  1994. macro is set to the queue id on this host;
  1995. if put into the timestamp line
  1996. it can be extremely useful for tracking messages.
  1997. The
  1998. .b $v
  1999. macro is set to be the version number of
  2000. .i sendmail ;
  2001. this is normally put in timestamps
  2002. and has been proven extremely useful for debugging.
  2003. The
  2004. .b $w
  2005. macro is set to the name of this host
  2006. if it can be determined.
  2007. The
  2008. .b $c
  2009. field is set to the
  2010. .q "hop count,"
  2011. i.e., the number of times this message has been processed.
  2012. This can be determined
  2013. by the
  2014. .b \-h
  2015. flag on the command line
  2016. or by counting the timestamps in the message.
  2017. .pp
  2018. The
  2019. .b $r
  2020. and
  2021. .b $s
  2022. fields are set to the protocol used to communicate with sendmail
  2023. and the sending hostname;
  2024. these are not supported in the current version.
  2025. .sh 3 "Special classes"
  2026. .pp
  2027. The class
  2028. .b $=w
  2029. is set to be the set of all names
  2030. this host is known by.
  2031. This can be used to match local hostnames.
  2032. .sh 3 "The left hand side"
  2033. .pp
  2034. The left hand side of rewriting rules contains a pattern.
  2035. Normal words are simply matched directly.
  2036. Metasyntax is introduced using a dollar sign.
  2037. The metasymbols are:
  2038. .(b
  2039. .ta \w'\fB$=\fP\fIx\fP  'u
  2040. \fB$*\fP    Match zero or more tokens
  2041. \fB$+\fP    Match one or more tokens
  2042. \fB$\-\fP    Match exactly one token
  2043. \fB$=\fP\fIx\fP    Match any token in class \fIx\fP
  2044. \fB$~\fP\fIx\fP    Match any token not in class \fIx\fP
  2045. .)b
  2046. If any of these match,
  2047. they are assigned to the symbol
  2048. .b $ \c
  2049. .i n
  2050. for replacement on the right hand side,
  2051. where
  2052. .i n
  2053. is the index in the LHS.
  2054. For example,
  2055. if the LHS:
  2056. .(b
  2057. $\-:$+
  2058. .)b
  2059. is applied to the input:
  2060. .(b
  2061. UCBARPA:eric
  2062. .)b
  2063. the rule will match, and the values passed to the RHS will be:
  2064. .(b
  2065. .ta 4n
  2066. $1    UCBARPA
  2067. $2    eric
  2068. .)b
  2069. .sh 3 "The right hand side"
  2070. .pp
  2071. When the left hand side of a rewriting rule matches,
  2072. the input is deleted and replaced by the right hand side.
  2073. Tokens are copied directly from the RHS
  2074. unless they begin with a dollar sign.
  2075. Metasymbols are:
  2076. .(b
  2077. .ta \w'$#mailer  'u
  2078. \fB$\fP\fIn\fP    Substitute indefinite token \fIn\fP from LHS
  2079. \fB$[\fP\fIname\fP\fB$]\fP    Canonicalize \fIname\fP
  2080. \fB$>\fP\fIn\fP    \*(lqCall\*(rq ruleset \fIn\fP
  2081. \fB$#\fP\fImailer\fP    Resolve to \fImailer\fP
  2082. \fB$@\fP\fIhost\fP    Specify \fIhost\fP
  2083. \fB$:\fP\fIuser\fP    Specify \fIuser\fP
  2084. .)b
  2085. .pp
  2086. The
  2087. .b $ \c
  2088. .i n
  2089. syntax substitutes the corresponding value from a
  2090. .b $+ ,
  2091. .b $\- ,
  2092. .b $* ,
  2093. .b $= ,
  2094. or
  2095. .b $~
  2096. match on the LHS.
  2097. It may be used anywhere.
  2098. .pp
  2099. A host name enclosed between
  2100. .b $[
  2101. and
  2102. .b $]
  2103. is looked up using the
  2104. .i gethostent \|(3)
  2105. routines and replaced by the canonical name.
  2106. For example,
  2107. .q $[csam$]
  2108. might become
  2109. .q lbl-csam.arpa
  2110. and
  2111. .q $[[128.32.130.2]$]
  2112. would become
  2113. .q vangogh.berkeley.edu.
  2114. .pp
  2115. The
  2116. .b $> \c
  2117. .i n
  2118. syntax
  2119. causes the remainder of the line to be substituted as usual
  2120. and then passed as the argument to ruleset
  2121. .i n .
  2122. The final value of ruleset
  2123. .i n
  2124. then becomes
  2125. the substitution for this rule.
  2126. .pp
  2127. The
  2128. .b $#
  2129. syntax should
  2130. .i only
  2131. be used in ruleset zero.
  2132. It causes evaluation of the ruleset to terminate immediately,
  2133. and signals to sendmail that the address has completely resolved.
  2134. The complete syntax is:
  2135. .(b
  2136. \fB$#\fP\fImailer\fP\fB$@\fP\fIhost\fP\fB$:\fP\fIuser\fP
  2137. .)b
  2138. This specifies the
  2139. {mailer, host, user}
  2140. 3-tuple necessary to direct the mailer.
  2141. If the mailer is local
  2142. the host part may be omitted.
  2143. The
  2144. .i mailer
  2145. and
  2146. .i host
  2147. must be a single word,
  2148. but the
  2149. .i user
  2150. may be multi-part.
  2151. .pp
  2152. A RHS may also be preceded by a
  2153. .b $@
  2154. or a
  2155. .b $:
  2156. to control evaluation.
  2157. A
  2158. .b $@
  2159. prefix causes the ruleset to return with the remainder of the RHS
  2160. as the value.
  2161. A
  2162. .b $:
  2163. prefix causes the rule to terminate immediately,
  2164. but the ruleset to continue;
  2165. this can be used to avoid continued application of a rule.
  2166. The prefix is stripped before continuing.
  2167. .pp
  2168. The
  2169. .b $@
  2170. and
  2171. .b $:
  2172. prefixes may precede a
  2173. .b $>
  2174. spec;
  2175. for example:
  2176. .(b
  2177. .ta 8n
  2178. R$+    $:$>7$1
  2179. .)b
  2180. matches anything,
  2181. passes that to ruleset seven,
  2182. and continues;
  2183. the
  2184. .b $:
  2185. is necessary to avoid an infinite loop.
  2186. .pp
  2187. Substitution occurs in the order described,
  2188. that is,
  2189. parameters from the LHS are substituted,
  2190. hostnames are canonicalized,
  2191. .q subroutines
  2192. are called,
  2193. and finally
  2194. .b $# ,
  2195. .b $@ ,
  2196. and
  2197. .b $:
  2198. are processed.
  2199. .sh 3 "Semantics of rewriting rule sets"
  2200. .pp
  2201. There are five rewriting sets
  2202. that have specific semantics.
  2203. These are related as depicted by figure 2.
  2204. .(z
  2205. .hl
  2206. .ie n \{\
  2207. .(c
  2208.                     +---+
  2209.                  -->| 0 |-->resolved address
  2210.                 /   +---+
  2211.                /            +---+   +---+
  2212.               /        ---->| 1 |-->| S |--
  2213.        +---+ / +---+  /     +---+   +---+  \e    +---+
  2214. addr-->| 3 |-->| D |--                      --->| 4 |-->msg
  2215.        +---+   +---+  \e     +---+   +---+  /    +---+
  2216.                         --->| 2 |-->| R |--
  2217.                             +---+   +---+
  2218. .)c
  2219.  
  2220. .\}
  2221. .el .ie !"\*(.T"" \
  2222. \{\
  2223. .PS
  2224. boxwid = 0.3i
  2225. boxht = 0.3i
  2226. movewid = 0.3i
  2227. moveht = 0.3i
  2228. linewid = 0.3i
  2229. lineht = 0.3i
  2230.  
  2231.     box invis "addr"; arrow
  2232. Box3:    box "3"
  2233. A1:    arrow
  2234. BoxD:    box "D"; line; L1: Here
  2235. C:    [
  2236.     C1:    arrow; box "1"; arrow; box "S"; line; E1: Here
  2237.         move to C1 down 0.5; right
  2238.     C2:    arrow; box "2"; arrow; box "R"; line; E2: Here
  2239.     ] with .w at L1 + (0.5, 0)
  2240.     move to C.e right 0.5
  2241. L4:    arrow; box "4"; arrow; box invis "msg"
  2242.     line from L1 to C.C1
  2243.     line from L1 to C.C2
  2244.     line from C.E1 to L4
  2245.     line from C.E2 to L4
  2246.     move to BoxD.n up 0.6; right
  2247. Box0:    arrow; box "0"
  2248.     arrow; box invis "resolved address" width 1.3
  2249.     line from 1/3 of the way between A1 and BoxD.w to Box0
  2250. .PE
  2251. .\}
  2252. .el .sp 2i
  2253. .ce
  2254. Figure 2 \*- Rewriting set semantics
  2255. .(c
  2256. D \*- sender domain addition
  2257. S \*- mailer-specific sender rewriting
  2258. R \*- mailer-specific recipient rewriting
  2259. .)c
  2260. .hl
  2261. .)z
  2262. .pp
  2263. Ruleset three
  2264. should turn the address into
  2265. .q "canonical form."
  2266. This form should have the basic syntax:
  2267. .(b
  2268. local-part@host-domain-spec
  2269. .)b
  2270. If no
  2271. .q @
  2272. sign is specified,
  2273. then the
  2274. host-domain-spec
  2275. .i may
  2276. be appended from the
  2277. sender address
  2278. (if the
  2279. .b C
  2280. flag is set in the mailer definition
  2281. corresponding to the
  2282. .i sending
  2283. mailer).
  2284. Ruleset three
  2285. is applied by sendmail
  2286. before doing anything with any address.
  2287. .pp
  2288. Ruleset zero
  2289. is applied after ruleset three
  2290. to addresses that are going to actually specify recipients.
  2291. It must resolve to a
  2292. .i "{mailer, host, user}"
  2293. triple.
  2294. The
  2295. .i mailer
  2296. must be defined in the mailer definitions
  2297. from the configuration file.
  2298. The
  2299. .i host
  2300. is defined into the
  2301. .b $h
  2302. macro
  2303. for use in the argv expansion of the specified mailer.
  2304. .pp
  2305. Rulesets one and two
  2306. are applied to all sender and recipient addresses respectively.
  2307. They are applied before any specification
  2308. in the mailer definition.
  2309. They must never resolve.
  2310. .pp
  2311. Ruleset four is applied to all addresses
  2312. in the message.
  2313. It is typically used
  2314. to translate internal to external form.
  2315. .sh 3 "Mailer flags etc."
  2316. .pp
  2317. There are a number of flags that may be associated with each mailer,
  2318. each identified by a letter of the alphabet.
  2319. Many of them are assigned semantics internally.
  2320. These are detailed in Appendix C.
  2321. Any other flags may be used freely
  2322. to conditionally assign headers to messages
  2323. destined for particular mailers.
  2324. .sh 3 "The \*(lqerror\*(rq mailer"
  2325. .pp
  2326. The mailer with the special name
  2327. .q error
  2328. can be used to generate a user error.
  2329. The (optional) host field is a numeric exit status to be returned,
  2330. and the user field is a message to be printed.
  2331. For example, the entry:
  2332. .(b
  2333. $#error$:Host unknown in this domain
  2334. .)b
  2335. on the RHS of a rule
  2336. will cause the specified error to be generated
  2337. if the LHS matches.
  2338. This mailer is only functional in ruleset zero.
  2339. .sh 2 "Building a Configuration File From Scratch"
  2340. .pp
  2341. Building a configuration table from scratch is an extremely difficult job.
  2342. Fortunately,
  2343. it is almost never necessary to do so;
  2344. nearly every situation that may come up
  2345. may be resolved by changing an existing table.
  2346. In any case,
  2347. it is critical that you understand what it is that you are trying to do
  2348. and come up with a philosophy for the configuration table.
  2349. This section is intended to explain what the real purpose
  2350. of a configuration table is
  2351. and to give you some ideas
  2352. for what your philosophy might be.
  2353. .sh 3 "What you are trying to do"
  2354. .pp
  2355. The configuration table has three major purposes.
  2356. The first and simplest
  2357. is to set up the environment for
  2358. .i sendmail .
  2359. This involves setting the options,
  2360. defining a few critical macros,
  2361. etc.
  2362. Since these are described in other places,
  2363. we will not go into more detail here.
  2364. .pp
  2365. The second purpose is to rewrite addresses in the message.
  2366. This should typically be done in two phases.
  2367. The first phase maps addresses in any format
  2368. into a canonical form.
  2369. This should be done in ruleset three.
  2370. The second phase maps this canonical form
  2371. into the syntax appropriate for the receiving mailer.
  2372. .i Sendmail
  2373. does this in three subphases.
  2374. Rulesets one and two
  2375. are applied to all sender and recipient addresses respectively.
  2376. After this,
  2377. you may specify per-mailer rulesets
  2378. for both sender and recipient addresses;
  2379. this allows mailer-specific customization.
  2380. Finally,
  2381. ruleset four is applied to do any default conversion
  2382. to external form.
  2383. .pp
  2384. The third purpose
  2385. is to map addresses into the actual set of instructions
  2386. necessary to get the message delivered.
  2387. Ruleset zero must resolve to the internal form,
  2388. which is in turn used as a pointer to a mailer descriptor.
  2389. The mailer descriptor describes the interface requirements
  2390. of the mailer.
  2391. .sh 3 "Philosophy"
  2392. .pp
  2393. The particular philosophy you choose will depend heavily
  2394. on the size and structure of your organization.
  2395. I will present a few possible philosophies here.
  2396. .pp
  2397. One general point applies to all of these philosophies:
  2398. it is almost always a mistake
  2399. to try to do full name resolution.
  2400. For example,
  2401. if you are trying to get names of the form
  2402. .q user@host
  2403. to the Arpanet,
  2404. it does not pay to route them to
  2405. .q xyzvax!decvax!ucbvax!c70:user@host
  2406. since you then depend on several links not under your control.
  2407. The best approach to this problem
  2408. is to simply forward to
  2409. .q xyzvax!user@host
  2410. and let xyzvax
  2411. worry about it from there.
  2412. In summary,
  2413. just get the message closer to the destination,
  2414. rather than determining the full path.
  2415. .sh 4 "Large site, many hosts \*- minimum information"
  2416. .pp
  2417. Berkeley is an example of a large site,
  2418. i.e., more than two or three hosts
  2419. and multiple mail connections.
  2420. We have decided that the only reasonable philosophy
  2421. in our environment
  2422. is to designate one host as the guru for our site.
  2423. It must be able to resolve any piece of mail it receives.
  2424. The other sites should have the minimum amount of information
  2425. they can get away with.
  2426. In addition,
  2427. any information they do have
  2428. should be hints rather than solid information.
  2429. .pp
  2430. For example,
  2431. a typical site on our local ether network is
  2432. .q monet.
  2433. When monet receives mail for delivery,
  2434. it checks whether it knows
  2435. that the destination host is directly reachable;
  2436. if so, mail is sent to that host.
  2437. If it receives mail for any unknown host,
  2438. it just passes it directly to
  2439. .q ucbvax,
  2440. our master host.
  2441. Ucbvax may determine that the host name is illegal
  2442. and reject the message,
  2443. or may be able to do delivery.
  2444. However, it is important to note that when a new mail connection is added,
  2445. the only host that
  2446. .i must
  2447. have its tables updated
  2448. is ucbvax;
  2449. the others
  2450. .i may
  2451. be updated if convenient,
  2452. but this is not critical.
  2453. .pp
  2454. This picture is slightly muddied
  2455. due to network connections that are not actually located
  2456. on ucbvax.
  2457. For example,
  2458. some UUCP connections are currently on
  2459. .q ucbarpa.
  2460. However,
  2461. monet
  2462. .i "does not"
  2463. know about this;
  2464. the information is hidden totally between ucbvax and ucbarpa.
  2465. Mail going from monet to a UUCP host
  2466. is transferred via the ethernet
  2467. from monet to ucbvax,
  2468. then via the ethernet from ucbvax to ucbarpa,
  2469. and then is submitted to UUCP.
  2470. Although this involves some extra hops,
  2471. we feel this is an acceptable tradeoff.
  2472. .pp
  2473. An interesting point is that it would be possible
  2474. to update monet
  2475. to send appropriate UUCP mail directly to ucbarpa
  2476. if the load got too high;
  2477. if monet failed to note a host as connected to ucbarpa
  2478. it would go via ucbvax as before,
  2479. and if monet incorrectly sent a message to ucbarpa
  2480. it would still be sent by ucbarpa
  2481. to ucbvax as before.
  2482. The only problem that can occur is loops,
  2483. for example,
  2484. if ucbarpa thought that ucbvax had the UUCP connection
  2485. and vice versa.
  2486. For this reason,
  2487. updates should
  2488. .i always
  2489. happen to the master host first.
  2490. .pp
  2491. This philosophy results as much from the need
  2492. to have a single source for the configuration files
  2493. (typically built using
  2494. .i m4 \|(1)
  2495. or some similar tool)
  2496. as any logical need.
  2497. Maintaining more than three separate tables by hand
  2498. is essentially an impossible job.
  2499. .sh 4 "Small site \*- complete information"
  2500. .pp
  2501. A small site
  2502. (two or three hosts and few external connections)
  2503. may find it more reasonable to have complete information
  2504. at each host.
  2505. This would require that each host
  2506. know exactly where each network connection is,
  2507. possibly including the names of each host on that network.
  2508. As long as the site remains small
  2509. and the the configuration remains relatively static,
  2510. the update problem will probably not be too great.
  2511. .sh 4 "Single host"
  2512. .pp
  2513. This is in some sense the trivial case.
  2514. The only major issue is trying to insure that you don't
  2515. have to know too much about your environment.
  2516. For example,
  2517. if you have a UUCP connection
  2518. you might find it useful to know about the names of hosts
  2519. connected directly to you,
  2520. but this is really not necessary
  2521. since this may be determined from the syntax.
  2522. .sh 3 "Relevant issues"
  2523. .pp
  2524. The canonical form you use
  2525. should almost certainly be as specified in
  2526. the Arpanet protocols
  2527. RFC819 and RFC822.
  2528. Copies of these RFC's are included on the
  2529. .i sendmail
  2530. tape
  2531. as
  2532. .i doc/rfc819.lpr
  2533. and
  2534. .i doc/rfc822.lpr .
  2535. .pp
  2536. RFC822
  2537. describes the format of the mail message itself.
  2538. .i Sendmail
  2539. follows this RFC closely,
  2540. to the extent that many of the standards described in this document
  2541. can not be changed without changing the code.
  2542. In particular,
  2543. the following characters have special interpretations:
  2544. .(b
  2545. < > ( ) " \e
  2546. .)b
  2547. Any attempt to use these characters for other than their RFC822
  2548. purpose in addresses is probably doomed to disaster.
  2549. .pp
  2550. RFC819
  2551. describes the specifics of the domain-based addressing.
  2552. This is touched on in RFC822 as well.
  2553. Essentially each host is given a name
  2554. which is a right-to-left dot qualified pseudo-path
  2555. from a distinguished root.
  2556. The elements of the path need not be physical hosts;
  2557. the domain is logical rather than physical.
  2558. For example,
  2559. at Berkeley
  2560. one legal host might be
  2561. .q a.CC.Berkeley.EDU ;
  2562. reading from right to left,
  2563. .q EDU
  2564. is a top level domain
  2565. comprising educational institutions,
  2566. .q Berkeley
  2567. is a logical domain name,
  2568. .q CC
  2569. represents the Computer Center,
  2570. (in this case a strictly logical entity),
  2571. and
  2572. .q a
  2573. is a host in the Computer Center.
  2574. .pp
  2575. Beware when reading RFC819
  2576. that there are a number of errors in it.
  2577. .sh 3 "How to proceed"
  2578. .pp
  2579. Once you have decided on a philosophy,
  2580. it is worth examining the available configuration tables
  2581. to decide if any of them are close enough
  2582. to steal major parts of.
  2583. Even under the worst of conditions,
  2584. there is a fair amount of boiler plate that can be collected safely.
  2585. .pp
  2586. The next step is to build ruleset three.
  2587. This will be the hardest part of the job.
  2588. Beware of doing too much to the address in this ruleset,
  2589. since anything you do will reflect through
  2590. to the message.
  2591. In particular,
  2592. stripping of local domains is best deferred,
  2593. since this can leave you with addresses with no domain spec at all.
  2594. Since
  2595. .i sendmail
  2596. likes to append the sending domain to addresses with no domain,
  2597. this can change the semantics of addresses.
  2598. Also try to avoid
  2599. fully qualifying domains in this ruleset.
  2600. Although technically legal,
  2601. this can lead to unpleasantly and unnecessarily long addresses
  2602. reflected into messages.
  2603. The Berkeley configuration files
  2604. define ruleset nine
  2605. to qualify domain names and strip local domains.
  2606. This is called from ruleset zero
  2607. to get all addresses into a cleaner form.
  2608. .pp
  2609. Once you have ruleset three finished,
  2610. the other rulesets should be relatively trivial.
  2611. If you need hints,
  2612. examine the supplied configuration tables.
  2613. .sh 3 "Testing the rewriting rules \*- the \-bt flag"
  2614. .pp
  2615. When you build a configuration table,
  2616. you can do a certain amount of testing
  2617. using the
  2618. .q "test mode"
  2619. of
  2620. .i sendmail .
  2621. For example,
  2622. you could invoke
  2623. .i sendmail
  2624. as:
  2625. .(b
  2626. sendmail \-bt \-Ctest.cf
  2627. .)b
  2628. which would read the configuration file
  2629. .q test.cf
  2630. and enter test mode.
  2631. In this mode,
  2632. you enter lines of the form:
  2633. .(b
  2634. rwset address
  2635. .)b
  2636. where
  2637. .i rwset
  2638. is the rewriting set you want to use
  2639. and
  2640. .i address
  2641. is an address to apply the set to.
  2642. Test mode shows you the steps it takes
  2643. as it proceeds,
  2644. finally showing you the address it ends up with.
  2645. You may use a comma separated list of rwsets
  2646. for sequential application of rules to an input;
  2647. ruleset three is always applied first.
  2648. For example:
  2649. .(b
  2650. 1,21,4 monet:bollard
  2651. .)b
  2652. first applies ruleset three to the input
  2653. .q monet:bollard.
  2654. Ruleset one is then applied to the output of ruleset three,
  2655. followed similarly by rulesets twenty-one and four.
  2656. .pp
  2657. If you need more detail,
  2658. you can also use the
  2659. .q \-d21
  2660. flag to turn on more debugging.
  2661. For example,
  2662. .(b
  2663. sendmail \-bt \-d21.99
  2664. .)b
  2665. turns on an incredible amount of information;
  2666. a single word address
  2667. is probably going to print out several pages worth of information.
  2668. .sh 3 "Building mailer descriptions"
  2669. .pp
  2670. To add an outgoing mailer to your mail system,
  2671. you will have to define the characteristics of the mailer.
  2672. .pp
  2673. Each mailer must have an internal name.
  2674. This can be arbitrary,
  2675. except that the names
  2676. .q local
  2677. and
  2678. .q prog
  2679. must be defined.
  2680. .pp
  2681. The pathname of the mailer must be given in the P field.
  2682. If this mailer should be accessed via an IPC connection,
  2683. use the string
  2684. .q [IPC]
  2685. instead.
  2686. .pp
  2687. The F field defines the mailer flags.
  2688. You should specify an
  2689. .q f
  2690. or
  2691. .q r
  2692. flag to pass the name of the sender as a
  2693. .b \-f
  2694. or
  2695. .b \-r
  2696. flag respectively.
  2697. These flags are only passed if they were passed to
  2698. .i sendmail,
  2699. so that mailers that give errors under some circumstances
  2700. can be placated.
  2701. If the mailer is not picky
  2702. you can just specify
  2703. .q "\-f $g"
  2704. in the argv template.
  2705. If the mailer must be called as
  2706. .b root
  2707. the
  2708. .q S
  2709. flag should be given;
  2710. this will not reset the userid
  2711. before calling the mailer\**.
  2712. .(f
  2713. \**\c
  2714. .i Sendmail
  2715. must be running setuid to root
  2716. for this to work.
  2717. .)f
  2718. If this mailer is local
  2719. (i.e., will perform final delivery
  2720. rather than another network hop)
  2721. the
  2722. .q l
  2723. flag should be given.
  2724. Quote characters
  2725. (backslashes and " marks)
  2726. can be stripped from addresses if the
  2727. .q s
  2728. flag is specified;
  2729. if this is not given
  2730. they are passed through.
  2731. If the mailer is capable of sending to more than one user
  2732. on the same host
  2733. in a single transaction
  2734. the
  2735. .q m
  2736. flag should be stated.
  2737. If this flag is on,
  2738. then the argv template containing
  2739. .b $u
  2740. will be repeated for each unique user
  2741. on a given host.
  2742. The
  2743. .q e
  2744. flag will mark the mailer as being
  2745. .q expensive,
  2746. which will cause
  2747. .i sendmail
  2748. to defer connection
  2749. until a queue run\**.
  2750. .(f
  2751. \**The
  2752. .q c
  2753. configuration option must be given
  2754. for this to be effective.
  2755. .)f
  2756. .pp
  2757. An unusual case is the
  2758. .q C
  2759. flag.
  2760. This flag applies to the mailer that the message is received from,
  2761. rather than the mailer being sent to;
  2762. if set,
  2763. the domain spec of the sender
  2764. (i.e., the
  2765. .q @host.domain
  2766. part)
  2767. is saved
  2768. and is appended to any addresses in the message
  2769. that do not already contain a domain spec.
  2770. For example,
  2771. a message of the form:
  2772. .(b
  2773. From: eric@ucbarpa
  2774. To: wnj@monet, mckusick
  2775. .)b
  2776. will be modified to:
  2777. .(b
  2778. From: eric@ucbarpa
  2779. To: wnj@monet, mckusick@ucbarpa
  2780. .)b
  2781. .i "if and only if"
  2782. the
  2783. .q C
  2784. flag is defined in the mailer corresponding to
  2785. .q eric@ucbarpa.
  2786. .pp
  2787. Other flags are described
  2788. in Appendix C.
  2789. .pp
  2790. The S and R fields in the mailer description
  2791. are per-mailer rewriting sets
  2792. to be applied to sender and recipient addresses
  2793. respectively.
  2794. These are applied after the sending domain is appended
  2795. and the general rewriting sets
  2796. (numbers one and two)
  2797. are applied,
  2798. but before the output rewrite
  2799. (ruleset four)
  2800. is applied.
  2801. A typical use is to append the current domain
  2802. to addresses that do not already have a domain.
  2803. For example,
  2804. a header of the form:
  2805. .(b
  2806. From: eric
  2807. .)b
  2808. might be changed to be:
  2809. .(b
  2810. From: eric@ucbarpa
  2811. .)b
  2812. or
  2813. .(b
  2814. From: ucbvax!eric
  2815. .)b
  2816. depending on the domain it is being shipped into.
  2817. These sets can also be used
  2818. to do special purpose output rewriting
  2819. in cooperation with ruleset four.
  2820. .pp
  2821. The E field defines the string to use
  2822. as an end-of-line indication.
  2823. A string containing only newline is the default.
  2824. The usual backslash escapes
  2825. (\er, \en, \ef, \eb)
  2826. may be used.
  2827. .pp
  2828. Finally,
  2829. an argv template is given as the E field.
  2830. It may have embedded spaces.
  2831. If there is no argv with a
  2832. .b $u
  2833. macro in it,
  2834. .i sendmail
  2835. will speak SMTP
  2836. to the mailer.
  2837. If the pathname for this mailer is
  2838. .q [IPC],
  2839. the argv should be
  2840. .(b
  2841. IPC $h [ \fIport\fP ]
  2842. .)b
  2843. where
  2844. .i port
  2845. is the optional port number
  2846. to connect to.
  2847. .pp
  2848. For example,
  2849. the specifications:
  2850. .(b
  2851. .ta \w'Mlocal, 'u +\w'P=/bin/mail, 'u +\w'F=rlsm, 'u +\w'S=10, 'u +\w'R=20, 'u
  2852. Mlocal,    P=/bin/mail,    F=rlsm    S=10,    R=20,    A=mail \-d $u
  2853. Mether,    P=[IPC],    F=meC,    S=11,    R=21,    A=IPC $h, M=100000
  2854. .)b
  2855. specifies a mailer to do local delivery
  2856. and a mailer for ethernet delivery.
  2857. The first is called
  2858. .q local,
  2859. is located in the file
  2860. .q /bin/mail,
  2861. takes a picky
  2862. .b \-r
  2863. flag,
  2864. does local delivery,
  2865. quotes should be stripped from addresses,
  2866. and multiple users can be delivered at once;
  2867. ruleset ten
  2868. should be applied to sender addresses in the message
  2869. and ruleset twenty
  2870. should be applied to recipient addresses;
  2871. the argv to send to a message will be the word
  2872. .q mail,
  2873. the word
  2874. .q \-d,
  2875. and words containing the name of the receiving user.
  2876. If a
  2877. .b \-r
  2878. flag is inserted
  2879. it will be between the words
  2880. .q mail
  2881. and
  2882. .q \-d.
  2883. The second mailer is called
  2884. .q ether,
  2885. it should be connected to via an IPC connection,
  2886. it can handle multiple users at once,
  2887. connections should be deferred,
  2888. and any domain from the sender address
  2889. should be appended to any receiver name
  2890. without a domain;
  2891. sender addresses should be processed by ruleset eleven
  2892. and recipient addresses by ruleset twenty-one.
  2893. There is a 100,000 byte limit on messages passed through this mailer.
  2894. .++ A
  2895. .+c "COMMAND LINE FLAGS"
  2896. .ba 0
  2897. .nr ii 1i
  2898. .pp
  2899. Arguments must be presented with flags before addresses.
  2900. The flags are:
  2901. .ip "\-f\ \fIaddr\fP"
  2902. The sender's machine address is
  2903. .i addr .
  2904. This flag is ignored unless the real user
  2905. is listed as a
  2906. .q "trusted user"
  2907. or if
  2908. .i addr
  2909. contains an exclamation point
  2910. (because of certain restrictions in UUCP).
  2911. .ip "\-r\ \fIaddr\fP"
  2912. An obsolete form of
  2913. .b \-f .
  2914. .ip "\-h\ \fIcnt\fP"
  2915. Sets the
  2916. .q "hop count"
  2917. to
  2918. .i cnt .
  2919. This represents the number of times this message has been processed
  2920. by
  2921. .i sendmail
  2922. (to the extent that it is supported by the underlying networks).
  2923. .i Cnt
  2924. is incremented during processing,
  2925. and if it reaches
  2926. MAXHOP
  2927. (currently 30)
  2928. .i sendmail
  2929. throws away the message with an error.
  2930. .ip \-F\fIname\fP
  2931. Sets the full name of this user to
  2932. .i name .
  2933. .ip \-n
  2934. Don't do aliasing or forwarding.
  2935. .ip \-t
  2936. Read the header for
  2937. .q To: ,
  2938. .q Cc: ,
  2939. and
  2940. .q Bcc:
  2941. lines, and send to everyone listed in those lists.
  2942. The
  2943. .q Bcc:
  2944. line will be deleted before sending.
  2945. Any addresses in the argument vector will be deleted
  2946. from the send list.
  2947. .ip \-b\fIx\fP
  2948. Set operation mode to
  2949. .i x .
  2950. Operation modes are:
  2951. .(b
  2952. .ta 4n
  2953. m    Deliver mail (default)
  2954. a    Run in arpanet mode (see below)
  2955. s    Speak SMTP on input side
  2956. d    Run as a daemon
  2957. t    Run in test mode
  2958. v    Just verify addresses, don't collect or deliver
  2959. i    Initialize the alias database
  2960. p    Print the mail queue
  2961. z    Freeze the configuration file
  2962. .)b
  2963. The special processing for the
  2964. ARPANET
  2965. includes reading the
  2966. .q "From:"
  2967. line from the header to find the sender,
  2968. printing
  2969. ARPANET
  2970. style messages
  2971. (preceded by three digit reply codes for compatibility with
  2972. the FTP protocol
  2973. [Neigus73, Postel74, Postel77]),
  2974. and ending lines of error messages with <CRLF>.
  2975. .ip \-q\fItime\fP
  2976. Try to process the queued up mail.
  2977. If the time is given,
  2978. a sendmail will run through the queue at the specified interval
  2979. to deliver queued mail;
  2980. otherwise, it only runs once.
  2981. .ip \-C\fIfile\fP
  2982. Use a different configuration file.
  2983. .i Sendmail
  2984. runs as the invoking user (rather than root)
  2985. when this flag is specified.
  2986. .ip \-d\fIlevel\fP
  2987. Set debugging level.
  2988. .ip \-o\fIx\|value\fP
  2989. Set option
  2990. .i x
  2991. to the specified
  2992. .i value .
  2993. These options are described in Appendix B.
  2994. .pp
  2995. There are a number of options that may be specified as
  2996. primitive flags
  2997. (provided for compatibility with
  2998. .i delivermail ).
  2999. These are the e, i, m, and v options.
  3000. Also,
  3001. the f option
  3002. may be specified as the
  3003. .b \-s
  3004. flag.
  3005. .+c "CONFIGURATION OPTIONS"
  3006. .pp
  3007. The following options may be set using the
  3008. .b \-o
  3009. flag on the command line
  3010. or the
  3011. .b O
  3012. line in the configuration file.
  3013. Many of them cannot be specified unless the invoking user is trusted.
  3014. .nr ii 1i
  3015. .ip A\fIfile\fP
  3016. Use the named
  3017. .i file
  3018. as the alias file.
  3019. If no file is specified,
  3020. use
  3021. .i aliases
  3022. in the current directory.
  3023. .ip a\fIN\fP
  3024. If set,
  3025. wait up to
  3026. .i N
  3027. minutes for an
  3028. .q @:@
  3029. entry to exist in the alias database
  3030. before starting up.
  3031. If it does not appear in
  3032. .i N
  3033. minutes,
  3034. rebuild the database
  3035. (if the
  3036. .b D
  3037. option is also set)
  3038. or issue a warning.
  3039. .ip B\fIc\fP
  3040. Set the blank substitution character to
  3041. .i c .
  3042. Unquoted spaces in addresses are replaced by this character.
  3043. .ip c
  3044. If an outgoing mailer is marked as being expensive,
  3045. don't connect immediately.
  3046. This requires that queueing be compiled in,
  3047. since it will depend on a queue run process to
  3048. actually send the mail.
  3049. .ip d\fIx\fP
  3050. Deliver in mode
  3051. .i x .
  3052. Legal modes are:
  3053. .(b
  3054. .ta 4n
  3055. i    Deliver interactively (synchronously)
  3056. b    Deliver in background (asynchronously)
  3057. q    Just queue the message (deliver during queue run)
  3058. .)b
  3059. .ip D
  3060. If set,
  3061. rebuild the alias database if necessary and possible.
  3062. If this option is not set,
  3063. .i sendmail
  3064. will never rebuild the alias database
  3065. unless explicitly requested
  3066. using
  3067. .b \-bi .
  3068. .ip e\fIx\fP
  3069. Dispose of errors using mode
  3070. .i x .
  3071. The values for
  3072. .i x
  3073. are:
  3074. .(b
  3075. p    Print error messages (default)
  3076. q    No messages, just give exit status
  3077. m    Mail back errors
  3078. w    Write back errors (mail if user not logged in)
  3079. e    Mail back errors and give zero exit stat always
  3080. .)b
  3081. .ip f
  3082. Save
  3083. Unix-style
  3084. .q From
  3085. lines at the front of headers.
  3086. Normally they are assumed redundant
  3087. and discarded.
  3088. .ip g\fIn\fP
  3089. Set the default group id
  3090. for mailers to run in
  3091. to
  3092. .i n .
  3093. .ip H\fIfile\fP
  3094. Specify the help file
  3095. for SMTP.
  3096. .ip I
  3097. Insist that the BIND name server be running
  3098. to resolve host names.
  3099. If this is not set and the name server is not running,
  3100. the
  3101. .i /etc/hosts
  3102. file will be considered complete.
  3103. In general, you do want to set this option
  3104. if your
  3105. .i /etc/hosts
  3106. file does not include all hosts known to you
  3107. or if you are using the MX (mail forwarding) feature of the BIND name server.
  3108. The name server will still be consulted
  3109. even if this option is not set, but
  3110. .i sendmail
  3111. will feel free to resort to reading
  3112. .i /etc/hosts
  3113. if the name server is not available.
  3114. Thus, you should
  3115. .i never
  3116. set this option if you do not run the name server.
  3117. .ip i
  3118. Ignore dots in incoming messages.
  3119. .ip L\fIn\fP
  3120. Set the default log level to
  3121. .i n .
  3122. .ip M\fIx\|value\fP
  3123. Set the macro
  3124. .i x
  3125. to
  3126. .i value .
  3127. This is intended only for use from the command line.
  3128. .ip m
  3129. Send to me too,
  3130. even if I am in an alias expansion.
  3131. .ip N\fInetname\fP
  3132. The name of the home network;
  3133. .q ARPA
  3134. by default.
  3135. The the argument of an SMTP
  3136. .q HELO
  3137. command is checked against
  3138. .q hostname.netname
  3139. where
  3140. .i hostname
  3141. is requested from the kernel for the current connection.
  3142. If they do not match,
  3143. .q Received:
  3144. lines are augmented by the name that is determined in this manner
  3145. so that messages can be traced accurately.
  3146. .ip o
  3147. Assume that the headers may be in old format,
  3148. i.e.,
  3149. spaces delimit names.
  3150. This actually turns on
  3151. an adaptive algorithm:
  3152. if any recipient address contains a comma, parenthesis,
  3153. or angle bracket,
  3154. it will be assumed that commas already exist.
  3155. If this flag is not on,
  3156. only commas delimit names.
  3157. Headers are always output with commas between the names.
  3158. .ip Q\fIdir\fP
  3159. Use the named
  3160. .i dir
  3161. as the queue directory.
  3162. .ip q\fIfactor\fP
  3163. Use
  3164. .i factor
  3165. as the multiplier in the map function
  3166. to decide when to just queue up jobs rather than run them.
  3167. This value is divided by the difference between the current load average
  3168. and the load average limit
  3169. (\c
  3170. .b x
  3171. flag)
  3172. to determine the maximum message priority
  3173. that will be sent.
  3174. Defaults to 10000.
  3175. .ip r\fItime\fP
  3176. Timeout reads after
  3177. .i time
  3178. interval.
  3179. .ip S\fIfile\fP
  3180. Log statistics in the named
  3181. .i file .
  3182. .ip s
  3183. Be super-safe when running things,
  3184. i.e.,
  3185. always instantiate the queue file,
  3186. even if you are going to attempt immediate delivery.
  3187. .i Sendmail
  3188. always instantiates the queue file
  3189. before returning control the the client
  3190. under any circumstances.
  3191. .ip T\fItime\fP
  3192. Set the queue timeout to
  3193. .i time .
  3194. After this interval,
  3195. messages that have not been successfully sent
  3196. will be returned to the sender.
  3197. .ip t\fIS,D\fP
  3198. Set the local time zone name to
  3199. .i S
  3200. for standard time and
  3201. .i D
  3202. for daylight time;
  3203. this is only used under version six.
  3204. .ip u\fIn\fP
  3205. Set the default userid for mailers to
  3206. .i n .
  3207. Mailers without the
  3208. .i S
  3209. flag in the mailer definition
  3210. will run as this user.
  3211. .ip v
  3212. Run in verbose mode.
  3213. .ip x\fILA\fP
  3214. When the system load average exceeds
  3215. .i LA ,
  3216. just queue messages
  3217. (i.e., don't try to send them).
  3218. .ip X\fILA\fP
  3219. When the system load average exceeds
  3220. .i LA ,
  3221. refuse incoming SMTP connections.
  3222. .ip y\fIfact\fP
  3223. The indicated
  3224. .i fact or
  3225. is added to the priority (thus
  3226. .i lowering
  3227. the priority of the job)
  3228. for each recipient,
  3229. i.e., this value penalizes jobs with large numbers of recipients.
  3230. .ip Y
  3231. If set,
  3232. deliver each job that is run from the queue in a separate process.
  3233. Use this option if you are short of memory,
  3234. since the default tends to consume considerable amounts of memory
  3235. while the queue is being processed.
  3236. .ip z\fIfact\fP
  3237. The indicated
  3238. .i fact or
  3239. is multiplied by the message class
  3240. (determined by the Precedence: field in the user header
  3241. and the
  3242. .b P
  3243. lines in the configuration file)
  3244. and subtracted from the priority.
  3245. Thus, messages with a higher Priority: will be favored.
  3246. .ip Z\fIfact\fP
  3247. The
  3248. .i fact or
  3249. is added to the priority
  3250. every time a job is processed.
  3251. Thus,
  3252. each time a job is processed,
  3253. its priority will be decreased by the indicated value.
  3254. In most environments this should be positive,
  3255. since hosts that are down are all too often down for a long time.
  3256. .+c "MAILER FLAGS"
  3257. The following flags may be set in the mailer description.
  3258. .nr ii 4n
  3259. .ip f
  3260. The mailer wants a
  3261. .b \-f
  3262. .i from
  3263. flag,
  3264. but only if this is a network forward operation
  3265. (i.e.,
  3266. the mailer will give an error
  3267. if the executing user
  3268. does not have special permissions).
  3269. .ip r
  3270. Same as
  3271. .b f ,
  3272. but sends a
  3273. .b \-r
  3274. flag.
  3275. .ip S
  3276. Don't reset the userid
  3277. before calling the mailer.
  3278. This would be used in a secure environment
  3279. where
  3280. .i sendmail
  3281. ran as root.
  3282. This could be used to avoid forged addresses.
  3283. This flag is suppressed if given from an
  3284. .q unsafe
  3285. environment
  3286. (e.g, a user's mail.cf file).
  3287. .ip n
  3288. Do not insert a UNIX-style
  3289. .q From
  3290. line on the front of the message.
  3291. .ip l
  3292. This mailer is local
  3293. (i.e.,
  3294. final delivery will be performed).
  3295. .ip s
  3296. Strip quote characters off of the address
  3297. before calling the mailer.
  3298. .ip m
  3299. This mailer can send to multiple users
  3300. on the same host
  3301. in one transaction.
  3302. When a
  3303. .b $u
  3304. macro occurs in the
  3305. .i argv
  3306. part of the mailer definition,
  3307. that field will be repeated as necessary
  3308. for all qualifying users.
  3309. .ip F
  3310. This mailer wants a
  3311. .q From:
  3312. header line.
  3313. .ip D
  3314. This mailer wants a
  3315. .q Date:
  3316. header line.
  3317. .ip M
  3318. This mailer wants a
  3319. .q Message-Id:
  3320. header line.
  3321. .ip x
  3322. This mailer wants a
  3323. .q Full-Name:
  3324. header line.
  3325. .ip P
  3326. This mailer wants a
  3327. .q Return-Path:
  3328. line.
  3329. .ip u
  3330. Upper case should be preserved in user names
  3331. for this mailer.
  3332. .ip h
  3333. Upper case should be preserved in host names
  3334. for this mailer.
  3335. .ip A
  3336. This is an Arpanet-compatible mailer,
  3337. and all appropriate modes should be set.
  3338. .ip U
  3339. This mailer wants Unix-style
  3340. .q From
  3341. lines with the ugly UUCP-style
  3342. .q "remote from <host>"
  3343. on the end.
  3344. .ip e
  3345. This mailer is expensive to connect to,
  3346. so try to avoid connecting normally;
  3347. any necessary connection will occur during a queue run.
  3348. .ip X
  3349. This mailer want to use the hidden dot algorithm
  3350. as specified in RFC821;
  3351. basically,
  3352. any line beginning with a dot
  3353. will have an extra dot prepended
  3354. (to be stripped at the other end).
  3355. This insures that lines in the message containing a dot
  3356. will not terminate the message prematurely.
  3357. .ip L
  3358. Limit the line lengths as specified in RFC821.
  3359. .ip P
  3360. Use the return-path in the SMTP
  3361. .q "MAIL FROM:"
  3362. command
  3363. rather than just the return address;
  3364. although this is required in RFC821,
  3365. many hosts do not process return paths properly.
  3366. .ip I
  3367. This mailer will be speaking SMTP
  3368. to another
  3369. .i sendmail
  3370. \*-
  3371. as such it can use special protocol features.
  3372. This option is not required
  3373. (i.e.,
  3374. if this option is omitted the transmission will still operate successfully,
  3375. although perhaps not as efficiently as possible).
  3376. .ip C
  3377. If mail is
  3378. .i received
  3379. from a mailer with this flag set,
  3380. any addresses in the header that do not have an at sign
  3381. (\c
  3382. .q @ )
  3383. after being rewritten by ruleset three
  3384. will have the
  3385. .q @domain
  3386. clause from the sender
  3387. tacked on.
  3388. This allows mail with headers of the form:
  3389. .(b
  3390. From: usera@hosta
  3391. To: userb@hostb, userc
  3392. .)b
  3393. to be rewritten as:
  3394. .(b
  3395. From: usera@hosta
  3396. To: userb@hostb, userc@hosta
  3397. .)b
  3398. automatically.
  3399. .ip E
  3400. Escape lines beginning with
  3401. .q From
  3402. in the message with a `>' sign.
  3403. .+c "OTHER CONFIGURATION"
  3404. .rm $0
  3405. .nr ii 1i
  3406. .pp
  3407. There are some configuration changes that can be made by
  3408. recompiling
  3409. .i sendmail .
  3410. These are located in two places:
  3411. .ip src/conf.h
  3412. Configuration parameters that may be tweaked by the installer
  3413. are included in conf.h.
  3414. .ip src/conf.c
  3415. Some special routines and a few variables
  3416. may be defined in conf.c.
  3417. For the most part these are selected from the settings
  3418. in conf.h.
  3419. .uh "Parameters in src/conf.h"
  3420. .pp
  3421. Parameters and compilation options
  3422. are defined in conf.h.
  3423. Most of these need not normally be tweaked;
  3424. common parameters are all in sendmail.cf.
  3425. However, the sizes of certain primitive vectors, etc.,
  3426. are included in this file.
  3427. The numbers following the parameters
  3428. are their default value.
  3429. .nr ii 1.2i
  3430. .ip "MAXLINE [1024]"
  3431. The maximum line length of any input line.
  3432. If message lines exceed this length
  3433. they will still be processed correctly;
  3434. however, header lines,
  3435. configuration file lines,
  3436. alias lines,
  3437. etc.,
  3438. must fit within this limit.
  3439. .ip "MAXNAME [256]"
  3440. The maximum length of any name,
  3441. such as a host or a user name.
  3442. .ip "MAXFIELD [2500]"
  3443. The maximum total length of any header field,
  3444. including continuation lines.
  3445. .ip "MAXPV [40]"
  3446. The maximum number of parameters to any mailer.
  3447. This limits the number of recipients that may be passed in one transaction.
  3448. .ip "MAXHOP [17]"
  3449. When a message has been processed more than this number of times,
  3450. sendmail rejects the message
  3451. on the assumption that there has been an aliasing loop.
  3452. This can be determined from the
  3453. .b \-h
  3454. flag
  3455. or by counting the number of trace fields
  3456. (i.e,
  3457. .q Received:
  3458. lines)
  3459. in the message header.
  3460. .ip "MAXATOM [100]"
  3461. The maximum number of atoms
  3462. (tokens)
  3463. in a single address.
  3464. For example,
  3465. the address
  3466. .q "eric@Berkeley"
  3467. is three atoms.
  3468. .ip "MAXMAILERS [25]"
  3469. The maximum number of mailers that may be defined
  3470. in the configuration file.
  3471. .ip "MAXRWSETS [30]"
  3472. The maximum number of rewriting sets
  3473. that may be defined.
  3474. .ip "MAXPRIORITIES [25]"
  3475. The maximum number of values for the
  3476. .q Precedence:
  3477. field that may be defined
  3478. (using the
  3479. .b P
  3480. line in sendmail.cf).
  3481. .ip "MAXTRUST [30]"
  3482. The maximum number of trusted users that may be defined
  3483. (using the
  3484. .b T
  3485. line in sendmail.cf).
  3486. .ip "MAXUSERENVIRON [40]"
  3487. The maximum number of items in the user environment
  3488. that will be passed to subordinate mailers.
  3489. .ip "QUEUESIZE [600]"
  3490. The maximum number of entries that will be processed
  3491. in a single queue run.
  3492. .lp
  3493. A number of other compilation options exist.
  3494. These specify whether or not specific code should be compiled in.
  3495. .nr ii 1i
  3496. .ip DBM
  3497. If set,
  3498. the
  3499. .q DBM
  3500. package in UNIX is used
  3501. (see
  3502. .i dbm(3X)
  3503. in [UNIX80]).
  3504. If not set,
  3505. a much less efficient algorithm for processing aliases is used.
  3506. .ip NDBM
  3507. If set,
  3508. the new version of the DBM library
  3509. that allows multiple databases will be used.
  3510. .q DBM
  3511. must also be set.
  3512. .ip DEBUG
  3513. If set, debugging information is compiled in.
  3514. To actually get the debugging output,
  3515. the
  3516. .b \-d
  3517. flag must be used.
  3518. .ip LOG
  3519. If set,
  3520. the
  3521. .i syslog
  3522. routine in use at some sites is used.
  3523. This makes an informational log record
  3524. for each message processed,
  3525. and makes a higher priority log record
  3526. for internal system errors.
  3527. .ip QUEUE
  3528. This flag should be set to compile in the queueing code.
  3529. If this is not set,
  3530. mailers must accept the mail immediately
  3531. or it will be returned to the sender.
  3532. .ip SMTP
  3533. If set,
  3534. the code to handle user and server SMTP will be compiled in.
  3535. This is only necessary if your machine has some mailer
  3536. that speaks SMTP.
  3537. .ip DAEMON
  3538. If set,
  3539. code to run a daemon is compiled in.
  3540. This code is for 4.2 or 4.3BSD.
  3541. .ip UGLYUUCP
  3542. If you have a UUCP host adjacent to you which is not running
  3543. a reasonable version of
  3544. .i rmail ,
  3545. you will have to set this flag to include the
  3546. .q "remote from sysname"
  3547. info on the from line.
  3548. Otherwise, UUCP gets confused about where the mail came from.
  3549. .ip NOTUNIX
  3550. If you are using a non-UNIX mail format,
  3551. you can set this flag to turn off special processing
  3552. of UNIX-style
  3553. .q "From "
  3554. lines.
  3555. .ip NAMED_BIND
  3556. Compile in code to use the Berkeley Internet Name Domain (BIND) server
  3557. to resolve TCP/IP host names.
  3558. .ip SETPROCTITLE
  3559. If defined,
  3560. .i sendmail
  3561. will change its
  3562. .i argv
  3563. array to indicate its current status.
  3564. This can be used in conjunction with the
  3565. .i ps
  3566. command to find out just what it's up to.
  3567. .ip NO_WILDCARD_MX
  3568. Should be set if there are no wildcard MX nameserver records
  3569. in the local domain.
  3570. If set, this will enable the use of ANY query types, resulting
  3571. in better performance.
  3572. Unfortunately, wildcard MX records in the local domain will mess
  3573. this up, hence the need for this compilation option.
  3574. .uh "Configuration in src/conf.c"
  3575. .pp
  3576. Not all header semantics are defined in the configuration file.
  3577. Header lines that should only be included by certain mailers
  3578. (as well as other more obscure semantics)
  3579. must be specified in the
  3580. .i HdrInfo
  3581. table in
  3582. .i conf.c .
  3583. This table contains the header name
  3584. (which should be in all lower case)
  3585. and a set of header control flags (described below),
  3586. The flags are:
  3587. .ip H_ACHECK
  3588. Normally when the check is made to see if a header line is compatible
  3589. with a mailer,
  3590. .i sendmail
  3591. will not delete an existing line.
  3592. If this flag is set,
  3593. .i sendmail
  3594. will delete
  3595. even existing header lines.
  3596. That is,
  3597. if this bit is set and the mailer does not have flag bits set
  3598. that intersect with the required mailer flags
  3599. in the header definition in
  3600. sendmail.cf,
  3601. the header line is
  3602. .i always
  3603. deleted.
  3604. .ip H_EOH
  3605. If this header field is set,
  3606. treat it like a blank line,
  3607. i.e.,
  3608. it will signal the end of the header
  3609. and the beginning of the message text.
  3610. .ip H_FORCE
  3611. Add this header entry
  3612. even if one existed in the message before.
  3613. If a header entry does not have this bit set,
  3614. .i sendmail
  3615. will not add another header line if a header line
  3616. of this name already existed.
  3617. This would normally be used to stamp the message
  3618. by everyone who handled it.
  3619. .ip H_TRACE
  3620. If set,
  3621. this is a timestamp
  3622. (trace)
  3623. field.
  3624. If the number of trace fields in a message
  3625. exceeds a preset amount
  3626. the message is returned
  3627. on the assumption that it has an aliasing loop.
  3628. .ip H_RCPT
  3629. If set,
  3630. this field contains recipient addresses.
  3631. This is used by the
  3632. .b \-t
  3633. flag to determine who to send to
  3634. when it is collecting recipients from the message.
  3635. .ip H_FROM
  3636. This flag indicates that this field
  3637. specifies a sender.
  3638. The order of these fields in the
  3639. .i HdrInfo
  3640. table specifies
  3641. .i sendmail's
  3642. preference
  3643. for which field to return error messages to.
  3644. .nr ii 5n
  3645. .lp
  3646. Let's look at a sample
  3647. .i HdrInfo
  3648. specification:
  3649. .(b
  3650. .ta 4n +\w'"return-receipt-to",  'u
  3651. struct hdrinfo    HdrInfo[] =
  3652. \&{
  3653.          /* originator fields, most to least significant  */
  3654.     "resent-sender",    H_FROM,
  3655.     "resent-from",    H_FROM,
  3656.     "sender",    H_FROM,
  3657.     "from",    H_FROM,
  3658.     "full-name",    H_ACHECK,
  3659.          /* destination fields */
  3660.     "to",    H_RCPT,
  3661.     "resent-to",    H_RCPT,
  3662.     "cc",    H_RCPT,
  3663.          /* message identification and control */
  3664.     "message",    H_EOH,
  3665.     "text",    H_EOH,
  3666.          /* trace fields */
  3667.     "received",    H_TRACE|H_FORCE,
  3668.  
  3669.     NULL,    0,
  3670. };
  3671. .)b
  3672. This structure indicates that the
  3673. .q To: ,
  3674. .q Resent-To: ,
  3675. and
  3676. .q Cc:
  3677. fields
  3678. all specify recipient addresses.
  3679. Any
  3680. .q Full-Name:
  3681. field will be deleted unless the required mailer flag
  3682. (indicated in the configuration file)
  3683. is specified.
  3684. The
  3685. .q Message:
  3686. and
  3687. .q Text:
  3688. fields will terminate the header;
  3689. these are specified in new protocols
  3690. [NBS80]
  3691. or used by random dissenters around the network world.
  3692. The
  3693. .q Received:
  3694. field will always be added,
  3695. and can be used to trace messages.
  3696. .pp
  3697. There are a number of important points here.
  3698. First,
  3699. header fields are not added automatically just because they are in the
  3700. .i HdrInfo
  3701. structure;
  3702. they must be specified in the configuration file
  3703. in order to be added to the message.
  3704. Any header fields mentioned in the configuration file but not
  3705. mentioned in the
  3706. .i HdrInfo
  3707. structure have default processing performed;
  3708. that is,
  3709. they are added unless they were in the message already.
  3710. Second,
  3711. the
  3712. .i HdrInfo
  3713. structure only specifies cliched processing;
  3714. certain headers are processed specially by ad hoc code
  3715. regardless of the status specified in
  3716. .i HdrInfo .
  3717. For example,
  3718. the
  3719. .q Sender:
  3720. and
  3721. .q From:
  3722. fields are always scanned on ARPANET mail
  3723. to determine the sender;
  3724. this is used to perform the
  3725. .q "return to sender"
  3726. function.
  3727. The
  3728. .q "From:"
  3729. and
  3730. .q "Full-Name:"
  3731. fields are used to determine the full name of the sender
  3732. if possible;
  3733. this is stored in the macro
  3734. .b $x
  3735. and used in a number of ways.
  3736. .pp
  3737. The file
  3738. .i conf.c
  3739. also contains the specification of ARPANET reply codes.
  3740. There are four classifications these fall into:
  3741. .(b
  3742. .sz -1
  3743. .ta \w'char  'u +\w'Arpa_TUsrerr[] =  'u +\w'"888";  'u
  3744. char    Arpa_Info[] =    "050";    /* arbitrary info */
  3745. char    Arpa_TSyserr[] =    "455";    /* some (transient) system error */
  3746. char    Arpa_PSyserr[] =    "554";    /* some (permanent) system error */
  3747. char    Arpa_Usrerr[] =    "554";    /* some (fatal) user error */
  3748. .sz
  3749. .)b
  3750. The class
  3751. .i Arpa_Info
  3752. is for any information that is not required by the protocol,
  3753. such as forwarding information.
  3754. .i Arpa_TSyserr
  3755. and
  3756. .i Arpa_PSyserr
  3757. is printed by the
  3758. .i syserr
  3759. routine.
  3760. TSyserr
  3761. is printed out for transient errors,
  3762. that is,
  3763. errors that are likely to go away without explicit action
  3764. on the part of a systems administrator.
  3765. PSyserr
  3766. is printed for permanent errors.
  3767. The distinction is made based on the value of
  3768. .i errno .
  3769. Finally,
  3770. .i Arpa_Usrerr
  3771. is the result of a user error
  3772. and is generated by the
  3773. .i usrerr
  3774. routine;
  3775. these are generated when the user has specified something wrong,
  3776. and hence the error is permanent,
  3777. i.e.,
  3778. it will not work simply by resubmitting the request.
  3779. .pp
  3780. If it is necessary to restrict mail through a relay,
  3781. the
  3782. .i checkcompat
  3783. routine can be modified.
  3784. This routine is called for every recipient address.
  3785. It can return
  3786. .b TRUE
  3787. to indicate that the address is acceptable
  3788. and mail processing will continue,
  3789. or it can return
  3790. .b FALSE
  3791. to reject the recipient.
  3792. If it returns false,
  3793. it is up to
  3794. .i checkcompat
  3795. to print an error message
  3796. (using
  3797. .i usrerr )
  3798. saying why the message is rejected.
  3799. For example,
  3800. .i checkcompat
  3801. could read:
  3802. .(b
  3803. .re
  3804. .sz -1
  3805. .ta 4n +4n +4n +4n +4n +4n +4n
  3806. bool
  3807. checkcompat(to)
  3808.     register ADDRESS *to;
  3809. \&{
  3810.     if (MsgSize > 50000 && to->q_mailer != LocalMailer)
  3811.     {
  3812.         usrerr("Message too large for non-local delivery");
  3813.         NoReturn = TRUE;
  3814.         return (FALSE);
  3815.     }
  3816.     return (TRUE);
  3817. }
  3818. .sz
  3819. .)b
  3820. This would reject messages greater than 50000 bytes
  3821. unless they were local.
  3822. The
  3823. .i NoReturn
  3824. flag can be sent to suppress the return of the actual body
  3825. of the message in the error return.
  3826. The actual use of this routine is highly dependent on the
  3827. implementation,
  3828. and use should be limited.
  3829. .uh "Configuration in src/daemon.c"
  3830. .pp
  3831. The file
  3832. .i src/daemon.c
  3833. contains a number of routines that are dependent
  3834. on the local networking environment.
  3835. The version supplied is specific to 4.3 BSD.
  3836. .pp
  3837. The routine
  3838. .i maphostname
  3839. is called to convert strings within
  3840. .b $[
  3841. \&...\&
  3842. .b $]
  3843. symbols.
  3844. It can be modified if you wish to provide a more sophisticated service,
  3845. e.g.,
  3846. mapping UUCP host names to full paths.
  3847. .+c "SUMMARY OF SUPPORT FILES"
  3848. .pp
  3849. This is a summary of the support files
  3850. that
  3851. .i sendmail
  3852. creates or generates.
  3853. .nr ii 1i
  3854. .ip "/usr/lib/sendmail"
  3855. The binary of
  3856. .i sendmail .
  3857. .ip /usr/bin/newaliases
  3858. A link to /usr/lib/sendmail;
  3859. causes the alias database to be rebuilt.
  3860. Running this program is completely equivalent to giving
  3861. .i sendmail
  3862. the
  3863. .b \-bi
  3864. flag.
  3865. .ip /usr/bin/mailq
  3866. Prints a listing of the mail queue.
  3867. This program is equivalent to using the
  3868. .b \-bp
  3869. flag to
  3870. .i sendmail .
  3871. .ip /usr/lib/sendmail.cf
  3872. The configuration file,
  3873. in textual form.
  3874. .ip /usr/lib/sendmail.fc
  3875. The configuration file
  3876. represented as a memory image.
  3877. .ip /usr/lib/sendmail.hf
  3878. The SMTP help file.
  3879. .ip /usr/lib/sendmail.st
  3880. A statistics file; need not be present.
  3881. .ip /usr/lib/aliases
  3882. The textual version of the alias file.
  3883. .ip /usr/lib/aliases.{pag,dir}
  3884. The alias file in
  3885. .i dbm \|(3)
  3886. format.
  3887. .ip /usr/spool/mqueue
  3888. The directory in which the mail queue
  3889. and temporary files reside.
  3890. .ip /usr/spool/mqueue/qf*
  3891. Control (queue) files for messages.
  3892. .ip /usr/spool/mqueue/df*
  3893. Data files.
  3894. .ip /usr/spool/mqueue/lf*
  3895. Lock files
  3896. .ip /usr/spool/mqueue/tf*
  3897. Temporary versions of the qf files,
  3898. used during queue file rebuild.
  3899. .ip /usr/spool/mqueue/nf*
  3900. A file used when creating a unique id.
  3901. .ip /usr/spool/mqueue/xf*
  3902. A transcript of the current session.
  3903. .\".ro
  3904. .\".ls 1
  3905. .\".tp
  3906. .\".sp 2i
  3907. .\".in 0
  3908. .\".ce 100
  3909. .\".sz 24
  3910. .\".b SENDMAIL
  3911. .\".sz 14
  3912. .\".sp
  3913. .\"INSTALLATION AND OPERATION GUIDE
  3914. .\".sp
  3915. .\".sz 10
  3916. .\"Eric Allman
  3917. .\"Britton-Lee, Inc.
  3918. .\".sp
  3919. .\"Version 5.13
  3920. .\".ce 0
  3921. .pn 2
  3922. .bp
  3923. .ce
  3924. .sz 12
  3925. TABLE OF CONTENTS
  3926. .sz 10
  3927. .sp
  3928. .\" remove some things to avoid "out of temp file space" problem
  3929. .rm sh
  3930. .rm (x
  3931. .rm )x
  3932. .rm ip
  3933. .rm pp
  3934. .rm lp
  3935. .rm he
  3936. .rm fo
  3937. .rm eh
  3938. .rm oh
  3939. .rm ef
  3940. .rm of
  3941. .xp
  3942.