home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume7 / smail / part1 next >
Encoding:
Internet Message Format  |  1986-11-30  |  68.1 KB

  1. Subject:  v07i009:  Domain mailer and rmail replacement, Part01/02
  2. Newsgroups: mod.sources
  3. Approved: mirror!rs
  4.  
  5. Submitted by: Mark Horton <mark@cbosgd.ATT.COM>
  6. Mod.sources: Volume 7, Issue 9
  7. Archive-name: smail/Part01
  8.  
  9. [  Do not confuse this with the "Smail" written by Steven List of
  10.    Benetics that was published in Volume 1.  --r$  ]
  11.  
  12. # To unpack the enclosed files, please use this file as input to the
  13. # Bourne (sh) shell.  This can be most easily done by the command;
  14. #     sh < thisfilename
  15.  
  16. # This archive contains;
  17. #  INFO.CHANGES     INFO.DOCS           INFO.DOMAINS        INFO.FLOW_DIAG
  18. #  INFO.INSTALL     INFO.README         INFO.REGISTRY       INFO.SENDMAIL
  19. #  INFO.SMAIL.8     INFO.TODO           INFO.TROUBLE
  20.  
  21.  
  22. # ---------- file INFO.CHANGES ----------
  23.  
  24. filename="INFO.CHANGES"
  25.  
  26. if [ -f $filename ]
  27. then
  28.   echo File \"$filename\" already exists\!  Skipping...
  29.   filename=/dev/null        # throw it away
  30. else
  31.   echo extracting file INFO.CHANGES...
  32. fi
  33.  
  34. cat << 'END-OF-FILE' > $filename
  35. 86/07/08:
  36. Various minor bugs fixed before 1.0 distribution.
  37.  
  38. Gateway code checks for $- instead of $*, so you can mail to
  39. subdomains of other nodes in your gateway (e.g. so cbosgd.ATT.COM
  40. can mail to bonnie.clyde.ATT.COM)
  41.  
  42. Fixed rmail so that if the uux fails, it calls sendmail, which calls
  43. smail -r (or -R) to route to the host, yet rmail's exit status is 0.
  44.  
  45. Fixed a bug preventing mail looped to yourself from being parsed right.
  46.  
  47. 86/05/09:
  48. Documentation polished for distribution.
  49.  
  50. 86/03/30 resolve.c:
  51. added code to route() to try leading dot first
  52.  
  53. 86/03/30 resolve.c:
  54. took out qualifydomain, since it turned x.UUCP into x.UUCP.COM
  55.  
  56. 85/11/14 resolve.c:
  57. Changes from rti.
  58.  
  59. Sun Oct 13 19:10:08 PDT 1985
  60. Changes from several weeks ago:
  61.  
  62. General:
  63.     new, active sccs headers (not frozen politik ones)
  64.  
  65. Sendmail.cf:
  66.     ether and uucp preemption:
  67.         F and U classes to siphon off mail to neighboring ether
  68.         and uucp hosts, before kicking to default disposition
  69.         (usally smail).  Other classes possible.
  70.     selection of default disposition:
  71.         either smail, ethernet relay, or uucp relay
  72.     support for route-addrs:
  73.         Rewrites <@hosta,rest-of-address> into hosta!rest-of-address
  74.         for safe passage to hosta via smail.
  75.     extensible construction:
  76.         ether and uucp classes model preemption
  77.         symmetrical code for similar operations
  78.         only one interface to UUCP (smail via dom)
  79.         pleasing to the eye
  80.  
  81. Smail:
  82.     program a little more robust:
  83.         checks for bad returns from index
  84.         passes lint better (not altogether)
  85.         hostname and hostdomain easier to define
  86.         getpath() without a path file is not fatal
  87.         -k (kludge) flag changed to -r (act like rmail) flag
  88.     support for route-addrs:
  89.         rmail recognises @domain... and parses to local for sendmail.
  90.     manual page:
  91.         SMAIL rewritten as smail.8.  Unlike previous attempts by
  92.         others, this is a man page.
  93.     fashionable:
  94.         follows the trendiest advice on program readability.
  95.  
  96. Path.dom:
  97.     no more greipa.
  98. END-OF-FILE
  99.  
  100. if [ "$filename" != "/dev/null" ]
  101. then
  102.   size=`wc -c < $filename`
  103.  
  104.   if [ $size != 1932 ]
  105.   then
  106.     echo $filename changed - should be 1932 bytes, not $size bytes
  107.   fi
  108.  
  109.   chmod 644 $filename
  110. fi
  111.  
  112. # ---------- file INFO.DOCS ----------
  113.  
  114. filename="INFO.DOCS"
  115.  
  116. if [ -f $filename ]
  117. then
  118.   echo File \"$filename\" already exists\!  Skipping...
  119.   filename=/dev/null        # throw it away
  120. else
  121.   echo extracting file INFO.DOCS...
  122. fi
  123.  
  124. cat << 'END-OF-FILE' > $filename
  125. This is a list of various documents that exist and may be helpful.
  126.  
  127.     UUCP Project Documents
  128.  
  129. What You Need to Know About Pathalias and What Pathalias Needs to
  130. Know About You, or How Pathalias Makes Domains; Christopher Seiwald;
  131. (part of distribution in file INFO.DOMAINS.)
  132.  
  133. ARPA RFC 976: UUCP Mail Transmission Format Standard; Mark Horton; March 1986
  134.  
  135. What is a Domain?; Mark Horton; June 1984
  136.  
  137.     Pathalias Documents
  138.  
  139. pathalias(1) manual page; Peter Honeyman
  140. (It is assumed you have the Jan 1986 or later version of pathalias.)
  141.  
  142.     ARPA Documents
  143.  
  144. RFC822: Standard for the Format of ARPA Internet Text Messages
  145.  
  146. RFC920: Domain Requirements
  147. END-OF-FILE
  148.  
  149. if [ "$filename" != "/dev/null" ]
  150. then
  151.   size=`wc -c < $filename`
  152.  
  153.   if [ $size != 638 ]
  154.   then
  155.     echo $filename changed - should be 638 bytes, not $size bytes
  156.   fi
  157.  
  158.   chmod 644 $filename
  159. fi
  160.  
  161. # ---------- file INFO.DOMAINS ----------
  162.  
  163. filename="INFO.DOMAINS"
  164.  
  165. if [ -f $filename ]
  166. then
  167.   echo File \"$filename\" already exists\!  Skipping...
  168.   filename=/dev/null        # throw it away
  169. else
  170.   echo extracting file INFO.DOMAINS...
  171. fi
  172.  
  173. cat << 'END-OF-FILE' > $filename
  174.            WHAT YOU NEED TO KNOW ABOUT PATHALIAS
  175.        AND WHAT PATHALIAS NEEDS TO KNOW ABOUT YOU
  176.                    or
  177.            HOW PATHALIAS MAKES DOMAINS
  178.  
  179.                 Christopher Seiwald
  180.  
  181. This note describes the host connectivity data and domain data
  182. needed to effect UUCP domain-style address routing.  This
  183. describes mostly the domain data, but also discusses how to
  184. distribute connectivity data.  Look elsewhere for a discussion of
  185. domains.
  186.  
  187. Briefly, the connectivity data (what's in mod.map) connects
  188. all hosts in the UUCP network into one big directed graph, and
  189. the domain data superimposes a domain tree onto that graph.
  190. Pathalias converts these two sets of data into a routing database
  191. which smail/rmail, a UUCP mail routing program, uses.
  192.  
  193. 1.  Domains and Gateways for UUCP
  194.  
  195. For domains in the UUCP zone, the top of a subdomain is all
  196. gateway hosts for that domain; the top of the UUCP zone will
  197. probably be nearly a hundred hosts.  As a transition aid, we
  198. also consider an individual host at the bottom of the domain tree a
  199. subdomain "host.UUCP", with one gateway and no further subdomains.  
  200. (We expect to phase this out eventually.)
  201.  
  202. A gateway host for a domain must do four things:
  203.     I)    Pass mail bound for that domain to the
  204.         appropriate host.
  205.     II)    Pass mail bound for outside that domain to a
  206.         gateway in the parent domain.
  207.     III)    Pass mail bound for a subdomain to a gateway of
  208.         that subdomain.
  209.     IV)    Recognise the domain!user address syntax.
  210.  
  211. Smail/rmail already provides (IV).  With the data described here,
  212. pushed through pathalias, smail/rmail can then provide (I)-(III).
  213.  
  214. 2.  The Zone Registry
  215.  
  216. For any sizeable zone, one gateway host supports the zone registry.
  217. For other zones, such as BITNET, CSNET, DDN, etc., registries are
  218. supported, using conventions appropriate to those zones.  Contact
  219. electronic mail addresses are supported for queries, and updates to
  220. configuration information may also be handled via mail.  In the UUCP
  221. zone, the id's "uucpmap@cbosgd.ATT.COM" and "domains@cbosgd.ATT.COM"
  222. serve to collect the connectivity and domain data, respectively, for
  223. that zone.
  224.  
  225. The registry for a zone speaks for that zone, communicating
  226. chiefly with its peers, the registry of the parent domain, and
  227. the registries of the subdomains.
  228.  
  229. 3.  Functions of Domain Data
  230.  
  231. Each gateway for a domain must map the domain-style names into
  232. the UUCP host names for all hosts of the domain.  This host name
  233. mapping provides (I) above.
  234.  
  235. Each gateway for a domain knows a) at least one gateway for each
  236. immediate subdomain, and b) at least one gateway host of the
  237. parent domain.  This provides (II) and (III) above.
  238.  
  239. For consistency across the gateways of a domain, each gateway for
  240. the domain should know a) ALL gateways for each immediate
  241. subdomain; and b) ALL gateways for the parent domain.  Pathalias
  242. will pick the closest. In this way, one single database can
  243. describe the domain structure for all gateways on a domain,
  244. without variations for each gateway. 
  245.  
  246. In order to aid routing and avoid overloading the parent gateway,
  247. gateways should also know most gateways for peer level domains.
  248. This information is also provided by the map and used by pathalias.
  249. When a new peer domain is created, traffic can be routed through the
  250. parent (which must be updated immediately) until information about
  251. the peer can be propagated.
  252.  
  253. Additionally, a gateway could know about domains more than one
  254. level above or below it so that mail doesn't stop for address
  255. resolution at every gateway along its path.
  256.  
  257. 4.  Format of Domain Data
  258.  
  259. 4.1  Host Name List
  260.  
  261. The host name list aliases the domain style address of a host to
  262. the UUCP host name.  The pathalias input format is:
  263.  
  264.         uucp-name = "domain-name"[, ...]
  265.  
  266. The .UUCP suffix is implicit in the uucp-name (smail/rmail does
  267. this), and is not needed.  The dots protect quotes in names.
  268. Upper/lower case doesn't matter in a dotted domain name.  Examples:
  269.     
  270.         ihnp4 = ".ATT.COM"
  271.         ucbvax = ".Berkeley.EDU"
  272.         cbosgd = ".osgd.cb.att.com", ".cbosgd.att.com"
  273.  
  274. Might produce from pathalias:
  275.  
  276.         ihnp4            mtxinu!ihnp4!%s
  277.         .ihnp4.ATT.COM        mtxinu!ihnp4!%s
  278.         ucbvax            ucbvax!%s
  279.         .Berkeley.EDU        ucbvax!%s
  280.         cbosgd            cbosgd!%s
  281.         .osgd.cb.att.com    cbosgd!%s
  282.         .cbosgd.att.com        cbosgd!%s
  283.  
  284. A single host may have more than one domain style address; in
  285. fact, a host may be in several domains at once.  However, each
  286. host must have a single primary location in the domain tree,
  287. and other addresses should be viewed as transition aids.  For
  288. example, cbosgd might be known as cbosgd, cbosgd.UUCP,
  289. cbosgd.ATT.UUCP, cbosgd.btl.csnet, and cbosgd.ATT.COM, but
  290. the primary name is the one in the organizational domain (COM)
  291. which applies to all networks, and the others are temporary
  292. names for upward compatibility only.
  293.  
  294. 4.2  Domain Gateway List
  295.  
  296. The domain gateway list aliases the domain style address of a
  297. domain to the UUCP host name of the closest gateway of that
  298. domain.  This involves a trick in pathalias, and employs a
  299. extra network name domain-gw.  The pathalias input format is:
  300.  
  301.         domain-gw = ".domain-name"[, ...]
  302.         domain-gw = { gateway1[, ...] }(DEAD)
  303.  
  304. Again, the .UUCP suffix is implicit in the uucp-name, and is
  305. not needed, and the quotes protect any dots in domain names.  
  306. Examples:
  307.  
  308.         dec-gw = ".DEC.COM"
  309.         dec-gw = { decwrl, decuac }(DEAD)
  310.  
  311.         att-gw = ".ATT.COM"
  312.         att-gw = { cbosgd, ihnp4 }(DEAD)
  313.  
  314. Might generate from pathalias:
  315.  
  316.         .DEC.COM    seismo!decuac!%s
  317.         .ATT.COM    cbosgd!%s
  318.  
  319. Note that pathalias chooses the closest host from inside the {}'s.
  320. The (DEAD)'s prevent pathalias from following along the mock network
  321. called "domain-gw".
  322.  
  323. 5.  Distribution of Domain Data
  324.  
  325. A zone registry maintains a Host Name List (in the format of 4.1
  326. above) of all hosts within its domain and a Domain Gateway List
  327. (in the format of 4.2 above) of all gateways of the domain.
  328.  
  329. Up: A registry collects the Domain Gateway List from the registry
  330. of each of its subdomains, and transmits to the registry of its
  331. parent domain its own Domain Gateway List and, if it chooses, the
  332. Domain Gateway Lists of some or all of its subdomains.  Whether
  333. it includes lists from its subdomains depends on how important it
  334. considers them to the parent domain.
  335.  
  336. Down: Similarly, a registry collects the Domain Gateway List from
  337. the registry of its parent domain, and transmits to the registry
  338. of each of its subdomains its Domain Gateway List and the Domain
  339. Gateway List of its parent domain.  Note that the Domain Gateway
  340. List of the parent domain may include lists from the parent's
  341. other subdomains.
  342.  
  343. A registry may decide not to use the parent domain's Domain
  344. Gateway List or not to transmit it to its subdomains' registries.
  345. (This should be done only with the consent of the subdomains.) In
  346. this case, the registry must introduce a domain gateway alias for
  347. all top level domains, to ensure that all the mail gets delivered.
  348.  
  349. Across: a registry transmits to each of the gateways of its
  350. domain its Host Name List, its Domain Gateway List, and collected
  351. Domain Gateway Lists.  The registry also transmits to each normal
  352. host (one gateway, no subdomains) of its domain its Domain
  353. Gateway List.
  354.  
  355. Together, "up," "down," and "across" insure that each gateway has
  356. the Host Name List for its domain, and the Domain Gateway List of
  357. its own domain and at least its parent domain and subdomains.
  358. "Up" and "across" will probably take place on demand by mail.
  359. "Down" will probably be broadcast via netnews on a regular
  360. schedule.  In particular, the second level information for the UUCP
  361. zone (one entry per organization) and the complete top level domain
  362. information make up the postings to mod.map.
  363.  
  364. 6.  Distribution of Connectivity Data
  365.  
  366. The distribution of connectivity data will probably follow the
  367. path of domain data: registries passing connectivity data up,
  368. down, and across the domain tree, with the exception that the
  369. connectivity within a third (or lower) level domain will be
  370. discouraged from leaving the domain, so the data the UUCP zone
  371. registry distributes will include only the first and second
  372. level gateways.  Local information about internal subdomains and
  373. machines of organizations should not be included in globally
  374. published information, but rather distributed locally as needed.
  375.  
  376. 7.  Various Notes
  377.  
  378. The following are examples of data that should be joined together
  379. as input to pathalias.
  380.  
  381.     Parent Domain Gateway List
  382.     Parent Connectivity Data
  383.     This Level Domain Gateway List
  384.     This Level Host Name List
  385.     This Level Connectivity Data
  386.     Collected Subdomains' Domain Gateway Lists
  387.     Collected Subdomains' Connectivity Data
  388.     Private Additions
  389.     Alias for "this host"
  390.  
  391. This note does not describe the inclusion of private additions to
  392. the domain or connectivity data.
  393.  
  394. Because domain names intermix with host names (and the .UUCP
  395. suffix is implicit), you can address hosts known at your gateway
  396. as "uucp-host.UUCP".  We discourage this, because the address is 
  397. then particular to the sender's location.
  398.  
  399.  
  400.         /+\
  401. 5/1/85        +\    chris@cbosgd.att.com
  402.         \+/
  403.  
  404. [Updated 5/9/86 by Mark Horton.]
  405. END-OF-FILE
  406.  
  407. if [ "$filename" != "/dev/null" ]
  408. then
  409.   size=`wc -c < $filename`
  410.  
  411.   if [ $size != 8979 ]
  412.   then
  413.     echo $filename changed - should be 8979 bytes, not $size bytes
  414.   fi
  415.  
  416.   chmod 644 $filename
  417. fi
  418.  
  419. # ---------- file INFO.FLOW_DIAG ----------
  420.  
  421. filename="INFO.FLOW_DIAG"
  422.  
  423. if [ -f $filename ]
  424. then
  425.   echo File \"$filename\" already exists\!  Skipping...
  426.   filename=/dev/null        # throw it away
  427. else
  428.   echo extracting file INFO.FLOW_DIAG...
  429. fi
  430.  
  431. cat << 'END-OF-FILE' > $filename
  432. vanilla 4.2BSD mail flow
  433.  
  434. (local src)   /bin/mail - /bin/mail -                  -- /bin/mail
  435.                        /             \               /  (local dest)
  436. (local src)   mailx --/      ------------ sendmail --
  437.                             /          /             \  (remote dest)
  438. (local src)   Mail ---------          /                -- uux
  439.                                      /
  440. (remote src)  /bin/rmail ------------
  441.  
  442. ==========================
  443.  
  444. smail 4.2BSD mail flow
  445.  
  446. (local src)   /bin/mail - /bin/mail -                  -- /bin/mail
  447.                        /             \               /  (local dest)
  448. (local src)   mailx --/      ------------ sendmail --
  449.                             /          /             \  (remote dest)
  450. (local src)   Mail ---------          /                -- /bin/smail -
  451.                                      /  (non-bang)                    \
  452. (remote src)  /bin/rmail ------------                                  \
  453.                                      \  (bang)                          \
  454.                                 ------------------------------------- uux
  455.  
  456. ==========================
  457.  
  458. vanilla SVR2 mail flow
  459.         mail    is "/usr/src/cmd/mail.c"
  460.         rmail    is linked to mail
  461.  
  462. LOCAL    mail  ------------\              /--------------------- LOCAL
  463.                    \            /
  464. LOCAL    mailx ----> mail ---+----------+
  465.                    /            \
  466. REMOTE    rmail ------------/              \-- uux -------------- REMOTE
  467.  
  468. ==========================
  469.  
  470. Modified SVR2 mail flow using SENDMAIL
  471.  
  472. Definitions of changed/renamed programs
  473.  
  474.         mail    is "binmail.c"
  475.         lmail    is "/usr/src/cmd/mail.c"
  476.         rmail    is linked to smail
  477.  
  478. LOCAL    mail  ------------\                /-- lmail ---------- LOCAL
  479.                    \              /
  480.                             +--sendmail--+
  481.                    /              \
  482. LOCAL    mailx --- mail ---/                \-- smail -- uux --- REMOTE
  483.  
  484.  
  485.                                                /-- lmail ------ LOCAL
  486.                                               /
  487.                                 /--sendmail--+
  488.                                /              \
  489.                               /                \- smail - uux - REMOTE
  490.                              / (domain | LOCAL)
  491. REMOTE  rmail --------------+
  492.                              \ (bang)
  493.                               \
  494.                                \------------------ uux -------- REMOTE
  495.  
  496. ==========================
  497.  
  498. Modified SVR2 mail flow without SENDMAIL
  499.  
  500. LOCAL    mail  ------------\                /-- lmail ---------- LOCAL
  501.                    \              /
  502.                             +-- rmail ---+
  503.                    /    /         \
  504. LOCAL    mailx --- mail ---/    /           \-- uux ----------- REMOTE
  505.                               /
  506.                              /
  507. REMOTE    --------------------+
  508. END-OF-FILE
  509.  
  510. if [ "$filename" != "/dev/null" ]
  511. then
  512.   size=`wc -c < $filename`
  513.  
  514.   if [ $size != 2779 ]
  515.   then
  516.     echo $filename changed - should be 2779 bytes, not $size bytes
  517.   fi
  518.  
  519.   chmod 644 $filename
  520. fi
  521.  
  522. # ---------- file INFO.INSTALL ----------
  523.  
  524. filename="INFO.INSTALL"
  525.  
  526. if [ -f $filename ]
  527. then
  528.   echo File \"$filename\" already exists\!  Skipping...
  529.   filename=/dev/null        # throw it away
  530. else
  531.   echo extracting file INFO.INSTALL...
  532. fi
  533.  
  534. cat << 'END-OF-FILE' > $filename
  535. There are three system types on which smail can be installed.
  536.  
  537.     (1) Berkeley with sendmail
  538.     (2) System V with sendmail
  539.     (3) System V without sendmail
  540.  
  541.     Note: if you have a System III or V7 derived system, you
  542.     can probably treat it like (3), or possibly like Berkeley
  543.     without sendmail.  We have not tested smail on such a system.
  544.  
  545. The installation will vary slightly for each system type.
  546.  
  547. (1) For a berkeley system with sendmail, the steps are:
  548.  
  549.     create a pathalias database by any means available
  550.     and copy it to a file named "/usr/lib/uucp/paths"
  551.  
  552.     $ sort -f /usr/lib/uucp/paths -o /usr/lib/uucp/paths
  553.  
  554.     $ make
  555.  
  556.     $ cp smail /bin/smail
  557.  
  558.     $ sh smail.cf.sh
  559.         <answer the questions it asks>
  560.  
  561.     $ mv /usr/lib/sendmail.cf /usr/lib/OLDsendmail.cf
  562.  
  563.     $ cp sendmail.cf /usr/lib/sendmail.cf
  564.  
  565.     $ /usr/lib/sendmail -bz
  566.  
  567.     $ mv /bin/rmail /bin/OLDrmail
  568.  
  569.     $ ln /bin/smail /bin/rmail
  570.  
  571. (2) For a System V system with sendmail, the steps are:
  572.  
  573.     create a pathalias database by any means available
  574.     and copy it to a file named "/usr/lib/uucp/paths"
  575.  
  576.     $ sort -f /usr/lib/uucp/paths -o /usr/lib/uucp/paths
  577.  
  578.     edit defs.h
  579.  
  580.     $ make
  581.  
  582.     $ cp smail /bin/smail
  583.  
  584.     $ ln /bin/mail /bin/lmail
  585.  
  586.     $ sh smail.cf.sh
  587.         <answer the questions it asks>
  588.  
  589.     $ mv /usr/lib/sendmail.cf /usr/lib/OLDsendmail.cf
  590.  
  591.     $ cp sendmail.cf /usr/lib/sendmail.cf
  592.  
  593.     $ /usr/lib/sendmail -bz
  594.         (This step is optional.  If strangeness results, you
  595.         can undo it by removing /usr/lib/sendmail.fc.  This
  596.         step improves performance significantly, but otherwise
  597.         has no effect.)
  598.  
  599.     $ rm /bin/mail
  600.         (You still have it in /bin/lmail.)
  601.  
  602.     $ mv binmail /bin/mail
  603.  
  604.     $ mv /bin/rmail /bin/OLDrmail
  605.  
  606.     $ ln /bin/smail /bin/rmail
  607.  
  608. (3) For a System V system without sendmail, the steps are:
  609.  
  610.     create a pathalias database by any means available
  611.     and copy it to a file named "/usr/lib/uucp/paths"
  612.  
  613.     $ sort -f /usr/lib/uucp/paths -o /usr/lib/uucp/paths
  614.  
  615.     edit defs.h
  616.  
  617.     $ make
  618.  
  619.     $ cp smail /bin/smail
  620.  
  621.     $ mv /bin/mail /bin/lmail
  622.  
  623.     $ mv binmail /bin/mail
  624.  
  625.     $ mv /bin/rmail /bin/OLDrmail
  626.  
  627.     $ ln /bin/smail /bin/rmail
  628. END-OF-FILE
  629.  
  630. if [ "$filename" != "/dev/null" ]
  631. then
  632.   size=`wc -c < $filename`
  633.  
  634.   if [ $size != 2035 ]
  635.   then
  636.     echo $filename changed - should be 2035 bytes, not $size bytes
  637.   fi
  638.  
  639.   chmod 644 $filename
  640. fi
  641.  
  642. # ---------- file INFO.README ----------
  643.  
  644. filename="INFO.README"
  645.  
  646. if [ -f $filename ]
  647. then
  648.   echo File \"$filename\" already exists\!  Skipping...
  649.   filename=/dev/null        # throw it away
  650. else
  651.   echo extracting file INFO.README...
  652. fi
  653.  
  654. cat << 'END-OF-FILE' > $filename
  655. Brief installation instructions for version 1.0 of smail.
  656.  
  657. What it does:
  658.  
  659.   Smail is capable of handling UUCP syntax (bang paths, bang
  660.   domains, and at domains are supported) mail transportation
  661.   over UUCP/uux/rmail channels.  It will support machines that
  662.   only have UUCP connections, and machines with UUCP links to
  663.   the outside world plus a small number of local machines that
  664.   are reached via SMTP.  The domain intelligence is embedded
  665.   in the smail database (e.g. the pathalias output), not the
  666.   sendmail.cf file, so if you have a fancier domain structure
  667.   that involves SMTP or anything other than uux in the domain
  668.   structure, you'll want to modify the sendmail.cf file here or
  669.   merge pieces of the enclosed sendmail.cf into your own.
  670.  
  671.   Smail runs under 4.2BSD and System V, as a back end to sendmail;
  672.   and under System V without sendmail.  It also replaces rmail, which
  673.   becomes a link to smail.  In a sendmail environment, smail depends on
  674.   sendmail to crack the headers, as smail just deals with the
  675.   envelope.  If you don't have sendmail, smail will not add or generate
  676.   any of the required RFC822 headers (Date:, From:, Message-ID:, Received:)
  677.   but your old system didn't generate these either, so you don't lose
  678.   anything you already had.
  679.  
  680.   Features of smail include:
  681.  
  682.   (1) Using pathalias data to choose the best route to your destination.
  683.   (2) Handling of user@domain, domain!user, and host!user syntax.
  684.   (3) Generation of domain!user syntax to be forwarded by other systems.
  685.   (4) Logging of traffic through your machine, by sender, recipient, and
  686.       size of message, so you can detect abuses of your machine.
  687.   (5) Mail being forwarded through your machine to another uux link is
  688.       passed from rmail directly to uux, so there's less overhead on
  689.       your machine (sendmail stays out of the loop.)
  690.   (6) Simiplicity.
  691.  
  692. Prerequisites:
  693.  
  694.   You need a copy of a recent posting of pathalias.  (The one posted
  695.   by Peter Honeyman in January 1986 is recommended.)  You'll also
  696.   need a current copy of the UUCP map, or at least a copy of the
  697.   appropriate part of it that you're interested in.  You can get pathalias
  698.   from the mod.sources Usenet archive (contact sources-request@mirror.UUCP)
  699.   and you can get a UUCP map each month from Usenet newsgroup mod.map.
  700.   The UUCP map is quite large (currently about 1.6MB) so please don't ask
  701.   to have a copy mailed to you - get a copy from a nearby Usenet site.
  702.  
  703. Overall structure:
  704.  
  705.   Smail is installed in /bin/smail with a link in /bin/rmail.  Uuxqt
  706.   calls rmail, which either forwards the message on to the next hop
  707.   directly or calls sendmail.  Sendmail may decide the message should
  708.   be delivered by UUCP, and invoke smail, which will look up a route
  709.   and invoke uux.  (Note that the choice about when to invoke sendmail
  710.   and when to process a message directly can be configured in smail.)
  711.  
  712.   smail uses a database which is generated from pathalias.  You take the
  713.   current UUCP map, add some local information and topology data (to tell
  714.   it about the domain tree) and run pathalias.  The result is sorted and
  715.   installed in /usr/lib/uucp/paths.  There is no hashing done on this
  716.   file - when smail looks up a name it uses a binary search.
  717.  
  718. Installation Instructions:
  719.  
  720.   See the file INFO.INSTALL for step by step instructions.
  721.  
  722.   If you are cbosgd.ATT.COM, you would set
  723.     DDATT.COM
  724.   If you are a one-machine organization named WIDGET, you might set
  725.     DDWIDGET.COM
  726.   If you are a PC at the fourth level, named cbpavo.cbosgd.ATT.COM,
  727.   sending all your mail to the outside through cbosgd.ATT.COM, set
  728.     DDcbosgd.ATT.COM
  729.   Of course, the top level might not be COM, other possibilities
  730.   include EDU, GOV, or the ISO 3166 2 letter name for your country.
  731.  
  732.   If you want to do any hacking up of sendmail.cf, put the resulting
  733.   sendmail.cf in the current directory so it will be copied to /usr/lib.
  734.  
  735.   Save your /bin/rmail and /usr/lib/sendmail.cf somewhere safe, in case
  736.   of disaster.  If you already have a /bin/smail or /usr/lib/uucp/paths,
  737.   you might want to save them too.
  738.  
  739.   Generate /usr/lib/uucp/paths.  To do this, edit the Makefile to point
  740.   to the directory in which you keep your UUCP map, and type "make paths."
  741.   You may want to make local changes first by creating a new "u.Path.*" file
  742.   or files.  All the u.Path.* and $(UUMAP) files are basically appended
  743.   (the order doesn't matter) so you can divide them up into local pieces
  744.   of information maintained by different places.  Be sure you have the
  745.   files u.Path.top and u.Path.uucp in your $(UUMAP) directory.
  746.  
  747.   Compile smail.  To do this, type "make".
  748.  
  749.   If you have the logging turned on, you should arrange that something
  750.   out of crontab erases the logs regularly, or your disk may overflow.
  751.   One line per message is created in /usr/lib/uucp/mail.log.  If you
  752.   log full messages, they get put in /tmp/mail.log.  (Note that full
  753.   message logging is considered anti-social if you use it to snoop;
  754.   it is recommended that this feature only be used if you are running
  755.   software that you don't completely trust, so you can reproduce any
  756.   problem that might turn up.)
  757.  
  758. Configuration considerations:
  759.  
  760.   You'll note two configuration options in defs.h: HANDLE and ROUTING.
  761.   These control which sorts of addresses smail/rmail will handle, and
  762.   which type of routing they will do.  The HANDLE define only affects
  763.   rmail, since smail is set by the first executable code, or by the
  764.   option from sendmail.cf.  In any case, we recommend that you leave
  765.   HANDLE alone, unless you are making major changes.
  766.  
  767.   ROUTING has three choices: JUSTDOMAIN, ALWAYS, and REROUTE.  rmail
  768.   will run as JUSTDOMAIN, the defs.h default.  This means rmail will
  769.   only apply routing if it sees "rmail user@domain", and will just call
  770.   uux if it sees "rmail host!user".  (If the latter fails, it will call
  771.   sendmail, which will in turn call smail -r, which will apply ALWAYS
  772.   routing to get the mail there anyway.  This has the advantage of being
  773.   low overhead on your system, not second guessing a route someone else
  774.   asked for, and still recovering nicely from the mistakes of another
  775.   system.  Your host becomes a "smart host" that can get mail anywhere.)
  776.  
  777.   smail is only called from sendmail, which will call it with the -r
  778.   option (see smail.cf.form.)  This changes ROUTING to ALWAYS, so that
  779.   mail to host!user will look up the best path to host.  This is considered
  780.   a good, conservative strategy.
  781.  
  782.   Many people will note huge paths going through their machine.  These
  783.   paths are generated by replies to netnews messages, and tend to be 10
  784.   or 20 hops long - far longer than necessary.  If you are a bit aggressive,
  785.   you can change -r to -R, which will cause such failed mail to be rerouted,
  786.   thus, mail to a!b!c!d!e!f!g!user will look up a route to g, and send the
  787.   mail to route!g!user.  (If it can't find g, it will try f, then e, and
  788.   so on until it finds someone it recognizes.)  If you are REALLY aggressive,
  789.   you can change ROUTING to REROUTE in defs.h, to get the same effect for
  790.   ALL rmail being passed through your machine.  This may help cut phone
  791.   bills, but it has some disadvantages.  It can lengthen a path sometimes,
  792.   e.g. mail to tektronix!user might turn into ihnp4!tektronix!user if your
  793.   routing database says mail to tektronix goes through ihnp4.  It makes it
  794.   hard to route around a dead host, or to redirect traffic from a mailing
  795.   list to several different directions.  It may also make mail go a different
  796.   path than what your user thought it was, and it affects other hosts that
  797.   route mail through you if you set ROUTING to REROUTE in defs.h.  So only
  798.   do this if you know what you are doing, and are willing to live with the
  799.   disadvantages.
  800. END-OF-FILE
  801.  
  802. if [ "$filename" != "/dev/null" ]
  803. then
  804.   size=`wc -c < $filename`
  805.  
  806.   if [ $size != 7752 ]
  807.   then
  808.     echo $filename changed - should be 7752 bytes, not $size bytes
  809.   fi
  810.  
  811.   chmod 644 $filename
  812. fi
  813.  
  814. # ---------- file INFO.REGISTRY ----------
  815.  
  816. filename="INFO.REGISTRY"
  817.  
  818. if [ -f $filename ]
  819. then
  820.   echo File \"$filename\" already exists\!  Skipping...
  821.   filename=/dev/null        # throw it away
  822. else
  823.   echo extracting file INFO.REGISTRY...
  824. fi
  825.  
  826. cat << 'END-OF-FILE' > $filename
  827.             UUCP Zone Registry
  828.                  7/17/86
  829.  
  830. To use smail, or other software supporting domain addresses, you
  831. need to have a domain name registered in the domain tree.  This
  832. name must be unique in the world, and must be registered with
  833. the appropriate registry.
  834.  
  835. The exact structure of the domain tree is evolving.  In 1984, the top
  836. levels were network names (ARPA, CSNET, BITNET, UUCP, and so on) and
  837. the second levels were hosts.  The problem with this structure is that
  838. machines connected to several networks have several names, and it's
  839. difficult for users to predict the address of someone without knowing
  840. their network connections.
  841.  
  842. In 1986, the domain tree in the USA has three top level domains:  COM
  843. for companies, EDU for educational institutions, and GOV for government
  844. entities.  Certain other top level names exist: MIL, NET, ORG, but
  845. are somewhat specialized.  For the most part, countries other than the USA
  846. are using the ISO 3166 2 letter abbreviation for their country as a top level.
  847.  
  848. Examples include US for USA, CA for Canada, AU for Australia, JP for
  849. Japan, NL for Netherlands, and UK for the United Kingdom.  Some feel
  850. that these abbreviations are cryptic or easily confused with US state
  851. abbreviations, and the UK did get an exception, since their ISO
  852. abbreviation is GB, but the current climate seems to be that no other
  853. exceptions will be made.
  854.  
  855. One way of looking at the domain tree is that the top level is always
  856. the country, where COM, EDU, and GOV are three pretend "countries" all
  857. located in the USA.
  858.  
  859. The second level is generally the name of the organization, using the
  860. shortest possible abbreviation that is clear and unique, thus ATT, DEC,
  861. IBM, HP, etc.  The choice of exact name is up to the organization, and
  862. longer names, such as Berkeley.EDU or Tektronix.COM are perfectly
  863. acceptable.  Just remember that people must type the name, as well as
  864. see it displayed.
  865.  
  866. Not all countries use the second level for the organization.  In
  867. particular, Australia and Britain have set up second level domains
  868. AC.UK and OZ.AU for their academic communities, and put the
  869. organization at the third level.
  870.  
  871. The third and subsequent levels, if used, should be organizational
  872. units within the organization.  Try to keep the number of levels to a
  873. minimum, since people have to type the names.  More than four total
  874. levels (country, org, ou1, and ou2) should rarely be needed.  The actual
  875. organizational units to be used are up to you, for example, they might
  876. be departments, or they might be machine names.  For example, AT&T
  877. is using names like cbpavo.cbosgd.ATT.COM, where COM means AT&T is a
  878. company, ATT is the organization, cbosgd is a machine that is well
  879. known within the company, and cbpavo is a personal computer connected
  880. to cbosgd.
  881.  
  882. A "zone" is a registry of domains kept by a particular organization.  A
  883. zone registry is "authoritative", that is, the master copy of the
  884. registry is kept by the zone organization, and this copy is, by
  885. definition, always up-to-date.  Copies of this registry may be
  886. distributed to other places and kept in caches, but these caches are
  887. not authoritative because they may be out of date.  An authoritative
  888. answer is required for certain decisions, such as "this mail cannot be
  889. delivered because there is no such domain", or "the name you have
  890. chosen is available and is now assigned uniquely to you."
  891.  
  892. In the USA, there are currently four zones: DDN (formerly called the
  893. ARPANET), CSNET, BITNET, and UUCP.  These zones all share the top level
  894. domains COM, EDU, GOV, etc.  The top level domains are administered by
  895. the DDN (Defense Data Network) NIC (Network Information Center) at SRI
  896. (SRI, Inc, formerly Stanford Research Institute, in Menlo Park, CA.)
  897. The CSNET, BITNET, and UUCP registries serve as a go-between to avoid
  898. swamping the NIC with individual registrations.  It is possible for an
  899. organization to be members of more than one of these networks, in which
  900. case they register with each network, using the same name on all
  901. networks.
  902.  
  903. The UUCP Project keeps a registry of members of the UUCP Zone.  This
  904. registry is different than the UUCP map, although the registry is
  905. posted as part of this map.  The UUCP Zone registry consists only of
  906. organizations which are members of UUCP.  To become a member, it is
  907. necessary to explicitly join, just as one joins CSNET or BITNET.  Just
  908. being reachable via a bang path does not imply membership, nor does
  909. appearance in the UUCP map.
  910.  
  911. To join, it is necessary to fill out the application form and send it
  912. to the UUCP Zone registry.  The details of joining are not clear at the
  913. time this is being written.  Contact us and we'll tell you how to register.
  914. After October 1, 1986, it is likely there will be some sort of fee
  915. to cover administrative overhead of registering a domain name.  There
  916. may also eventually be continuing membership dues or a service fee
  917. associated with membership.
  918.  
  919. See the "Contact Information" below for instructions to contact us;
  920. please use the "query" address for the initial query.
  921.  
  922. A preliminary application form can be found at the end of this document.
  923.  
  924.         Organizational Registry
  925.  
  926. If you are registering your organization in the UUCP zone, you are in
  927. effect creating another zone registry for your organization.  Any
  928. subdomains of your organizational domain must be registered with you.
  929. (You need not keep us informed of all your subdomains, just the gateways.)
  930.  
  931. For the time being, unless you are ready to start organizing the machines
  932. in your organization, don't worry about this.  You can just set things up
  933. to handle your one machine (or more if you like).  Just keep in mind that
  934. your machine is but one machine in your organization, so you should be
  935. planning to have an address like fred@compsci.BigCorp.COM (where "fred" is
  936. a login name on machine "compsci" owned by organization "BigCorp") rather
  937. than fred@BigCorp.COM.
  938.  
  939. For example, if you are the first host in the University of North Dakota to
  940. join, you are creating a subdomain UND.EDU (for example.)  Your host might
  941. have a name like undvax.UND.EDU.  When other machines are joined in later,
  942. they will also register under UND.EDU, for example, cs3b20.UND.EDU.
  943. All subdomains of UND (this may mean all hosts in the UND domain) are
  944. registered with the UND.EDU registry.  Unless you create a campus organiztion
  945. specifically to run this registry, this means you are the UND.EDU registry.
  946. It is your job to keep track of everybody in the registry, hand out names
  947. for subdomains, make sure there are no duplicates (you have to make sure there
  948. aren't two machines called cs3b2.UND.EDU, for example) and know who to
  949. contact if a problem arises.  You have created the UND Zone, which is
  950. similar to the UUCP Zone, but one level further down in the heirarchy.
  951.  
  952. At some point, you may decide that you want more layers of subdomains in
  953. your zone.  For example, if the CS, Math, and Stat departments at UND all
  954. want to manage their own zones, you might use names like vax.CS.UND.EDU,
  955. 3b20.Math.UND.EDU, and so on.  The UND Zone has delegated its naming
  956. authority to the CS Zone, the Math Zone, and so on.  The root delegates
  957. to COM, COM delegates to UUCP, UUCP delegates to UND, UND delegates to CS.
  958.  
  959. Note that the names are given in upper or mixed case, but the exact
  960. case doesn't matter, since the software ignores it.  We recommend that
  961. you choose your capitalization to look nice when printed.
  962.  
  963. Note also that "vax", "3b20", and the like are terrible host names,
  964. because sooner or later you'll have more than one vax, or more than
  965. one 3b20, and the names will be confusing.  We recommend organizational
  966. names, based on the department or project the machine is used for.
  967. Of course, in order to keep the names reasonably short and to avoid
  968. duplicating names in the heirarchy, some compromise will be needed.
  969. For example, csvax.CS.UND.EDU is redundant, but RISC.CS.UND.EDU might
  970. be a good name for the computer used by the RISC project in the CS
  971. department.
  972.  
  973.         Notes:
  974.  
  975. Organizations are encouraged to eventually support two kinds of electronic
  976. mail addresses:
  977.  
  978. (1) Login name on machine: a string which is understood on a particular
  979.     machine, combined with a fully qualified domain name of a machine.
  980.     The string is often, although not always, a login name.
  981.     Example:
  982.     mrh@cbosgd.ATT.COM
  983.  
  984. (2) Personal name in organization: a string which is the name of a person,
  985.     understood by all gateway machines.
  986.     Example:
  987.     Mark.R.Horton@ATT.COM
  988.     This allows mail to be sent without knowing the full address
  989.     of the recipient, only their name and company.  Implementations
  990.     should be as forgiving as possible of errors in the personal name.
  991.     For example, if possible, as many of the following as possible
  992.     should be accepted:
  993.     mark.r.horton@att.com    (ignore case)
  994.     m.r.horton@ATT.COM    (accept initials)
  995.     mark.horton@ATT.COM    (don't require initials)
  996.     mark.randolph.horton@ATT.COM
  997.     m.horton@ATT.COM    (if not ambiguous)
  998.     horton@ATT.COM        (if not ambiguous)
  999.     mark.horton.sr@ATT.COM    (allow generational qualifier)
  1000.  
  1001. However, it's perfectly fine to just support just one style.
  1002. Since style (1) is easy to support, you may prefer to just handle
  1003. that one, especially at first.  Style (1) is by far the most commonly
  1004. used method as this is written.
  1005.  
  1006. Please note that you should support both RFC 976 and the documents
  1007. it refers to, in particular RFC 822 and RFC 920.  This means, for
  1008. example:
  1009.  
  1010. (a) The name "postmaster" on all machines visible to the outside
  1011.     should be forwarded to the technical contact.  This can be
  1012.     easily done with an alias in /usr/lib/aliases, if your site
  1013.     runs sendmail.  Please be sure to also support Postmaster,
  1014.     PostMaster, and POSTMASTER.
  1015.  
  1016. (b) Your machine should not alter valid RFC 822 headers, such as
  1017.     From:, of mail it generates or forwards.  Many machines running
  1018.     sendmail have a bug which adds uucpname! to the front of such
  1019.     addresses.  Installing smail will fix the bug, because mail
  1020.     passed through the machine is not passed through sendmail.
  1021.     We hope to make a fix to sendmail available, also, at a
  1022.     later date.
  1023.  
  1024.         Contact Information
  1025.  
  1026. We strongly encourage electronic mail for queries, updates, and
  1027. applications.  This cuts down on our costs, and we can pass those
  1028. savings along to you.  We currently do not have a telephone number
  1029. for queries, although we hope to have one in the near future.  If
  1030. you are unable to send and receive electronic mail, you will have
  1031. to wait until we are better organized.
  1032.  
  1033. For queries:    uucp-query@cbatt.ATT.COM    cbatt!uucp-query
  1034.  
  1035. For updates:    uucpmap@cbatt.ATT.COM        cbatt!uucpmap
  1036.  
  1037. For problems:    uucp-problem@cbatt.ATT.COM    cbatt!uucp-problem
  1038.  
  1039. To register:    registry@cbatt.ATT.COM        cbatt!registry
  1040.  
  1041. (Note: as of August 1986, these addresses are on cbatt and cbosgd.
  1042. The gateway and aliases are expected to be moved to cbatt shortly.
  1043. If you can't get to cbatt, try cbosgd.)
  1044.  
  1045.         UUCP Zone Membership Application
  1046.  
  1047. Please provide the following information to the UUCP Domain Registrar
  1048. (registry@cbatt.ATT.COM):
  1049.  
  1050.    Note:  The key people must have computer mail mailboxes and
  1051.    NIC "Handles", unique NIC database identifiers.  If they do not
  1052.    at present, indicate <NEW> and we'll register them.  A NIC Handle may
  1053.    also be established by contacting REGISTRAR@SRI-NIC.ARPA.
  1054.  
  1055.    Lines marked with "-->" are the ones you should fill in.
  1056.  
  1057.    1)  The name of the top level domain to join.  In the USA, possibilities
  1058.    are EDU, COM, GOV, and MIL.
  1059.  
  1060. -->   For example:  EDU
  1061.  
  1062.        Type of Organization (commercial, educational, or government):
  1063.  
  1064. -->   For example:  Ph.D. granting university
  1065. -->   For example:  For Profit Corporation
  1066. -->   For example:  Non-profit Corporation
  1067.  
  1068.    2)  The name, title, mailing address, phone number, and organization
  1069.    of the administrative head of the organization.  This is the contact
  1070.    point for administrative and policy questions about the domain.  In
  1071.    the case of a research project, this should be the Principal
  1072.    Investigator.  The online mailbox and NIC Handle of this person should
  1073.    also be included.
  1074.  
  1075.       For example:
  1076.  
  1077.          Administrator
  1078.  
  1079. -->         Organization  Alpha Beta University
  1080. -->         Name          John Smith
  1081. -->         Title         Department Head
  1082. -->         Mail Address  Dept of Computer Science
  1083. -->                       1234 Main St.
  1084. -->                       Hoople, ND. 90292-6695
  1085. -->         Phone Number  213-555-1511
  1086. -->         Net Mailbox   smith@ALPHA-BETA.EDU, smith@abu.uucp
  1087. -->         NIC Handle    <NEW>
  1088.  
  1089.    3)  The name, title, mailing address, phone number, and organization
  1090.    of two domain technical contacts.  The online mailbox and NIC Handle of
  1091.    the domain technical contact should also be included.  This is the
  1092.    contact point for problems with the domain and for updating
  1093.    information about the domain.  Also, the domain technical contact may
  1094.    be responsible for hosts in this domain.
  1095.  
  1096.       For example:
  1097.  
  1098.          Technical Contact
  1099.  
  1100. -->         Organization  Alpha Beta University
  1101. -->         Name          Jean Smith
  1102. -->         Title         Researcher
  1103. -->         Mail Address  Dept of Computer Science
  1104. -->                       1234 Main St.
  1105. -->                       Hoople, ND. 90292-6695
  1106. -->         Phone Number  213-555-1511
  1107. -->         Net Mailbox   jean@ALPHA-BETA.EDU, jean@abu.uucp
  1108. -->         NIC Handle    <NEW>
  1109.  
  1110.          Alternate Technical Contact
  1111.  
  1112. -->         Organization  Alpha Beta University
  1113. -->         Name          Fred Rogers
  1114. -->         Title         Computing Staff
  1115. -->         Mail Address  Dept of Computer Science
  1116. -->                       1234 Main St.
  1117. -->                       Hoople, ND. 90292-6695
  1118. -->         Phone Number  213-555-1511
  1119. -->         Net Mailbox   rogers@ALPHA-BETA.EDU, rogers@abu.uucp
  1120. -->         NIC Handle    <NEW>
  1121.  
  1122.    4)  The name, title, mailing address, phone number, and organization
  1123.    of the zone technical contact is the same as the domain technical contact.
  1124.    (If different, give that information here.)
  1125.  
  1126.    5)  The name of the domain (up to 12 characters).  This is the name
  1127.    that will be used in tables and lists associating the domain and the
  1128.    domain server addresses.  [While technically domain names can be
  1129.    quite long (programmers beware), shorter names are easier for people
  1130.    to cope with.]
  1131.  
  1132. -->   For example:  ALPHA-BETA
  1133.  
  1134.    6)  A description of the servers that provides the domain service for
  1135.    translating name to address for hosts in this domain, and the date
  1136.    they will be operational.  If you prefer to have your Internet mail
  1137.    forwarded via a gateway other than the default, please change the
  1138.    entry below.  (If there is another RFC 976 compatible gateway nearer
  1139.    you, you are encouraged to make arrangements with them for forwarding.)
  1140.  
  1141.       A good way to answer this question is to say "Our server is
  1142.       supplied by person or company X and does whatever their standard
  1143.       issue server does".
  1144.  
  1145.      Our servers are the UUCP nameservers, currently on
  1146.      SEISMO.CSS.GOV, HARVARD.EDU, and BRL.ARPA.  Our preferred
  1147. -->     mail forwarder is SEISMO.CSS.GOV.
  1148.  
  1149.    7)  Domains should provide at least two independent servers for the
  1150.    domain.  A description of the server machine and its back-up, including:
  1151.    [LEAVE THIS UNEDITED, UNLESS YOU INTEND TO PROVIDE YOUR OWN ARPANET
  1152.    NAMESERVERS.]
  1153.  
  1154.       (a) hardware and software (using keywords from the Assigned
  1155.        Numbers)
  1156.  
  1157.       (b) host domain name and net addresses (what host on what net for
  1158.        each connected net)
  1159.  
  1160.          (a) hardware and software
  1161.         VAX-11/780  and  UNIX
  1162.  
  1163.          (b) host domain name and net address
  1164.         SEISMO.CSS.GOV    10.0.0.25    ARPANET
  1165.         BRL-AOS.ARPA    192.5.25.82    MILNET
  1166.         Harvard.EDU    10.0.0.9    ARPANET
  1167.  
  1168.    8)  Gateway machines.  Give the UUCP name and domain name of all machines
  1169.    you intend to make general purpose gateways.  This is the machine that
  1170.    will be running RFC 976 compatible software, such as smail, or other
  1171.    appropriate software, through which mail should be sent from the
  1172.    outside.  At first, one gateway is probably all you'll need.
  1173.     For example:
  1174.  
  1175. -->        abu    CS.ALPHA-BETA.EDU
  1176.  
  1177.    9)  Neighbors of gateway machines.  List several machines with good solid
  1178.    UUCP connections to each of your gateways.  This will be used to form
  1179.    pathalias connection information for your host entry on the UUCP map,
  1180.    although since this information changes often, we encourage you to
  1181.    send us regular updates.  If you can format this for pathalias, please do
  1182.    so, instead of giving the version not formatted for pathalias.
  1183.  
  1184.     For example (not formatted for pathalias):
  1185. -->        abu    ihnp4, ucbvax, dgu
  1186.  
  1187.     For example (formatted for pathalias):
  1188. -->        abu    ihnp4(DEMAND), ucbvax(DAILY), dgu(DIRECT)
  1189.  
  1190.    10) Name (and Title, Postal Address, Electronic Address, Telephone, and
  1191.    NIC Handle, where different from above) of technical contact person for
  1192.    each gateway.
  1193.  
  1194. -->    abu, Jean Smith
  1195. END-OF-FILE
  1196.  
  1197. if [ "$filename" != "/dev/null" ]
  1198. then
  1199.   size=`wc -c < $filename`
  1200.  
  1201.   if [ $size != 16854 ]
  1202.   then
  1203.     echo $filename changed - should be 16854 bytes, not $size bytes
  1204.   fi
  1205.  
  1206.   chmod 644 $filename
  1207. fi
  1208.  
  1209. # ---------- file INFO.SENDMAIL ----------
  1210.  
  1211. filename="INFO.SENDMAIL"
  1212.  
  1213. if [ -f $filename ]
  1214. then
  1215.   echo File \"$filename\" already exists\!  Skipping...
  1216.   filename=/dev/null        # throw it away
  1217. else
  1218.   echo extracting file INFO.SENDMAIL...
  1219. fi
  1220.  
  1221. cat << 'END-OF-FILE' > $filename
  1222.         SMAIL MODIFICATIONS FOR SENDMAIL.CF FILE
  1223.  
  1224. Note: most sites should be able to use the standard UUCP sendmail.cf
  1225. file included with this distribution.  This information is presented 
  1226. for those who need to strike out on their own.
  1227.  
  1228. For UUCP Zone Addressing, there are 5 major changes to the standard 
  1229. sendmail.cf file:
  1230.  
  1231. [1] Prevent butchering of UUCP addresses.  The sendmail.cf internal
  1232. notation of host!user becomes user@host.UUX instead of user@host.UUCP.
  1233. We now interpret user@host.UUCP to imply routing and user@host.UUX
  1234. to imply a direct neighbor.  These are the new lines:
  1235.  
  1236. (ruleset S4)
  1237. # UUX must always be presented in old form
  1238. R$+@$-.UUX        $2!$1                u@h.UUX => h!u
  1239.  
  1240. (ruleset S3)
  1241. # convert old-style addresses to a domain-based address
  1242. R$+%$+            $@$>6$1<@$2>            user%host
  1243. R$+^$+            $1!$2                convert ^ to !
  1244. R$-!$+            $@$>6$2<@$1.UUX>        resolve uucp names
  1245. R$+!$+            $@$>6$2<@$1>            domain!host
  1246.  
  1247. [2] In resolution part of ruleset 0, resolve UUX addresses and domain 
  1248. addresses as follows:
  1249.  
  1250. # resolve names we can handle locally
  1251. R<@$+.UUX>:$+        $#uux$@$:$1!$2            @host.uux:user
  1252. R$+<@$+.UUX>        $#uux$@$:$2!$1            host!user
  1253. R$*<@$*>$*        $#dom$@$:$1@$2$3        user@anywhere
  1254.  
  1255. [3] Change the UUCP mailer definition to the following:
  1256.  
  1257. Muux,    P=/bin/smail, F=sDFMhum, S=13, R=23, M=100000,
  1258.     A=smail -vkH$j $u
  1259. Mdom,    P=/bin/smail, F=sDFMhum, S=13, R=23, M=100000,
  1260.     A=smail -vH$j $u
  1261.  
  1262. S13
  1263. R$+<@$-.UUX>        $@$2!$1                u@host.UUX => host!u
  1264. R$*<$*.$=S>$*        $@$1<$2.$3.$D>$4        externalize
  1265. R$*<$*>$*        $@$1<$2>$3            already ok
  1266. R$+            $@$1<@$j>            tack on our name
  1267.  
  1268. S23
  1269.  
  1270. [4] Recognise local host names using the =D class instead of an explicit
  1271. list:
  1272.  
  1273. (at local definitions)
  1274. # domain
  1275. DDUUCP
  1276. CDUUCP LOCAL UUX
  1277.  
  1278. (in zerobase)
  1279. # now delete the local info
  1280. R$*<$*$=w.$=D>$*    $1<$2>$5            thishost.topdom
  1281. R$*<$*$=w.$D>$*        $1<$2>$4            thishost.domain
  1282. R$*<$*$=w>$*        $1<$2>$4            thishost
  1283. R$*<$*.>$*        $1<$2>$3            drop trailing dot
  1284. R<@>:$*            $@$>0$1                retry after route strip
  1285. R$*<@>            $@$>0$1                strip null trash & retry
  1286.  
  1287. [5] Put something in the version number so we know who's converted.
  1288. This version looks like this:
  1289.  
  1290. DV1.00.UUCP-MOD.8-11-85
  1291.  
  1292. ---
  1293.  
  1294.  
  1295.         /+\
  1296. 8/11/85        +\    chris@cbosgd.att.uucp
  1297.         \+/
  1298. END-OF-FILE
  1299.  
  1300. if [ "$filename" != "/dev/null" ]
  1301. then
  1302.   size=`wc -c < $filename`
  1303.  
  1304.   if [ $size != 2138 ]
  1305.   then
  1306.     echo $filename changed - should be 2138 bytes, not $size bytes
  1307.   fi
  1308.  
  1309.   chmod 644 $filename
  1310. fi
  1311.  
  1312. # ---------- file INFO.SMAIL.8 ----------
  1313.  
  1314. filename="INFO.SMAIL.8"
  1315.  
  1316. if [ -f $filename ]
  1317. then
  1318.   echo File \"$filename\" already exists\!  Skipping...
  1319.   filename=/dev/null        # throw it away
  1320. else
  1321.   echo extracting file INFO.SMAIL.8...
  1322. fi
  1323.  
  1324. cat << 'END-OF-FILE' > $filename
  1325. .TH SMAIL 8
  1326. .SH NAME
  1327. smail, rmail \- UUCP mailer with routing
  1328. .SH SYNOPSIS
  1329. .B smail
  1330. [ options ] address ...
  1331. .br
  1332. .B rmail
  1333. [ options ] address ...
  1334. .SH DESCRIPTION
  1335. The
  1336. .I smail/rmail
  1337. program replaces
  1338. .IR /bin/rmail (1)
  1339. to become the UUCP mail transport mechanism.
  1340. They are two links to the same program.
  1341. .I Rmail
  1342. receives mail from UUCP,
  1343. .I smail
  1344. introduces mail into UUCP.
  1345. .PP
  1346. .I Smail/rmail
  1347. can work with or without
  1348. .IR sendmail (8),
  1349. or another intelligent mail system.
  1350. For hosts with just
  1351. .IR /bin/mail (1),
  1352. .I smail/rmail
  1353. subsumes some of the functions of
  1354. .I sendmail,
  1355. and only hands local mail to
  1356. .I /bin/mail.
  1357. For hosts with
  1358. .I sendmail,
  1359. .I smail/rmail
  1360. can act as UUCP front and back ends to
  1361. .I sendmail,
  1362. allowing
  1363. .I sendmail
  1364. to process all mail through the host.
  1365. .PP
  1366. To varying degrees,
  1367. .I smail/rmail
  1368. automatically routes the addresses it processes.
  1369. .I Smail/rmail
  1370. most often routes domain style addresses (i.e. user@domain), producing
  1371. a UUCP path (i.e. host!address) or a local address (i.e. user), but it can
  1372. also reroute explicit UUCP paths.
  1373. .SH OPTIONS
  1374. .TP
  1375. .B \-d
  1376. Be verbose and don't invoke other mailers.
  1377. .TP
  1378. .B \-v
  1379. Be verbose, but still invoke other mailers.
  1380. .TP
  1381. .BI \-h " hostname"
  1382. Set hostname.  The default is configuration dependent, but usually provided
  1383. by a system call such as
  1384. .IR gethostname (2)
  1385. or
  1386. .IR uname (2).
  1387. .TP
  1388. .BI \-H " hostdomain"
  1389. set hostdomain.  The default is configuration dependent.
  1390. .TP
  1391. .BI \-p " pathfile"
  1392. Set path database file name if not /usr/lib/uucp/paths.
  1393. .TP
  1394. .B \-r
  1395. Route the first component of a UUCP path (host!address) in addition to routing
  1396. domain addresses (user@domain).
  1397. .TP
  1398. .B \-R
  1399. Reroute UUCP paths, trying successively larger righthand substrings
  1400. of a path until a component is reconised.
  1401. .TP
  1402. .B \-l
  1403. Instead of routing a domain address, send it to the local mailer for
  1404. processing.  Normally, only local addresses go to the local mailer.
  1405. .TP
  1406. .B \-L
  1407. Send all addresses to the local mailer for processing, including UUCP paths.
  1408. .PP
  1409. The above four flags are also compile time options, since
  1410. .I uux
  1411. does not normally invoke
  1412. .I rmail
  1413. with the desired flags.
  1414. .I Smail
  1415. resets any preset
  1416. .B -l
  1417. or
  1418. .B -L
  1419. flags.
  1420. .SH MAIL FLOW
  1421. To
  1422. .I smail/rmail
  1423. there are two types of mail:  UUCP mail handled by
  1424. .IR uux (and
  1425. .IR uuxqt ),
  1426. and local mail handled by the local mailer (e.g.
  1427. .IR sendmail " or"
  1428. .IR /bin/mail ),
  1429. like this:
  1430. .sp
  1431.         uux          -> rmail -> local mailer
  1432. .br
  1433.                               -> uux
  1434. .sp
  1435.         local mailer -> smail -> local mailer
  1436. .br
  1437.                               -> uux
  1438. .PP
  1439. There is a possible path "uux -> rmail -> local mailer -> smail -> uux".
  1440. The
  1441. .B -l
  1442. flag causes 
  1443. .B rmail
  1444. to send all domain addresses through the local mailer,
  1445. to process addresses for non UUCP domains.
  1446. The
  1447. .B -L
  1448. flag causes
  1449. .B rmail
  1450. to send even explicit UUCP paths through the local mailer,
  1451. presumably to make use of other transport machanisms.
  1452. In both cases, rmail defers any routing until smail gets hold it.
  1453. .SH ADDRESSES
  1454. .I Smail/rmail
  1455. understands "user@domain" to be a domain address, "host!address" to be a
  1456. UUCP path, and anything else to be a local address.
  1457. .PP
  1458. Because hostile
  1459. .I rmail's
  1460. unpredictably intepret mixed UUCP/domain addresses,
  1461. .I smail/rmail
  1462. understands "domain!user" to be a domain address, and generates
  1463. "path!domain!user" when mailing to a cognate
  1464. .I smail/rmail
  1465. host.
  1466. To distinguish domain "domain!user" from UUCP "host!address", "domain"
  1467. contains at least 1 period.
  1468. Like the old
  1469. .I /bin/rmail,
  1470. .I smail/rmail
  1471. gives precedence to ! over @ when parsing mixed addresses.
  1472. .SH ROUTING
  1473. Because
  1474. .I smail/rmail
  1475. is the UUCP transport mechanism, it can only effect delivery on UUCP paths 
  1476. and local addresses; domain addresses require resolution into UUCP paths or
  1477. local addresses.  
  1478. To resolve a domain address,
  1479. .I smail/rmail
  1480. finds a route to the most specific part of the domain specification listed
  1481. in the routing table.
  1482. Two degress of resolution can occur:
  1483. .RS
  1484. .PP
  1485. Full resolution:
  1486. .I smail/rmail
  1487. finds a route for the entire domain specification, and tacks the user
  1488. specification onto the end of the UUCP path.
  1489. The address can also fully resolve to a local address (the UUCP path is null).
  1490. .PP
  1491. Partial resolution:
  1492. .I smail/rmail
  1493. finds a route for only righthand part of the domain specification, so it 
  1494. tacks the complete address (in the form domain!user) onto the end of the 
  1495. UUCP path.
  1496. Since this syntax is not widely understood, UUCP gateways listed in
  1497. the path database must install new UUCP software, either
  1498. .I smail/rmail
  1499. or new
  1500. .I sendmail
  1501. configuration files (or both).
  1502. .RE
  1503. .PP
  1504. It is an error if a partially resolved address routes to the local host 
  1505. (a null UUCP path), since according to the routing table, the local
  1506. host is responsible for resolving the address more fully.
  1507. .PP
  1508. Sometimes a domain specification is not complete, so
  1509. .I smail/rmail
  1510. matches it against the local domain name, appending the implied part.
  1511. If nothing matches, it appends the last component (top level) of the
  1512. local domain.  Examples help.  If the local domain is "osgd.cb.att.uucp":
  1513. .PP
  1514. ucbvax.uucp     -> ucbvax.uucp          (already complete)
  1515. .br
  1516. p4.ihn.att      -> p4.ihn.att.uucp      (att matched)
  1517. .br
  1518. pavo.cb         -> pavo.cb.att.uucp     (cb matched)
  1519. .br
  1520. politik         -> politik.uucp         (nothing mached)
  1521. .PP
  1522. Notice that all the completed domain specifications end in the top
  1523. level "uucp".
  1524. .I Smail/rmail
  1525. separates this top level name from the rest of the string, so that entries
  1526. in the routing table needn't include it.
  1527. When partial resolution fails,
  1528. .I smail/rmail
  1529. finally tries routing to the top level name, in this case "uucp".
  1530. .PP
  1531. The
  1532. .B -r
  1533. flag causes
  1534. .I smail/rmail
  1535. to attempt to route the first component of a UUCP path, probably so it
  1536. can impress people with how many UUCP hosts it knows.
  1537. If this fails, it passes the unrouted address to
  1538. .I uux,
  1539. in case the path database is not complete.
  1540. The 
  1541. .B -R
  1542. flag causes
  1543. .I smail/rmail
  1544. to take a UUCP path and route the rightmost component of the path (save
  1545. the user name) possible.
  1546. This is mostly for hosts that have very up-to-date routing tables.
  1547. .PP
  1548. After
  1549. .I smail/rmail
  1550. resolves an address, it reparses it to see if it is now a UUCP path or
  1551. local address, complaining if somehow the route turns out to be another
  1552. domain address, because we don't like to resolve more than once.
  1553. This error occurs when an address partially resolves the local host.
  1554. .SH FROMMING
  1555. .I Smail/rmail
  1556. collapses From_ and >From_ lines to generate a simple from argument, which
  1557. it can pass to
  1558. .I sendmail
  1559. or use to create its own "From" line.
  1560. The rule for fromming is: concatenate each "remote from" host (separating 
  1561. them by !'s), and tack on the address on the last From_ line; if that address 
  1562. is in user@domain format, rewrite it as domain!user; ignore host or
  1563. domain if either is simply the local hostname.
  1564. .PP
  1565. .I Smail/rmail
  1566. generates it own From_ line, unless it is feeding
  1567. .I sendmail,
  1568. which is happy with the
  1569. .BI -f from
  1570. argument.
  1571. For UUCP bound mail,
  1572. .I smail/rmail
  1573. generates a "remote from hostname", where hostname is the UUCP hostname
  1574. (not the domain name), so that From_ can indicate a valid UUCP path, leaving
  1575. the sender's domain address in From:.
  1576. .SH FILES
  1577. /usr/lib/uucp/paths        ascii path database
  1578. .br
  1579. /usr/lib/uucp/paths.pag,.dir    dbm(3) path database
  1580. .br
  1581. /usr/spool/uucp/mail.log        log of mail
  1582. .br
  1583. /tmp/mail.log            record of mail
  1584. .SH AUTHOR
  1585. Christopher Seiwald
  1586. .br
  1587. chris@cbosgd.att.uucp
  1588. .SH VERSION
  1589. @(#)smail.8    1.3  (UUCP-Project/CS)  11/14/85
  1590. .SH "SEE ALSO"
  1591. .IR uux (1)
  1592. .br
  1593. .IR sendmail (8)
  1594. .br
  1595. .IR binmail (1)
  1596. .SH BUGS
  1597. Should handle wild addresses such as "user@host@localhost", instead of
  1598. punting after not being able to resolve in one pass.
  1599. END-OF-FILE
  1600.  
  1601. if [ "$filename" != "/dev/null" ]
  1602. then
  1603.   size=`wc -c < $filename`
  1604.  
  1605.   if [ $size != 7659 ]
  1606.   then
  1607.     echo $filename changed - should be 7659 bytes, not $size bytes
  1608.   fi
  1609.  
  1610.   chmod 644 $filename
  1611. fi
  1612.  
  1613. # ---------- file INFO.TODO ----------
  1614.  
  1615. filename="INFO.TODO"
  1616.  
  1617. if [ -f $filename ]
  1618. then
  1619.   echo File \"$filename\" already exists\!  Skipping...
  1620.   filename=/dev/null        # throw it away
  1621. else
  1622.   echo extracting file INFO.TODO...
  1623. fi
  1624.  
  1625. cat << 'END-OF-FILE' > $filename
  1626. 8/11/85
  1627.  
  1628. This software has been running on cbosgd since June 1985, and is
  1629. considered very stable.  It has also run on politik, greipa and
  1630. other machines as beta test sites.  While it seems to be stable, it's 
  1631. really just the beginning.  We expect to find more problems as more
  1632. of the UUCP world becomes able to support domains.
  1633.  
  1634. You will no doubt find problems, and hopefully solve some of them.
  1635. Please let us know about any fixes or improvements you make, we
  1636. want to include them.
  1637.  
  1638. There are no doubt still many things to be done.  Here are some
  1639. that come to mind.
  1640.  
  1641. (software)
  1642.  
  1643.     It would be useful if incoming UUCP mail in the ! notation
  1644.     were usefully converted into true domain information.  Right
  1645.     now, we get mail from foo!bar!mumble!bletch!user and it just
  1646.     gets turned into bar!mumble!bletch!user@foo.UUCP.  It would
  1647.     be nice if it got turned into user@bletch.dom.UUCP instead.
  1648.     (This may matter less and less as this software catches on.)
  1649.  
  1650.     It would be nice to have something to examine the logs smail
  1651.     creates and generate some summary statistics.
  1652.  
  1653.     It might be useful to have a hook to selectively turn off
  1654.     forwarding of mail for certain (senders, destinations, users,
  1655.     machines, whatever) so if your machine is being abused, you
  1656.     can force the abusers to route mail some other way.
  1657.  
  1658.     Porting to other environments is always needed.  Especially
  1659.     of interest would be a port to an environment with no sendmail.
  1660.     You would have to address the issue of mail headers, which smail
  1661.     doesn't look at.
  1662.  
  1663.     The issue of whether this will work decently in a world made
  1664.     up of .COR, .EDU, .GOV, and .country domains (no explicit .UUCP or
  1665.     .ARPA top level domain) will require some evolution.  While it
  1666.     has been running on cbosgd.ATT.COM (with only UUCP connections)
  1667.     for 3 months, and appears to work well, it's in an environment
  1668.     where most of the rest of the world calls itself .UUCP.  As the
  1669.     world evolves there may be adjustments needed.
  1670.  
  1671. (administrative)
  1672.  
  1673.     The UUCP map needs to be more widely available.  Right now you
  1674.     can get it from any of the machines that are advertising that
  1675.     they have a copy on line, often in ~/uumap/*.  Such machines
  1676.     include usenix (the master copy), cbosgd, and seismo.  A cleaned
  1677.     up version is posted monthly to Usenet newsgroup mod.map.
  1678.     Sites not on Usenet may have trouble getting the map.
  1679.  
  1680.     The UUCP map needs to be cleaner.  Currently there are quite
  1681.     a few duplicate machines, and sometimes a few syntax errors
  1682.     or other major semantic errors creep into the ~/uumap copies.
  1683.     The map is being cleaned up as the available manpower permits.
  1684.  
  1685.     The map needs to be partitioned into reasonable pieces that
  1686.     correspond to the domain tree structure.  This can't happen
  1687.     until the tree structure exists.
  1688.  
  1689. (documentation)
  1690.  
  1691.     As always, there is plenty of work to do here.
  1692.  
  1693.     We have a draft document that tells what the domain data
  1694.     is all about, but this is rather vague (given the fact
  1695.     that the domain tree itself is rather vague) and it
  1696.     can no doubt be improved.
  1697.  
  1698. (other)
  1699.  
  1700.     Related tools are always useful.  We have modifications for MH,
  1701.     from Larry Auton, to handle domains.  We don't have similar
  1702.     mods to Mail, although I'm not currently convinced they are
  1703.     needed.
  1704.  
  1705.     Perhaps sendmail.cf should be factored into the various pieces
  1706.     that 4.2BSD comes in, that is, the various include files, so
  1707.     that people can modify one and generate the whole thing.
  1708.  
  1709.     A simple modification to sendmail.cf that those other sites
  1710.     out there that add myname! to the From: line (in violation
  1711.     of RFC822) would be most appreciated.  Upgrading to smail
  1712.     from 4.2BSD is a big enough undertaking that it would be nice
  1713.     if people could fix their bug that bothers us without them having
  1714.     to take the plunge all at once.
  1715. END-OF-FILE
  1716.  
  1717. if [ "$filename" != "/dev/null" ]
  1718. then
  1719.   size=`wc -c < $filename`
  1720.  
  1721.   if [ $size != 3734 ]
  1722.   then
  1723.     echo $filename changed - should be 3734 bytes, not $size bytes
  1724.   fi
  1725.  
  1726.   chmod 644 $filename
  1727. fi
  1728.  
  1729. # ---------- file INFO.TROUBLE ----------
  1730.  
  1731. filename="INFO.TROUBLE"
  1732.  
  1733. if [ -f $filename ]
  1734. then
  1735.   echo File \"$filename\" already exists\!  Skipping...
  1736.   filename=/dev/null        # throw it away
  1737. else
  1738.   echo extracting file INFO.TROUBLE...
  1739. fi
  1740.  
  1741. cat << 'END-OF-FILE' > $filename
  1742.         Common Problems and Recommended Solutions
  1743.  
  1744.             Updated 6/29/86
  1745.  
  1746. (1) The configuration shell script smail.cf.sh insists that
  1747. I give it another domain that I'm authorative for, but we
  1748. don't have anything to give it.
  1749.  
  1750.     This is a common problem for small companies that only
  1751.     have one machine, or for organizations that are originally
  1752.     registering in COM/EDU/GOV and were never known in UUCP.
  1753.  
  1754.     The shell script is somewhat simple - it really should let
  1755.     you just hit RETURN here.  But you can go ahead and follow
  1756.     the examples anyway, and it shouldn't hurt anything.
  1757.  
  1758.     For example, if you're FOOBAR.COM:
  1759.     Enter This Host's Name:
  1760.     foobar
  1761.     Enter This Host's Official Domain:
  1762.     COM
  1763.     Enter Any Equivalent Domain Classes:
  1764.     foobar
  1765.     Enter Any Domains For Which This Host Is An Authority:
  1766.     foobar.UUCP
  1767.     The first two lines mean that you are user@foobar.COM (the two
  1768.     entries strung together.)  The second one means you also
  1769.     undersatnd what to do with user@foobar, which isn't really
  1770.     legal but may tend to drop up from time to time.  The last
  1771.     means you also understand user@foobar.UUCP, which is important
  1772.     for upward compatibility since that's commonly generated by
  1773.     other systems, by netnews software, and the like.
  1774.  
  1775. (2) I can send mail to others OK, but sometimes when they send mail
  1776. to me or I send mail to others on my machine, it doesn't work.
  1777. It says "couldn't resolve myhost.mydom!user".
  1778.  
  1779.     This is probably a configuration problem.  Look in defs.h to see
  1780.     how you have MYDOM set.  It comes distributed as ".UUCP", but
  1781.     you probably want to change this to the answer to the "Enter This
  1782.     Host's Official Domain" question above.  If you don't run sendmail,
  1783.     this is the only way smail has of knowing your host name.
  1784.     (We really should have smail read this in from a file, for future
  1785.     3rd party binary distributions, but so far we haven't.)
  1786.  
  1787. (3) Mail isn't getting through sometimes, and since I just installed
  1788. this new software, I suspect it.  Or, I see munged header lines, and
  1789. I don't know who is doing it.
  1790.  
  1791.     If you aren't sure where the mail is getting dropped (remember, UUCP
  1792.     is an unreliable transport mechanism, so lots of things could be going
  1793.     wrong) here's a trick we sometimes use to find out what's going on.
  1794.     mv /bin/rmail /bin/realrmail
  1795.  
  1796.     cat > /bin/rmail
  1797.     #! /bin/sh
  1798.     umask 0
  1799.     LF=/usr/spool/uucp/rmail.log
  1800.     cat > /tmp/rm$$
  1801.     echo " " >> $LF
  1802.     date >> $LF
  1803.     echo rmail $* >> $LF
  1804.     cat /tmp/rm$$ >> $LF
  1805.     realrmail $* < /tmp/rm$$
  1806.     st=$?
  1807.     rm /tmp/rm$$
  1808.     exit $st
  1809.     ^D
  1810.     chmod 755 /bin/rmail
  1811.     
  1812.     This will keep a very verbose log of all incoming traffic into your
  1813.     machine in LF, including the text as it arrived on your machine, and
  1814.     the arguments to rmail.  You can tell whether it was broken when it
  1815.     arrived or if you broke it, and you can reproduce the mail by editing
  1816.     out the message (into, say, /tmp/msg) and running
  1817.     realrmail args < /tmp/msg
  1818.     using the args as they appear in the file.
  1819.  
  1820.     Some words of warning.  (a) These files can get big very fast if you
  1821.     process much traffic through your machine, so be sure to clean them
  1822.     out often.  (b) This saves everything, including the message body.
  1823.     It is unethical to browse such logs unless a specific problem has
  1824.     arisen which requires you to check the log.  This is one reason why
  1825.     it's kept in /usr/spool/uucp, if you have a hidden directory on your
  1826.     system that's even better.  (c) This extra set of file copies adds
  1827.     overhead to your machine, so don't run this unless you suspect you
  1828.     have a problem, and then take it out when you trust things again.
  1829.  
  1830.     There is a RECORD option in the code which is similar, but this
  1831.     option saves the mail at a later stage, so you lose some information
  1832.     about how it arrived on your machine.
  1833.  
  1834. (4) I don't understand how to set up subdomain of my domain.
  1835.  
  1836.     There are two ways to do this.  The easiest is just by recognizing
  1837.     the subdomain host by their UUCP name.  If you are the gateway for
  1838.     domain FOO.COM, then any mail through your sendmail to bar.FOO.COM
  1839.     or to bar.myname.FOO.COM (where "myname" is your hosts's name) will
  1840.     be treated as if it were bar.UUCP, so if the name "bar" is in your
  1841.     path file, you're all set.  The disadvantage to this is that if you
  1842.     want to create a subdomain whose name conflicts with a public name,
  1843.     it won't work.  If you want to disable this code, look for "mydom"
  1844.     in the sendmail.cf.
  1845.  
  1846.     A perhaps cleaner way is to explicitly put the subdomains into the
  1847.     pathalias database.  Thus, if you have a.FOO.COM, b.FOO.COM, p.b.FOO.COM,
  1848.     x.myname.FOO.COM, and y.myname.FOO.COM, you could include this in
  1849.     your local pathalias input:
  1850.     aname    .a.FOO.COM
  1851.     bname    .b.FOO.COM
  1852.     pname    .p.b.FOO.COM
  1853.     xname    .x.myname.FOO.COM
  1854.     yname    .y.myname.FOO.COM
  1855.     In each case, "aname" is the UUCP name for host "a", etc.  This
  1856.     sort of says "aname and a.FOO.COM are the same host."  This
  1857.     description says that you have subdomains x and y under your host,
  1858.     that there are peer subdomains a and b, and that you know about
  1859.     a subdomain of b called p.  Other subdomains of a and b that
  1860.     are not mentioned here will be routed through aname or bname as
  1861.     gateways.  The only reason to mention p here would be if we have
  1862.     a direct link and want to avoid routing through bname.  If you
  1863.     do this, you have less strict requirements about name uniqueness:
  1864.     aname, bname, pname, xname, and yname must still be unique, and
  1865.     a.FOO.COM, b.FOO.COM, p.b.FOO.COM, x.myname.FOO.COM, and
  1866.     y.myname.FOO.COM must also be unique (ignoring case, so that
  1867.     two different hosts a.foo.com and A.FOO.COM conflict.)  In
  1868.     particular, this means that if you have a local host with a name
  1869.     that isn't unique, say "bilbo", you can safele create a subdomain
  1870.     "bilbo.myname.FOO.COM", but you'll still have a problem if the
  1871.     UUCP name of the host is "bilbo".  You may be able to make this
  1872.     partly work using the pathalias "private" notation, but we advise
  1873.     you to change the UUCP name to something unique.
  1874.  
  1875. (5) When another host in my domain sends mail to a third host in my
  1876.     domain, it seems to get routed through the gateway even though
  1877.     my host knows how to route directly.
  1878.  
  1879.     For example, suppose you have gateway cbosgd.att.com, and other
  1880.     machines foo.att.com and bar.att.com.  Smail is installed on all
  1881.     three machines.  But when a user on foo sends to user@bar.att.com,
  1882.     the mail is routed via cbosgd.  Sometimes, you may even see this
  1883.     happen for mail on foo to foo.
  1884.  
  1885.     There are two solutions.  The first is to make sure that foo knows
  1886.     that bar.att.com is the same as bar (where "bar" is the uucp name.)
  1887.     Include lines in the local pathalias input files like
  1888.     foo    .foo.att.com
  1889.     bar    .bar.att.com
  1890.     cbosgd    .cbosgd.att.com
  1891.     
  1892.     The second solution is to declare foo to be a gateway for your
  1893.     subdomain, e.g.
  1894.     foo    .att.com
  1895.     This will handle all mail to att.com locally on foo instead of
  1896.     routing it through cbosgd.  (It also means you'd better be sure
  1897.     to keep the routing tables on foo as up to date as on cbosgd.)
  1898.  
  1899.     The first method is strongly recommended for everyone.  The second
  1900.     is appropriate only for well maintained and supported hosts.
  1901.     Either should handle the problem.
  1902.  
  1903. (6) Mail to some domains isn't working.  For example, if I type
  1904.  
  1905.     smail -d USER@LLL-MFE.ARPA
  1906.     
  1907.     It says:
  1908.  
  1909.     parse address 'USER@LLL-MFE.ARPA' = USER @ LLL-MFE.ARPA (2)
  1910.     getpath 'LLL-MFE.ARPA' failed
  1911.     USER@LLL-MFE.ARPA...couldn't resolve LLL-MFE.ARPA.
  1912.     resolve 'USER@LLL-MFE.ARPA' = USER @ LLL-MFE.ARPA (0)
  1913.  
  1914.     There is a .arpa line in the pathalias database that looks like:
  1915.  
  1916.     .arpa    ihnp4!akgua!gatech!seismo!%s
  1917.  
  1918.     Chances are the pathalias database is out of order.  Remember
  1919.     to run it through "sort -f" before storing it.
  1920.  
  1921. (7) People on the ARPANET are complaining about us sending them mail
  1922.     from FOO.COM when we aren't on the ARPANET.
  1923.  
  1924.     Tell them to upgrade their mail system to support MX records.
  1925.     If you have a COM, EDU, or GOV name confirmed by the UUCP Zone,
  1926.     you have an oficially allocated name which you are entitled to
  1927.     use.  However, the old way of handling things on the ARPANET was
  1928.     to open a connection directly to the destination host and send
  1929.     the mail via SMTP.  Many hosts assume that a name ending in ARPA,
  1930.     COM, etc implies being on the ARPANET, and handle mail this way.
  1931.     (4.3BSD still does this.)  An RFC approved in January 1986 says
  1932.     that mailers are supposed to check for an MX record, which says
  1933.     that mail for one domain should be delivered to a different host
  1934.     to be forwarded.  As of August, 1986, very few ARPANET hosts have
  1935.     mailers that understand MX, and the standard UNIX and TOPS 20
  1936.     mailers don't support it.  So politely urge them to find whoever
  1937.     supports their mailer and get it upgraded to support MX.  (Berkeley
  1938.     has a version of sendmail that supports it, but it isn't in 4.3BSD.
  1939.     The latest MMDF also supports it.)  In the meantime, tell whoever
  1940.     is trying to send you mail that mail to user@foo.COM (for example)
  1941.     can be sent to foo.COM!user@seismo.CSS.GOV.
  1942. END-OF-FILE
  1943.  
  1944. if [ "$filename" != "/dev/null" ]
  1945. then
  1946.   size=`wc -c < $filename`
  1947.  
  1948.   if [ $size != 9205 ]
  1949.   then
  1950.     echo $filename changed - should be 9205 bytes, not $size bytes
  1951.   fi
  1952.  
  1953.   chmod 644 $filename
  1954. fi
  1955.  
  1956. echo done
  1957.  
  1958. exit 0
  1959.