home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / sendmail / uk-sendmail2.1 / Docs / Guide.ms next >
Encoding:
Text File  |  1991-06-11  |  24.8 KB  |  854 lines

  1. .TL
  2. Sendmail Configuration Package UK-2.1
  3. .sp
  4. User Guide
  5. .AU
  6. Jim Crammond
  7. .AI
  8. Dept of Computing,
  9. Imperial College, London, England
  10. .AU
  11. Jem Taylor
  12. .AI
  13. Dept of Computing Science,
  14. University of Glasgow, Glasgow, Scotland
  15. .DA 22 March 1989
  16. .LP
  17. .NH
  18. The Configuration Description File
  19. .NH 2
  20. Purpose
  21. .LP
  22. The configuration description file names all the options and data required for
  23. producing a particular sendmail configuration file.
  24. It is invoked by the command
  25. .IP
  26. % Config <configfile>
  27. .LP
  28. We recommend that all configuration description files be named
  29. .I config. <name>
  30. where <name> is the same as the value of the config=<name> directive in the
  31. configuration description.
  32. .NH 2
  33. Mandatory directives
  34. .LP
  35. The following directives are obligatory in the file
  36. and must come before any domain or channel declarations:
  37. .IP config=<name>
  38. This specifies the
  39. .I "configuration name"
  40. which is usually the hostname of the target system, or the name of a
  41. class of hosts such as "slave". It simply determines the names of certain
  42. files created when making the configuration.
  43. .IP domain=<domainname>
  44. This should be the official domain name as registered with some administrative
  45. body such as the NRS or NIC.
  46. In the absence of any such official name, a pseudo-domain-name such as 'uucpname'.uucp
  47. should be used; however this should be done only
  48. as a strictly interim measure until a name is officially registered.
  49. .NH 2
  50. Optional directives
  51. .LP
  52. The following directives are optional, but must come before any domain
  53. or channel declarations:
  54. .IP configdir=<subdirectory>
  55. This specifies the subdirectory in which to create the files that
  56. make up the sendmail configuration file. By default, this is set
  57. to the configuration name.
  58. .IP tabledir=<subdirectory>
  59. This specifies the subdirectory which contains the domain
  60. and channel tables. This allows tables for several configurations
  61. to be stored in the same directory, if desired.
  62. By default, this is set to the configuration name,
  63. .IP postmaster=<mailbox>
  64. This is the local mailbox from which errors are generated.
  65. Sensible values include "POSTMASTER" (the default) and "MAILER-DAEMON".
  66. .IP options=<option1>,<option2>,...
  67. This directive may be used to select optional processing. Options include:
  68. .RS
  69. .IP multihost
  70. The configuration is for a "multihost" site - i.e. more than one host will
  71. show itself to the outside world with the domain name <domainname>.
  72. In addition, this host has a host specific domain name of the
  73. form `hostname`.<domainname>
  74. .IP nrsformat
  75. This enables addresses with domains in the NRS domain order to be
  76. recognised and generated. This option MUST be specified if the janet
  77. channel is used.
  78. .IP nameserver
  79. For sendmails which contain nameserver code, this makes a
  80. request to the nameserver to obtain the official domain name of
  81. a host/domain. It should not be specified unless all sendmails
  82. which will use the configuration have the nameserver code compiled in.
  83. .RE
  84. .IP install=<flags>
  85. Set the flags to be used in the call to Install.sh from the Makefile created
  86. by Config (see section 4).
  87. .NH 2
  88. Domain declarations
  89. .LP
  90. Domain declarations may be repeated as often as necessary and take the following form
  91. .IP
  92. domain
  93. .I type
  94. file="
  95. .I filename
  96. "
  97. .LP
  98. type may be 'std', 'ida' or 'top'.
  99. A domain declaration of the standard type 'std' indicates that
  100. .I filename
  101. is a domain table to be compiled directly into sendmail rules and classes.
  102. If the type is 'ida' then instead
  103. .I filename
  104. will be compiled into a dbm database file which is called from
  105. the sendmail configuration file using a dbm lookup facility.
  106. The type 'top' specifies that
  107. .I filename
  108. is a domain table listing top level domains.
  109. .NH 2
  110. Channel declarations
  111. .LP
  112. Channel declarations may also be repeated as often as is needed
  113. for each channel. The existance
  114. of a channel is declared by one or more declarations of the appropriate type.
  115. The form of a channel declaration is
  116. .IP
  117. channel
  118. .I type
  119. file="
  120. .I filename
  121. " [,
  122. .I channeloption ]*
  123. .LP
  124. where
  125. .I type
  126. is a channel type,
  127. .I filename
  128. is a channel table, and
  129. .I channeloption
  130. is an option specific to this channel.
  131. .KS
  132. .NH 3
  133. Channel types
  134. .LP
  135. Valid channel types include:
  136. .IP
  137. local ether tcp uucp janet
  138. news decnet csnet xerox top
  139. .KE
  140. .LP
  141. Details about the channel tables are given in section 3.
  142. .NH 3
  143. Channel options
  144. .LP
  145. Channel specific options include the following possibilities:
  146. .IP "local channel:"
  147. .RS
  148. .IP showldomain
  149. Local addresses are presented locally with the local domain name appended.
  150. By default, the local domain name is
  151. stripped from addresses in headers leaving just the username.
  152. .IP shownrs
  153. All domain addresses are presented locally
  154. in NRS domain ordering (i.e. big-endian).
  155. By default, all addresses are presented in RFC822 order.
  156. The "nrsformat" option is required with this option.
  157. .IP showuucp
  158. Addresses containing two or more hostnames are presented locally
  159. in uucp bang style.
  160. .RE
  161. .IP "uucp channel:"
  162. .RS
  163. .IP sysname=<name>
  164. Set the uucp system name this machine is known by to <name>.
  165. .IP "muucp "
  166. Use the muucp program to interface with uucp
  167. (supplied in the Support directory) instead of calling uux directly.
  168. .RE
  169. .IP "janet channel:"
  170. .RS
  171. .IP hhsend
  172. Set the mailer specification to use hhsend (York X.25) instead of
  173. ni_send (Unix-Niftp).
  174. .RE
  175. .IP "news channel:"
  176. .RS
  177. .IP relayed
  178. This indicates that
  179. .I all
  180. news is relayed to another host.
  181. .RE
  182. .IP "uucp, janet, decnet, csnet and xerox channels:"
  183. .RS
  184. .IP auth
  185. Set the mailer specification to invoke the authorise program for 
  186. mail authorisation by host. The authorise program in the Support
  187. directory needs to be installed to use this option.
  188. .RE
  189. .IP "all channels:"
  190. .RS
  191. .IP ida
  192. Rather than generate sendmail rules directly from the channel table,
  193. create an IDA database file and arrange for sendmail to lookup
  194. this file instead (see section 3).
  195. The configuration should not be exported to another host unless
  196. that host also has access to the same file by the same name.
  197. This option does not apply to local, uucp or news channels.
  198. .IP "ldomain=<domainname>"
  199. Messages sent on this channel will have the local domain name
  200. stamped as <domainname> rather than the official domain name.
  201. This has no effect on the local channel.
  202. .RE
  203. .NH
  204. Domain Tables
  205. .NH 2
  206. General
  207. .LP
  208. It is recommended that you have some idea of what domains are before
  209. you start. RFC819 (supplied with the sendmail documentation) is a good
  210. starting point for this.
  211. .LP
  212. The domain tables provide the information that allows sendmail
  213. to expand host/site names or abbreviated domain names to fully
  214. qualified domain names.
  215. .LP
  216. The tables consist of rules (1 per line) which consist of two
  217. strings separated by white space. Essentially, any address whose
  218. domain part ends in the string given on the LHS of a rule will be
  219. expanded to the string given on the RHS.
  220. .LP
  221. For example, if the following entry was in the domain tables
  222. .DS I
  223. hw hw.ac.uk
  224. .DE
  225. .LP
  226. then a user can give the address 
  227. .I jim@hw
  228. and sendmail will expand this to the fully qualified name 
  229. .I jim@hw.ac.uk.
  230. Also, this will expand
  231. .I jim@cs.hw
  232. to
  233. .I jim@cs.hw.ac.uk .
  234. .SH
  235. Notes
  236. .IP (1)
  237. The above line will NOT cause 
  238. .I jim@hw.ac
  239. to be expanded to
  240. .I jim@hw.ac.uk .
  241. To achieve this, the line
  242. .DS I
  243. ac ac.uk
  244. .DE
  245. .IP
  246. must also be included in the domain tables.
  247. (This is a change from previous versions of UK-sendmail).
  248. .IP (2)
  249. The names in the domain tables must be given in RFC822
  250. (little-endian) form with the most general part rightmost. e.g. hw.ac.uk,
  251. regardless of whether the "nrsformat" option has been specified.
  252. .LP
  253. Probably the minimum information you need to specify in the domain tables
  254. is a mapping from your host name to your domain name, e.g.
  255. .DS I
  256. sun6 sun6.cs.hw.ac.uk
  257. .DE
  258. .LP
  259. This would mean users would always have to give fully qualified addresses
  260. to send mail elsewhere.
  261. .LP
  262. In the NRS registration scheme, domain names are structured with "uk"
  263. at the top level, with two main subdomains distinguishing
  264. academic from commercial sites,
  265. and institution or company names at the third level.
  266. .LP
  267. A sensible choice for domain tables in such a scheme would be to
  268. include siblings of the subdomains that make up your domain name
  269. starting from the institution name (third level),
  270. e.g. for the host 
  271. .I sun6.cs.hw.ac.uk 
  272. this means all subdomains of "ac.uk", "hw.ac.uk" and "cs.hw.ac.uk".
  273. .LP
  274. You can add further information, for example, you may wish to specify
  275. all the subdomains of "co.uk" as well as "ac.uk". Beware of naming
  276. conflicts, however, as there are some cases in the NRS that could
  277. cause problems.
  278. For example, if the entry
  279. .DS I
  280. kl kl.york.ac.uk
  281. .DE
  282. .LP
  283. was in your tables, then mail to Keele Computer Science addressed as
  284. .I jim@cs.kl
  285. will be expanded to 
  286. .I jim@cs.kl.york.ac.uk
  287. instead of 
  288. .I jim@cs.kl.ac.uk
  289. (the full address 
  290. .I jim@cs.kl.ac.uk
  291. will work correctly, of course).
  292. The
  293. .I Domcheck
  294. program can spot cases where you have placed entries in your tables
  295. with the same LHS but different RHSs.
  296. .KS
  297. .LP
  298. Domain name aliases can also be included in these files; so
  299. for example, you could convert NRS abbreviated form names to standard form
  300. with the following entries:
  301. .DS I
  302. cs.gla.ac.uk cs.glasgow.ac.uk
  303. clust.hw.ac.uk cluster.heriot-watt.ac.uk
  304. doc.ic.ac.uk doc.imperial.ac.uk
  305. .DE
  306. .KE
  307. .LP
  308. so that 
  309. .I jim@clust.hw.ac.uk
  310. will be aliased to 
  311. .I jim@cluster.heriot-watt.ac.uk .
  312. .LP
  313. It should be noted that many domain aliases placed in a standard type
  314. domain table can result in generating a large
  315. sendmail configuration file, so if you map all (700+) abbreviated form NRS
  316. names to their standard form then your sendmail may run rather slowly!
  317. .LP
  318. This is an example where IDA sendmail is useful; by changing the domain
  319. table type to 'ida', a dbm(3) file is created from which IDA sendmail will
  320. lookup the domain directly. The effect is exactly the same as before only
  321. probably much faster, especially as sendmail does not have to load
  322. such a large configuration file when it is invoked.
  323. .LP
  324. If you have Yellow Pages compiled into your /usr/lib/sendmail program,
  325. and your yellow pages database only contains entries for hosts within
  326. one domain then you can use a rule such as:
  327. .DS I
  328. $%y $2.cs.hw.ac.uk
  329. .DE
  330. .LP
  331. to map all of these hostnames to domain names.
  332. .LP
  333. Finally, a "#" in the tables starts a line of comment. All text after
  334. the "#" up to the next newline is ignored.
  335. .NH 2
  336. Top Level Domains
  337. .LP
  338. Top-domain tables are treated specially.
  339. These files contain a list of top level domain names.
  340. .LP
  341. The format of these tables is compatible with the top channel
  342. tables: a top level domain name on the LHS and a relaying domain on
  343. the RHS, e.g.
  344. .DS I
  345. uk ukc.ac.uk
  346. .DE
  347. .LP
  348. Thus you can link the top channel and top domain files, if you wish.
  349. Alternatively,
  350. if the top channel file contains a special directive such as
  351. "ALL" or "DEFAULT", then a single column list of top level domains
  352. can be used for the domain table.
  353. .NH 2
  354. Shorthand Notation
  355. .LP
  356. Where a domain table entry is a domain specification rather than an alias,
  357. i.e. the LHS is a single token which appears as the first subdomain on
  358. the RHS, then the LHS can be omitted. For example,
  359. .DS I
  360. cs cs.glasgow.ac.uk
  361. .DE
  362. .LP
  363. can be entered as
  364. .DS I
  365. cs.glasgow.ac.uk
  366. .DE
  367. .LP
  368. but
  369. .DS I
  370. mcvax cwi.nl
  371. .DE
  372. .LP
  373. must be given as shown. This shorthand notation makes it possible to use
  374. the same file for both local network domain data and local ethernet channel
  375. data (see later).
  376. .NH 2
  377. Examples
  378. .LP
  379. The directory Examples contains sample domain tables.
  380. These can be used as a starting point for creating your domain tables.
  381. .KS
  382. .NH
  383. Channel tables
  384. .NH 2
  385. General
  386. .LP
  387. Having expanded addresses into fully qualified domain addresses, sendmail
  388. then selects the appropriate mailer and routing. The channel tables
  389. provide the information to associate a domain name with a mailer (or channel)
  390. and transport address (or route).
  391. .LP
  392. The channel tables contain rules (1 per line) containing
  393. two strings separated by white space. In general, the string on the LHS
  394. is a fully qualified domain name and the string on the RHS is the route
  395. or "host to send to", e.g.
  396. .IP
  397. cs.hw.ac.uk sun6
  398. .LP
  399. specifies that addresses of the form
  400. .I user@cs.hw.ac.uk
  401. should be send to the host 
  402. .I sun6 .
  403. .KE
  404. .LP
  405. If sendmail fails to find a match for a domain, e.g.
  406. .I "sun4.cs.hw.ac.uk"
  407. in the main channel tables, then it retries with successively higher level
  408. domains, e.g.
  409. .I "cs.hw.ac.uk",
  410. .I "hw.ac.uk"
  411. and 
  412. .I "ac.uk" .
  413. If these fail then the top level domain relaying rule for 
  414. .I "uk"
  415. is applied and  matching begins again with the domain given as the relay for
  416. .I "uk".
  417. .LP
  418. The actual format of the channel tables depends on the mailer. The minimum
  419. information you need to specify depends on what mailers you
  420. have, but is essentially:
  421. .IP (a)
  422. the domain name(s) the local host is known by,
  423. .IP (b)
  424. the names of directly connected hosts,
  425. .IP (c)
  426. the list of top level domain relaying sites (see below).
  427. .LP
  428. The maximum information you can specify is limited by practical
  429. considerations such as the number of rules sendmail can cope with
  430. before running very slowly. As a guide, if more than 100 rules are
  431. generated in the channel section of the configuration, you may wish to cut down
  432. the number of entries in the channel tables.
  433. .LP
  434. Careful use of top level domain relays and/or wildcards will often help.
  435. For example, if 
  436. .I ukc.ac.uk
  437. is specified as the uucp relay,
  438. then there is no need to specify any routes for uucp sites which has
  439. "ukc!" in the path (ukc.ac.uk has an extensive nameserver to do
  440. further routing).
  441. .LP
  442. Those with IDA sendmail can compile some large channel tables into
  443. ida databases. This is particularly useful for the janet channel.
  444. Note that ida channel tables may not contain wildcards.
  445. .NH 2
  446. Channel Table Formats
  447. .LP
  448. The actual format of the channel tables depends on
  449. the channel type (i.e. mailer) that is specified in the configuration
  450. description file. These are listed below. Note, however, that
  451. all of the channel tables use the same convention for
  452. comments as used for the domain tables.
  453. .NH 3
  454. local channel
  455. .LP
  456. This contains a one-per-line list of (fully qualified) domain names
  457. which are to be treated as local mail. In a 'multihost' this must
  458. include the site domain name and the host specific domain name, e.g.
  459. .DS I
  460. cs.hw.ac.uk
  461. sun6.cs.hw.ac.uk
  462. .DE
  463. .LP
  464. In order to allow hosts to share the same sendmail configuration file,
  465. the keyword "LHOST" must be used in place of the actual hostname, i.e.
  466. .DS I
  467. LHOST.cs.hw.ac.uk
  468. .DE
  469. .LP
  470. LHOST is substituted by the hostname (as returned by 
  471. .I hostname(1)
  472. ) when
  473. sendmail starts up. Obselete names still in use, such as
  474. .IP
  475. hwcs.uucp
  476. .LP
  477. should also be included here.
  478. .TA
  479. .NH 3
  480. general case channel
  481. .LP
  482. The ether, tcp, xerox, decnet and csnet channels all use the same
  483. "standard" channel format, as described above; a domain name on the LHS in
  484. little-endian order, and a hostname to send/relay to on the RHS.
  485. If the host name on the RHS is the same as the first subdomain, then the
  486. RHS can be omitted. Thus
  487. .DS I
  488. sun3.doc.ic.ac.uk
  489. .DE
  490. .LP
  491. is equivalent to
  492. .DS I
  493. sun3.doc.ic.ac.uk sun3
  494. .DE
  495. .LP
  496. This shorthand notation makes it possible to use the same file both as an
  497. ethernet channel table and local domain table, for example.
  498. .KS
  499. .LP
  500. In addition, the LHS can contain
  501. .I wildcards ,
  502. specified by "%s", meaning "one or more tokens". So,
  503. .DS I
  504. %s.ncr.com sun4
  505. .DE
  506. .LP
  507. sends anything ending 
  508. .I .ncr.com
  509. to the uucp relay host,
  510. .I sun4 .
  511. The RHS can also contain wildcards which correspond to the tokens matched
  512. by the wildcard on the LHS. For example, an ether channel with
  513. .DS I
  514. %s.ee.ic.ac.uk ee.%s
  515. .DE
  516. .LP
  517. would send mail for 
  518. .I jim@vax2.ee.ic.ac.uk
  519. to the host 
  520. .I ee.vax2
  521. (as given in /etc/hosts).
  522. .KE
  523. .KS
  524. .LP
  525. If sendmail supports Yellow Pages, and the Yellow Pages
  526. .I hosts
  527. database only contains entries for hosts in one domain, then the
  528. special token "$%y" may be used in the following way to specify that mail
  529. to all hosts in the yellow pages database be sent directly:
  530. .DS I
  531. $%y.cs.glasgow.ac.uk $2
  532. .DE
  533. .KE
  534. .SH
  535. Notes
  536. .IP (1)
  537. The Yellow Pages special token may not be used in entries containing wildcards.
  538. .IP (2)
  539. Wildcard entries are processed after non-wildcard entries. So, given
  540. the following entries in a tcp table:
  541. .DS I
  542. %s.cs.ucl.ac.uk %s.cs.ucl.ac.uk
  543. cs.ucl.ac.uk cs.ucl.ac.uk
  544. .DE
  545. An address such as 
  546. .I jim@nss.cs.ucl.ac.uk
  547. will be routed to
  548. .I cs.ucl.ac.uk
  549. by the second rule, and not sent direct. However, wildcard rules are processed
  550. in the order in which they are presented, so
  551. .DS I
  552. %s.hw.ac.uk hw-relay
  553. %s.ac.uk ac-relay
  554. .DE
  555. should be used, rather than the reverse order.
  556. .IP (3)
  557. Internet based sites usually pass addresses to the tcp channel
  558. by default; this can be achieved with entries in the tcp
  559. channel table like:
  560. .DS
  561. # all arpa addresses to tcp
  562. %s.edu %s.edu
  563. %s.com %s.com
  564. .DE
  565. for each of the arpa-based top level domains.
  566. .NH 3
  567. janet channel
  568. .LP
  569. The LHS domain name is in
  570. .I big-endian
  571. form in this table. The RHS is a "hostname" to send to which corresponds
  572. to the entry given in the ftp host tables. For example,
  573. .DS I
  574. # hw.cs is directly on janet
  575. uk.ac.hw.cs uk.ac.hw.cs
  576.  
  577. # hw.ee uses hw.cs as an application relay
  578. uk.ac.hw.ee uk.ac.hw.cs
  579. .DE
  580. .LP
  581. The LHS and RHS may contain wildcards in the same way as in the
  582. general case channel, thus:
  583. .DS I
  584. uk.co.stc.%s uk.ac.ukc
  585. .DE
  586. .SH
  587. Notes
  588. .IP (1)
  589. If the RHS is the same as the LHS, it can be omitted; if it differs
  590. then correct JNT Application Relaying is done.
  591. .IP (2)
  592. In previous versions of UK-sendmail the janet channel would automatically
  593. assume that all "uk.ac.<name>" domains are to be routed to "uk.ac.<name>"
  594. and all "uk.co.<name>" domains are to be routed to "uk.co.<name>".
  595. It is now necessary to use the lines
  596. .DS I
  597. uk.ac.%s
  598. uk.co.%s
  599. .DE
  600. to achieve this effect if desired.
  601. .IP (3)
  602. If you do not map standard form NRS names to abbreviated from (or vice versa)
  603. in the domain tables then any entries in the janet channel table should
  604. include both forms of name on the LHS.
  605. .IP (4)
  606. In previous versions of UK-Sendmail, incoming mail from the Greybook mail
  607. listener was passed to sendmail with a command line like
  608. .DS C
  609. /usr/lib/sendmail -oiY -oMsuk.ac.sender.name ...etc...
  610. .DE
  611. This version requires that the sender domain be set in macro 
  612. .I S
  613. rather than
  614. .I s
  615. for correct Via: headers to be generated. Use 
  616. .DS C
  617. /usr/lib/sendmail -oiY -oMSuk.ac.sender.name ...etc...
  618. .DE
  619. to achieve this, by means of the MAILFMT directive in
  620. .I /etc/niftptailor
  621. if using the Unix-Niftp package.
  622. .IP (5)
  623. When generating janet channel tables from data derived from the NRS by the
  624. .I c-nrs
  625. program, beware that it is assumed that the right hand side points to a
  626. site that the delivery agent will know about. If the right hand side is
  627. itself an application relay, then sendmail will not recursively resolve it.
  628. When using the Unix-Niftp package this is not normally a problem, unless
  629. one of the hosts involved is particularly demanding about JNT mail
  630. application relaying; Unix-Niftp will find the DTE address of the final
  631. application relay, but does not modify the JNT mail header when doing so.
  632. .IP
  633. The authors believe that any such problems should be dealt with during
  634. the generation of the text of the channel table, rather than by sendmail.
  635. .LP
  636. .KS
  637. .NH 3
  638. uucp channel
  639. .LP
  640. This has a slightly different RHS syntax which the same as that
  641. produced by 
  642. .I pathalias(1 ),
  643. e.g.
  644. .IP
  645. vax1.ee.hw.ac.uk sun2!vax1!%s
  646. .LP
  647. where %s is the user part of the address (converted to uucp form).
  648. .KE
  649. .LP
  650. In the frequent case where the RHS consists of the first token of the LHS
  651. suffixed with "!%s" then the RHS may be omitted. Thus the two
  652. following entries are equivalent:
  653. .DS I
  654. ukc.ac.uk ukc!%s
  655. ukc.ac.uk
  656. .DE
  657. .LP
  658. This again allows a file written completely in this shorthand notation
  659. to be used both as a domain and a channel file.
  660. .NH 3
  661. top channel
  662. .LP
  663. The top channel has a top level domain name on the LHS and a domain name
  664. on the RHS, e.g.
  665. .DS I
  666. uk ukc.ac.uk
  667. .DE
  668. .LP
  669. which states that any address in the 
  670. .I "uk"
  671. domain, which did not match a domain name in one of the mailer channel tables,
  672. is sent to
  673. .I ukc.ac.uk .
  674. .LP
  675. If you feel tempted to put
  676. .DS I
  677. %s.com nss.cs.ucl.ac.uk
  678. .DE
  679. .LP
  680. into the tcp channel for example, you should instead put
  681. .DS I
  682. com nss.cs.ucl.ac.uk
  683. .DE
  684. .LP
  685. into the top channel. The latter will use the channel tables to
  686. find a route for 
  687. .I "nss.cs.ucl.ac.uk" ,
  688. whereas the latter assumes it is directly connected (via tcp).
  689. If all but a few top domains are relayed by the same
  690. relay, you can use the 
  691. .I "DEFAULT"
  692. keyword, e.g.
  693. .DS I
  694. DEFAULT gateway.cs.hw.ac.uk
  695. .DE
  696. .LP
  697. to specify that any top level domains listed in the top domain file,
  698. for which no relay is explictly given, should be sent to the default relay.
  699. On small or infrequently maintained machines, or when there is only
  700. one possible relay, the keyword 
  701. .I "ALL"
  702. can be used, e.g.
  703. .DS I
  704. ALL gateway.cs.hw.ac.uk
  705. .DE
  706. .LP
  707. which causes all addresses that are not matched in any other
  708. channel to be sent to the relay even if they do not contain a recognised
  709. top level domain. This allows "slave" style configurations to be built.
  710. .SH
  711. Note
  712. .IP
  713. Make sure that the domains on the RHS of the relaying rules
  714. eventually match some domain on the LHS of a rule in one of the mailer
  715. channel tables.
  716. .LP
  717. .KS
  718. .NH 3
  719. news channel
  720. .LP
  721. This has a newsgroup hierarchy name on the LHS and an optional
  722. relay name on the RHS, for example:
  723. .DS I
  724. comp.binaries.%s sun3
  725. comp.%s
  726. bionet.%s biovax
  727. news.%s
  728. soc.%s
  729. .DE
  730. .KE
  731. .LP
  732. which sends mail for comp.binaries.<anything> to comp.binaries.<..>@sun3
  733. and similarly mails messages to bionet.<anything> to bionet.<..>@biovax
  734. but delivers comp.<anything-else>, news.<anything> and soc.<anything> to
  735. the news system on the local host. The mail-news program from the
  736. Support directory should be installed on all hosts where news is not
  737. relayed elsewhere.
  738. .SH
  739. Note
  740. .IP
  741. The news channel acts on LOCAL USER NAMES not DOMAIN NAMES
  742. .NH 3
  743. bitnet channel
  744. .LP
  745. The bitnet channel has been discontinued. If you need it, you are invited to
  746. re-implement it and send the authors the patches.
  747. .NH 2
  748. Order of channel declarations may be significant
  749. .LP
  750. Channel tables are processed in the order in which they are specified.
  751. When using wildcard rules, it may be necessary to change the order of
  752. channel table declarations, or split a channel table into two files with
  753. another interleaved between them, for the following reason. If two channels
  754. are declared
  755. .DS I
  756. channel tcp file="tcp.chn"
  757. channel ether file="ether.chn"
  758. .DE
  759. .LP
  760. and the files contain
  761. .DS I
  762. # tcp.chn
  763. %s.com
  764.  
  765. # ether.chn
  766. %s.ncr.com
  767. .DE
  768. .LP
  769. then the tcp channel will 'steal' messages for host.ncr.com, because the
  770. more general wildcard will be processed first. The cure is to reverse the
  771. order of the table declarations in the 
  772. .I config.site
  773. file.
  774. .NH 2
  775. Examples
  776. .LP
  777. The directory Examples contains sample channel tables.
  778. These can be used as a starting point for creating your channel tables.
  779. .NH
  780. Site specific modifications to base.m4
  781. .LP
  782. If a file named
  783. .I localise.sh
  784. exists in the configuration directory, it will be executed by
  785. .I Config
  786. to, for example, change details of
  787. .I base.m4
  788. such as the load average above which no work is done. The example
  789. in the Examples directory uses 
  790. .I ed(1)
  791. to achieve this.
  792. .NH
  793. Installing the configuration file
  794. .LP
  795. "make test" will invoke sendmail in test mode to enable you to verify
  796. that the configuration can resolve addresses correctly. You should
  797. read the sendmail documentation if you are unfamiliar with this facility.
  798. .LP
  799. There is a shell script called 
  800. .I Install.sh
  801. that will install a sendmail
  802. configuration file. Install.sh is called with the following arguments:
  803. .DS C
  804. Install.sh [-f] [-n] [-s] <host> [ <configfile> ]
  805. .DE
  806. .LP
  807. By default, this will copy the <configfile> to /usr/lib/sendmail.cf on <host>,
  808. create a freeze file and then restart the sendmail daemon.
  809. If the 
  810. .I -f 
  811. option is given a freeze file is
  812. .I not
  813. created. This is usually necessary for shared configurations, or when your
  814. sendmail uses Yellow Pages. The 
  815. .I -n 
  816. option does not copy the configuration file,
  817. it only restarts the daemon. This is used for all but the first of a group of
  818. hosts which share the same copy of /usr/lib/sendmail.cf via NFS.
  819. The 
  820. .I -s
  821. option is used when the 
  822. .I target
  823. system has a System V style 
  824. .I ps(1) .
  825. .LP
  826. Where a configuration is made for a single host, "make install"
  827. will call Install.sh to install the configuration file for that host.
  828. Where it is shared, a shell script should be set up to call Install.sh for
  829. each of the hosts sharing the configuration.
  830. .SH
  831. Notes
  832. .IP (1)
  833. In versions of Sun software from SunOS 4.0, sendmail.cf lives in /etc so
  834. that /usr/lib can be shared more widely. If you are running the same
  835. sendmail.cf on many clients, put it in /usr/lib and make a symblink from
  836. /etc/sendmail.cf to /usr/lib/sendmail.cf on each client. If you have
  837. an NFS server which serves one configuration to its clients but uses another
  838. itself, put its own in /etc . You will need to write a short script using rcp
  839. and Install.sh -n to handle such a case.
  840. .NH
  841. Checking for name clashes
  842. .LP
  843. "make check" will run
  844. .I Domcheck
  845. on the domain tables and
  846. .I Chncheck
  847. on the channel tables used in the configuration.
  848. These programs will warn you of any name clashes or obvious
  849. syntax errors you have in your tables.
  850. .LP
  851. If you run "make install" from /usr/adm/weekly for example, we recommend
  852. that you instead run "make check install" so that none of the errors which
  853. Domcheck can detect will be put into your live system.
  854.