home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume11 / smail3 / part01 next >
Encoding:
Internet Message Format  |  1988-05-08  |  43.0 KB

  1. Subject:  v11i069:  Smail, UUCP domain mailer, Part01/03
  2. Newsgroups: comp.sources.unix
  3. Sender: sources
  4. Approved: rs@uunet.UU.NET
  5.  
  6. Submitted-by: Larry Auton <clyde.ATT.COM!lda>
  7. Posting-number: Volume 11, Issue 69
  8. Archive-name: smail3/Part01
  9.  
  10. [  Smail is the "official" mailer of the UUCP Project, the people who
  11.    bring you the monthly UUCP maps and domain names to UUCP-only
  12.    organizations.  Putting it quite shortly, this turns any UUCP
  13.    site into a "smart" mailer.  The documentation is extensive.  --r$  ]
  14.  
  15.  
  16. # This is a shell archive.  Remove anything before this line, then
  17. # unpack it by saving it in a file and typing "sh file".  (Files
  18. # unpacked will be owned by you and have default permissions.)
  19. #
  20. # This archive contains:
  21. # Contacts Domains Flow.Diagram Install Read.Me aliases.8 lcasep.8 mkfnames.8 nptx.8 pathproc.8 paths.8 smail.8
  22.  
  23. echo x - Contacts
  24. cat > "Contacts" << '//E*O*F Contacts//'
  25.         Contact Information
  26.  
  27. We strongly encourage electronic mail for queries, updates, and
  28. applications.  This cuts down on our costs, and we can pass those
  29. savings along to you.  We currently do not have a telephone number
  30. for queries, although we hope to have one in the near future.  If
  31. you are unable to send and receive electronic mail, you will have
  32. to wait until we are prepared for telephone calls or postal mail.
  33.  
  34. For queries:    uucp-query@Stargate.COM        cbosgd!stargate!uucp-query
  35.  
  36. For updates:    uucpmap@Stargate.COM        cbosgd!stargate!uucpmap
  37.  
  38. For problems:    uucp-problem@Stargate.COM    cbosgd!stargate!uucp-problem
  39.  
  40. To register:    registry@Stargate.COM        cbosgd!stargate!registry
  41. #
  42. #@(#)Contacts    2.5 (smail) 9/15/87
  43. #
  44. //E*O*F Contacts//
  45.  
  46. echo x - Domains
  47. cat > "Domains" << '//E*O*F Domains//'
  48.            WHAT YOU NEED TO KNOW ABOUT PATHALIAS
  49.        AND WHAT PATHALIAS NEEDS TO KNOW ABOUT YOU
  50.                    or
  51.            HOW PATHALIAS MAKES DOMAINS
  52.  
  53.                 Christopher Seiwald
  54.  
  55. This note describes the host connectivity data and domain data
  56. needed to effect UUCP domain-style address routing.  This
  57. describes mostly the domain data, but also discusses how to
  58. distribute connectivity data.  Look elsewhere for a discussion of
  59. domains.
  60.  
  61. Briefly, the connectivity data (what's in mod.map) connects
  62. all hosts in the UUCP network into one big directed graph, and
  63. the domain data superimposes a domain tree onto that graph.
  64. Pathalias converts these two sets of data into a routing database
  65. which smail/rmail, a UUCP mail routing program, uses.
  66.  
  67. 1.  Domains and Gateways for UUCP
  68.  
  69. For domains in the UUCP zone, the top of a subdomain is all
  70. gateway hosts for that domain; the top of the UUCP zone will
  71. probably be nearly a hundred hosts.  As a transition aid, we
  72. also consider an individual host at the bottom of the domain tree a
  73. subdomain "host.UUCP", with one gateway and no further subdomains.  
  74. (We expect to phase this out eventually.)
  75.  
  76. A gateway host for a domain must do four things:
  77.     I)    Pass mail bound for that domain to the
  78.         appropriate host.
  79.     II)    Pass mail bound for outside that domain to a
  80.         gateway in the parent domain.
  81.     III)    Pass mail bound for a subdomain to a gateway of
  82.         that subdomain.
  83.     IV)    Recognise the domain!user address syntax.
  84.  
  85. smail/rmail already provides (IV).  With the data described here,
  86. pushed through pathalias, smail/rmail can then provide (I)-(III).
  87.  
  88. 2.  The Zone Registry
  89.  
  90. For any sizeable zone, one gateway host supports the zone registry.
  91. For other zones, such as BITNET, CSNET, DDN, etc., registries are
  92. supported, using conventions appropriate to those zones.  Contact
  93. electronic mail addresses are supported for queries, and updates to
  94. configuration information may also be handled via mail.  In the UUCP
  95. zone, the id's "uucpmap@cbosgd.ATT.COM" and "domains@cbosgd.ATT.COM"
  96. serve to collect the connectivity and domain data, respectively, for
  97. that zone.
  98.  
  99. The registry for a zone speaks for that zone, communicating
  100. chiefly with its peers, the registry of the parent domain, and
  101. the registries of the subdomains.
  102.  
  103. 3.  Functions of Domain Data
  104.  
  105. Each gateway for a domain must map the domain-style names into
  106. the UUCP host names for all hosts of the domain.  This host name
  107. mapping provides (I) above.
  108.  
  109. Each gateway for a domain knows a) at least one gateway for each
  110. immediate subdomain, and b) at least one gateway host of the
  111. parent domain.  This provides (II) and (III) above.
  112.  
  113. For consistency across the gateways of a domain, each gateway for
  114. the domain should know a) ALL gateways for each immediate
  115. subdomain; and b) ALL gateways for the parent domain.  Pathalias
  116. will pick the closest. In this way, one single database can
  117. describe the domain structure for all gateways on a domain,
  118. without variations for each gateway. 
  119.  
  120. In order to aid routing and avoid overloading the parent gateway,
  121. gateways should also know most gateways for peer level domains.
  122. This information is also provided by the map and used by pathalias.
  123. When a new peer domain is created, traffic can be routed through the
  124. parent (which must be updated immediately) until information about
  125. the peer can be propagated.
  126.  
  127. Additionally, a gateway could know about domains more than one
  128. level above or below it so that mail doesn't stop for address
  129. resolution at every gateway along its path.
  130.  
  131. 4.  Format of Domain Data
  132.  
  133. 4.1  Host Name List
  134.  
  135. The host name list aliases the domain style address of a host to
  136. the UUCP host name.  The pathalias input format is:
  137.  
  138.         uucp-name .domain-name[, ...]
  139.  
  140. The .UUCP suffix is implicit in the uucp-name (smail/rmail does
  141. this), and is not needed.
  142. Upper/lower case doesn't matter in a dotted domain name.
  143. Examples:
  144.     
  145.         ihnp4 = .ATT.COM
  146.         ucbvax = .Berkeley.EDU
  147.         cbosgd = .osgd.cb.att.com, .cbosgd.att.com
  148.  
  149. Might produce from pathalias:
  150.  
  151.         ihnp4            mtxinu!ihnp4!%s
  152.         .ihnp4.ATT.COM        mtxinu!ihnp4!%s
  153.         ucbvax            ucbvax!%s
  154.         .Berkeley.EDU        ucbvax!%s
  155.         cbosgd            cbosgd!%s
  156.         .osgd.cb.att.com    cbosgd!%s
  157.         .cbosgd.att.com        cbosgd!%s
  158.  
  159. A single host may have more than one domain style address; in
  160. fact, a host may be in several domains at once.  However, each
  161. host must have a single primary location in the domain tree,
  162. and other addresses should be viewed as transition aids.  For
  163. example, cbosgd might be known as cbosgd, cbosgd.UUCP,
  164. cbosgd.ATT.UUCP, cbosgd.btl.csnet, and cbosgd.ATT.COM, but
  165. the primary name is the one in the organizational domain (COM)
  166. which applies to all networks, and the others are temporary
  167. names for upward compatibility only.
  168.  
  169. 4.2  Domain Gateway List
  170.  
  171. The domain gateway list aliases the domain style address of a
  172. domain to the UUCP host name of the closest gateway of that
  173. domain.  This involves a trick in pathalias, and employs a
  174. extra network name domain-gw.  The pathalias input format is:
  175.  
  176.         domain-gw .domain-name
  177.  
  178. Again, the .UUCP suffix is implicit in the uucp-name, and is
  179. not needed.  
  180. Examples:
  181.  
  182.         decwrl .DEC.COM
  183.         decuac .DEC.COM
  184.  
  185.         cbosgd .ATT.COM
  186.         clyde .ATT.COM
  187.  
  188. Might generate from pathalias:
  189.  
  190.         .DEC.COM    seismo!decuac!%s
  191.         .ATT.COM    cbosgd!%s
  192.  
  193. Note that pathalias chooses the closest host from inside the {}'s.
  194. The (DEAD)'s prevent pathalias from following along the mock network
  195. called "domain-gw".
  196.  
  197. 5.  Distribution of Domain Data
  198.  
  199. A zone registry maintains a Host Name List (in the format of 4.1
  200. above) of all hosts within its domain and a Domain Gateway List
  201. (in the format of 4.2 above) of all gateways of the domain.
  202.  
  203. Up: A registry collects the Domain Gateway List from the registry
  204. of each of its subdomains, and transmits to the registry of its
  205. parent domain its own Domain Gateway List and, if it chooses, the
  206. Domain Gateway Lists of some or all of its subdomains.  Whether
  207. it includes lists from its subdomains depends on how important it
  208. considers them to the parent domain.
  209.  
  210. Down: Similarly, a registry collects the Domain Gateway List from
  211. the registry of its parent domain, and transmits to the registry
  212. of each of its subdomains its Domain Gateway List and the Domain
  213. Gateway List of its parent domain.  Note that the Domain Gateway
  214. List of the parent domain may include lists from the parent's
  215. other subdomains.
  216.  
  217. A registry may decide not to use the parent domain's Domain
  218. Gateway List or not to transmit it to its subdomains' registries.
  219. (This should be done only with the consent of the subdomains.) In
  220. this case, the registry must introduce a domain gateway alias for
  221. all top level domains, to ensure that all the mail gets delivered.
  222.  
  223. Across: a registry transmits to each of the gateways of its
  224. domain its Host Name List, its Domain Gateway List, and collected
  225. Domain Gateway Lists.  The registry also transmits to each normal
  226. host (one gateway, no subdomains) of its domain its Domain
  227. Gateway List.
  228.  
  229. Together, "up," "down," and "across" insure that each gateway has
  230. the Host Name List for its domain, and the Domain Gateway List of
  231. its own domain and at least its parent domain and subdomains.
  232. "Up" and "across" will probably take place on demand by mail.
  233. "Down" will probably be broadcast via netnews on a regular
  234. schedule.  In particular, the second level information for the UUCP
  235. zone (one entry per organization) and the complete top level domain
  236. information make up the postings to mod.map.
  237.  
  238. 6.  Distribution of Connectivity Data
  239.  
  240. The distribution of connectivity data will probably follow the
  241. path of domain data: registries passing connectivity data up,
  242. down, and across the domain tree, with the exception that the
  243. connectivity within a third (or lower) level domain will be
  244. discouraged from leaving the domain, so the data the UUCP zone
  245. registry distributes will include only the first and second
  246. level gateways.  Local information about internal subdomains and
  247. machines of organizations should not be included in globally
  248. published information, but rather distributed locally as needed.
  249.  
  250. 7.  Various Notes
  251.  
  252. The following are examples of data that should be joined together
  253. as input to pathalias.
  254.  
  255.     Parent Domain Gateway List
  256.     Parent Connectivity Data
  257.     This Level Domain Gateway List
  258.     This Level Host Name List
  259.     This Level Connectivity Data
  260.     Collected Subdomains' Domain Gateway Lists
  261.     Collected Subdomains' Connectivity Data
  262.     Private Additions
  263.     Alias for "this host"
  264.  
  265. This note does not describe the inclusion of private additions to
  266. the domain or connectivity data.
  267.  
  268. Because domain names intermix with host names (and the .UUCP
  269. suffix is implicit), you can address hosts known at your gateway
  270. as "uucp-host.UUCP".  We discourage this, because the address is 
  271. then particular to the sender's location.
  272.  
  273.  
  274.         /+\
  275. 5/1/85        +\    chris@cbosgd.att.com
  276.         \+/
  277.  
  278. [Updated 5/9/86 by Mark Horton.]
  279. #
  280. #@(#)Domains    2.5 (smail) 9/15/87
  281. #
  282. //E*O*F Domains//
  283.  
  284. echo x - Flow.Diagram
  285. cat > "Flow.Diagram" << '//E*O*F Flow.Diagram//'
  286. vanilla 4.2BSD mail flow
  287.  
  288. LOCAL   /bin/mail ----                           -- /bin/mail -- LOCAL
  289.                       \                        / 
  290.                        ----------- sendmail --
  291.                       /          /             \
  292. LOCAL   Mail ---------          /                -- uux -------- REMOTE
  293.                                /
  294. REMOTE  /bin/rmail ------------
  295.  
  296. ==========================
  297.  
  298. smail 4.2BSD mail flow
  299.  
  300. LOCAL   /bin/mail                          -- /bin/mail -- LOCAL
  301.                  \                        /
  302.                   ------------ sendmail --
  303.                  /          /             \
  304. LOCAL   Mail ---          /                -- /bin/smail -
  305.                          /  (non-bang)                    \
  306. REMOTE  /bin/rmail ------                                  \
  307.                           \  (bang)                          \
  308.                    ------------------------------------- uux REMOTE
  309.  
  310. ==========================
  311.  
  312. vanilla SVR2 mail flow
  313.  
  314.         mail    is "/usr/src/cmd/mail.c"
  315.         rmail    is linked to mail
  316.  
  317. LOCAL    mail  ------------\              /--------------------- LOCAL
  318.                    \            /
  319. LOCAL    mailx ----> mail ---+----------+
  320.                    /            \
  321. REMOTE    rmail ------------/              \-- uux -------------- REMOTE
  322.  
  323. ==========================
  324.  
  325. Modified SVR2 mail flow using SENDMAIL
  326.  
  327. Definitions of changed/renamed programs
  328.  
  329.         mail    is "svbinmail.c"
  330.         lmail    is "/usr/src/cmd/mail.c"
  331.         rmail    is linked to smail
  332.  
  333. LOCAL    mail  ------------\                /-- lmail ---------- LOCAL
  334.                    \              /
  335.                             +--sendmail--+
  336.                    /              \
  337. LOCAL    mailx --- mail ---/                \-- smail -- uux --- REMOTE
  338.  
  339.  
  340.                                                /-- lmail ------ LOCAL
  341.                                               /
  342.                                 /--sendmail--+
  343.                                /              \
  344.                               /                \- smail - uux - REMOTE
  345.                              / (domain | LOCAL)
  346. REMOTE  rmail --------------+
  347.                              \ (bang)
  348.                               \
  349.                                \------------------ uux -------- REMOTE
  350.  
  351. ==========================
  352.  
  353. Modified SVR2 mail flow without SENDMAIL
  354.  
  355. LOCAL    mail  ------------\                /-- lmail ---------- LOCAL
  356.                    \              /
  357.                             +-- rmail ---+
  358.                    /    /         \
  359. LOCAL    mailx --- mail ---/    /           \-- uux ----------- REMOTE
  360.                               /
  361.                              /
  362. REMOTE    --------------------+
  363.  
  364. #
  365. # @(#)Flow.Diagram    2.5 (smail) 9/15/87
  366. #
  367. //E*O*F Flow.Diagram//
  368.  
  369. echo x - Install
  370. cat > "Install" << '//E*O*F Install//'
  371. There are three system types on which smail can be installed.
  372.  
  373.     (1) Berkeley with sendmail
  374.     (2) System V with sendmail
  375.     (3) System V without sendmail
  376.  
  377.     Note: if you have a System III or V7 derived system, you
  378.     can probably treat it like (3).  We have not tested smail
  379.     on such a system.
  380.  
  381. The installation will vary slightly for each system type.
  382.  
  383. For all systems you first have to create a 'paths' database.
  384. See paths(8) for details on the file's format.  Then
  385. copy it to /usr/lib/uucp/paths.
  386.  
  387. Next, edit "defs.h" to configure smail to suit your situation.
  388.  
  389. Here are step by step installation instructions for each system type.
  390.  
  391. (1) For a berkeley system with sendmail, the steps are:
  392.  
  393.     $ make
  394.  
  395.     $ cp smail /bin/smail
  396.  
  397.     $ sh make.cf.sh
  398.         <answer the questions it asks>
  399.  
  400.     $ mv /usr/lib/sendmail.cf /usr/lib/OLDsendmail.cf
  401.  
  402.     $ cp sendmail.cf /usr/lib/sendmail.cf
  403.  
  404.     $ /usr/lib/sendmail -bz
  405.  
  406.     $ mv /bin/rmail /bin/OLDrmail
  407.  
  408.     $ ln /bin/smail /bin/rmail
  409.  
  410. (2) For a System V system with sendmail, the steps are:
  411.  
  412.     $ make
  413.  
  414.     $ cp smail /bin/smail
  415.  
  416.     $ ln /bin/mail /bin/lmail
  417.  
  418.     $ sh make.cf.sh
  419.         <answer the questions it asks>
  420.  
  421.     $ mv /usr/lib/sendmail.cf /usr/lib/OLDsendmail.cf
  422.  
  423.     $ cp sendmail.cf /usr/lib/sendmail.cf
  424.  
  425.     $ /usr/lib/sendmail -bz
  426.  
  427.     $ rm /bin/mail # (Remember, you still have it in /bin/lmail.)
  428.  
  429.     $ mv svbinmail /bin/mail
  430.  
  431.     $ mv /bin/rmail /bin/OLDrmail
  432.  
  433.     $ ln /bin/smail /bin/rmail
  434.  
  435.     Note: some implementations of sendmail don't work when the 'U'
  436.     flag is set in the definition of the local mailer (a line that
  437.     begins with "Mlocal" in the generated sendmail.cf).  If you try
  438.     to send mail from a local user to a local user, a message comes
  439.     out that says "No '!' in UUCP! (user)" - and the mail fails.
  440.     If this happens take the 'U' flag out of the sendmail.cf.
  441.  
  442.     [ the >'s are secondary prompts from the shell,
  443.       and ^M is 'carat' 'M', not 'control-M' ]
  444.  
  445.     $ ed sendmail.cf <<!
  446.     > /^Mlocal/s/SU/S/
  447.     > w
  448.     > q
  449.     > !
  450.  
  451. (3) For a System V system without sendmail, the steps are:
  452.  
  453.     $ make
  454.  
  455.     $ cp smail /bin/smail
  456.  
  457.     $ mv /bin/mail /bin/lmail
  458.  
  459.     $ mv svbinmail /bin/mail
  460.  
  461.     $ mv /bin/rmail /bin/OLDrmail
  462.  
  463.     $ ln /bin/smail /bin/rmail
  464.  
  465. You're done.
  466.  
  467. #
  468. # @(#)Install    2.5 (smail) 9/15/87
  469. #
  470. //E*O*F Install//
  471.  
  472. echo x - Read.Me
  473. cat > "Read.Me" << '//E*O*F Read.Me//'
  474.         Read.Me - Updated 9/15/87
  475.  
  476. What smail does:
  477.  
  478.   smail is capable of handling UUCP syntax (bang paths, bang
  479.   domains, and at domains are supported) mail transportation
  480.   over UUCP/uux/rmail channels.  It will support machines that
  481.   only have UUCP connections, and machines with UUCP links to
  482.   the outside world plus a small number of local machines that
  483.   are reached via SMTP.  The domain intelligence is embedded
  484.   in the smail database (e.g. the pathalias output), not the
  485.   sendmail.cf file, so if you have a fancier domain structure
  486.   that involves SMTP or anything other than uux in the domain
  487.   structure, you'll want to modify the sendmail.cf file here or
  488.   merge pieces of the enclosed sendmail.cf into your own.
  489.  
  490.   smail runs under 4.2BSD and System V, as a back end to sendmail;
  491.   and under System V without sendmail.  It also replaces rmail, which
  492.   becomes a link to smail.  In a sendmail environment, smail depends on
  493.   sendmail to crack the headers, as smail just deals with the envelope.
  494.   smail makes your host capable of using the INTERNET definition in the
  495.   Usenet software.
  496.  
  497.   Features of smail include:
  498.  
  499.   (1) Using pathalias data to choose the best route to your destination.
  500.   (2) Handling of user@domain, domain!user, and host!user syntax.
  501.   (3) Generation of domain!user syntax to be forwarded by other systems.
  502.   (4) Logging of traffic through your machine, by sender, recipient, and
  503.       size of message, so you can, track use and detect abuse of your
  504.       machine.
  505.   (5) Mail being forwarded through your machine to another uux link is
  506.       passed from rmail directly to uux, so there's less overhead on
  507.       your machine (sendmail stays out of the loop.)
  508.   (6) Sendmail-like alias capability for hosts without sendmail.
  509.   (7) Generation of RFC822 required headers for locally generated mail.
  510.   (8) Robust delivery scheme that reroutes only if stated path is inaccessible.
  511.   (8) Mail that is undeliverable is returned to sender.
  512.   (9) Simplicity.
  513.  
  514. Prerequisites:
  515.  
  516.   A copy of a recent posting of pathalias.  (The one posted
  517.   by Peter Honeyman in January 1986 is recommended.)
  518.  
  519.   A current copy of the UUCP map, or at least a copy of the
  520.   appropriate part of it that you're interested in.
  521.  
  522.   A properly registered domain name for your organization, such
  523.   as ATT.COM.  (It is possible to run smail using a domain name
  524.   under .UUCP, but since this can't be officially registered,
  525.   it is appropriate only for testing.)
  526.  
  527.   You can get pathalias from the mod.sources Usenet archive
  528.   (contact rsalz@uunet.uu.net or uunet!rsalz)
  529.  
  530.   You can get a UUCP map each month from Usenet newsgroup mod.map.
  531.   The UUCP map is quite large (currently about 2MB) so please don't ask
  532.   to have a copy mailed to you - get a copy from a nearby Usenet site.
  533.  
  534.   You can get a domain name by joining the UUCP Zone.  There are
  535.   low membership dues for this, and a registration process that
  536.   will take 2-8 weeks.  This Read.Me file may be out of date by
  537.   the time you read it, so we ask you to contact us for current
  538.   dues rates and procedures.  Contact uucp-query@Stargate.COM or
  539.   cbosgd!stargate!uucp-query and ask for the UUCP Zone information
  540.   packet.  (If you already belong to a network such as CSNET, DDN,
  541.   or BITNET, your organization may already have a domain name.  If
  542.   you are also on UUCP, it is recommended that you also join the
  543.   UUCP Zone at the lower rate for organizations whose primary
  544.   affiliation is with another network.  See the file "Registry"
  545.   for more information.
  546.  
  547. Overall structure:
  548.  
  549.   smail is installed in /bin/smail with a link in /bin/rmail.  Uuxqt
  550.   calls rmail, which either forwards the message on to the next hop
  551.   directly or, on a sysetm with sendmail, calls sendmail.  sendmail
  552.   may decide the message should be delivered by UUCP, and invoke smail,
  553.   which will look up a route and invoke uux.  (Note that the choice
  554.   about when to invoke sendmail and when to process a message directly
  555.   can be configured in smail.)
  556.  
  557.   smail uses a database which is generated from pathalias.  You take the
  558.   current UUCP map, add some local information and topology data (to tell
  559.   it about the domain tree) and run pathalias.  The result is sorted and
  560.   installed in /usr/lib/uucp/paths.  There is no hashing done on this
  561.   file - when smail looks up a name it uses a binary search.
  562.  
  563. Configuration considerations:
  564.  
  565.   You'll note two configuration options in defs.h: HANDLE and ROUTING.
  566.   These control which sorts of addresses smail/rmail will handle, and
  567.   which type of routing they will do.  The HANDLE define only affects
  568.   rmail, since smail sets it implicitly.  In any case, we recommend
  569.   that you leave HANDLE alone, unless you are making major changes.
  570.  
  571.   ROUTING has three choices: JUSTDOMAIN, ALWAYS, and REROUTE.  rmail
  572.   will run as JUSTDOMAIN, the defs.h default.  This means rmail will
  573.   only apply routing if it sees "rmail user@domain", and will just call
  574.   uux if it sees "rmail host!user".  (If the uux fails, it will call
  575.   smail -r, which will apply ALWAYS routing to try to get the mail
  576.   there anyway.  If the ALWAYS routing fails, then REROUTE routing is
  577.   applied.  This has the advantage of being low overhead on your
  578.   system, not second guessing a route someone else asked for, and still
  579.   recovering nicely from the mistakes of another system.  Your host
  580.   becomes a "smart host" that can get mail anywhere.)
  581.  
  582.   Many people will note huge paths going through their machine.  These
  583.   paths are generated by replies to netnews messages, and tend to be 10
  584.   or 20 hops long - far longer than necessary.  If you are a bit aggressive,
  585.   you can change -r to -R, which will cause such failed mail to be rerouted,
  586.   thus, mail to a!b!c!d!e!f!g!user will look up a route to g, and send the
  587.   mail to route!g!user.  (If it can't find g, it will try f, then e, and
  588.   so on until it finds someone it recognizes.)  If you are REALLY aggressive,
  589.   you can change ROUTING to REROUTE in defs.h, to get the same effect for
  590.   ALL rmail being passed through your machine.  This may help cut phone
  591.   bills, but it has some disadvantages.  It can lengthen a path sometimes,
  592.   e.g. mail to tektronix!user might turn into ihnp4!tektronix!user if your
  593.   routing database says mail to tektronix goes through ihnp4.  It makes it
  594.   hard to route around a dead host, or to redirect traffic from a mailing
  595.   list to several different directions.  It may also make mail go a different
  596.   path than what your user thought it was, and it affects other hosts that
  597.   route mail through you if you set ROUTING to REROUTE in defs.h.  So only
  598.   do this if you know what you are doing, and are willing to live with the
  599.   disadvantages.
  600.  
  601. #
  602. #@(#)Read.Me    2.5 (smail) 9/15/87
  603. #
  604. //E*O*F Read.Me//
  605.  
  606. echo x - aliases.8
  607. cat > "aliases.8" << '//E*O*F aliases.8//'
  608. .TH ALIASES 8
  609. .tr ~
  610. .SH NAME
  611. aliases \- alias file for smail
  612. .SH DESCRIPTION
  613. This file is used by
  614. .I smail
  615. only if
  616. .I SENDMAIL
  617. is
  618. .I not defined.
  619. If
  620. .I SENDMAIL
  621. is defined, then
  622. .I sendmail
  623. does all of the aliasing for the host.
  624. .PP
  625. This file contains a list of aliases for
  626. local users or mailing lists.
  627. The format of each alias is
  628. .sp
  629. .ce
  630. alias_name~recip_name1~recip_name2~...
  631. .sp
  632. An attempt has been made to remain compatible with
  633. .I sendmail
  634. alias file format, though the syntax is much more format free than
  635. .I sendmail.
  636. As distributed,
  637. .I case differences are ignored
  638. when comparing names to aliases.
  639. Only alias names which resolve to the local host are recognized, and are
  640. stored in their local form.
  641. Lines which start with a white~space are continuation lines.
  642. Parenthesised strings are taken as comments (no nesting),
  643. as is anything after a '#' (as in
  644. .IR /bin/sh ).
  645. Here are some examples:
  646. .sp
  647. .nf
  648. # this whole line is a comment
  649. #
  650. # These are equivalent definitions
  651.  
  652. alias_name      recip1 recip2 recip3
  653.  
  654. alias_name:     recip1, recip2 , recip3
  655.  
  656. alias_name      recip1 recip2
  657.                 recip3
  658.  
  659. alias_name      recip1  # Recip1's name
  660.                 recip2  # Recip2's name
  661.                 recip3  # Recip3's name
  662.  
  663. alias_name      recip1 (Recp1's name) recip2 (Recp2's name)
  664.                 recip3 (Recp3's name)
  665.  
  666. alias_name@thishost     recip1 recip2 recip3
  667.  
  668. alias_name@thisdomain   recip1 recip2 recip3
  669.  
  670. thishost!alias_name     recip1 recip2 recip3
  671.  
  672. thisdomain!alias_name   recip1 recip2 recip3
  673. .fi
  674. .PP
  675. Mailing lists are easily handled by two forms of file inclusion.
  676. The first form is the same as is supported by
  677. .I sendmail
  678. .sp
  679. .ce
  680. mylist    :include:/usr/lib/ml/mylist
  681. .sp
  682. In this example, each entry in
  683. .I /usr/lib/ml/mylist
  684. would be added to the alias for
  685. .I mylist.
  686. The second form is unique to
  687. .I smail.
  688. It allows the
  689. .I aliases
  690. file to include other
  691. .I aliases
  692. files.
  693. .sp
  694. .ce
  695. :include:/usr/lib/ml/more-aliases
  696. .sp
  697. This would include the file
  698. .I /usr/lib/ml/more-aliases
  699. as a regular alias file.
  700. This makes it easier to maintain groups of aliases that
  701. change frequently, such as the list of netnews moderators.
  702. .PP
  703. All aliases are recursive, so care
  704. must be taken in their definition.
  705. .I smail
  706. aliasing attempts to prevent infinite loops, and to
  707. do what was intended by the user.  For example, the alias:
  708. .sp
  709. .ce
  710. mylogin~mypc!mylogin~mylogin
  711. .sp
  712. Expands to
  713. .sp
  714. .ce
  715. mypc!mylogin mylogin
  716. .sp
  717. even though the second occurrence of
  718. .I mylogin
  719. matches the alias name.
  720. .sp
  721. Both forms of file inclusion are recursive, too,
  722. so watch out for nesting include files.  They
  723. may lead to infinite loops.
  724. .PP
  725. While the cost of parsing an alias file is usually negligible,
  726. it's wise to take savings anywhere savings
  727. can be found.  Therefore, it's worth mentioning
  728. .IR smail 's
  729. parsing strategy.
  730. .I smail
  731. will try to get by with doing as little work
  732. as possible when aliasing.  If on a particular
  733. invocation of
  734. .I smail,
  735. none of the recipent addresses are local,
  736. (i.e., not potential aliases)
  737. then the
  738. .I aliases
  739. file won't even be read.  Similarly,
  740. when an
  741. .I aliases
  742. file is read, it does not expand any of the :include: files
  743. until they are referenced.  Thus, in the alias (above) for
  744. .I mylist,
  745. the file
  746. .I :include:/usr/lib/ml/mylist
  747. would not be opened and read (parsed) unless
  748. mail was sent to
  749. .I mylist.
  750. Wise use of :include: files can greatly
  751. increase the efficiency of the alias utility.
  752. It's not clear exactly where the
  753. .I break-even
  754. point is when deciding to use an  :include: file in an alias,
  755. versus having all of the recipents listed on the line;
  756. but if a mailing list is large (whatever that means)
  757. it is wise to use the :include: feature to save on
  758. parsing costs.  Note that this discussion only applies to the
  759. first form of file inclusion, since reading an
  760. .I aliases
  761. file constitutes a reference to :include: files of the second form.
  762. .PP
  763. There is another form of aliasing which works with the alias capability.
  764. This is called
  765. .I per user forwarding.
  766. For a given user name, if there is no alias for the user
  767. then, if the file
  768. .I ~user/.forward
  769. exists, then its contents will be treated as an alias for
  770. the user.  The syntax is the same as that of the
  771. recipient lists in the alias file described above.
  772. .PP
  773. One difference between
  774. .I smail
  775. and
  776. .I sendmail
  777. is that
  778. .I smail
  779. doesn't handle stuff like mail to files
  780. or command execution.
  781. .SH SEE ALSO
  782. smail(8), paths(8), pathproc(8)
  783. .SH VERSION
  784. @(#)aliases.8    2.5 (smail) 9/15/87
  785. //E*O*F aliases.8//
  786.  
  787. echo x - lcasep.8
  788. cat > "lcasep.8" << '//E*O*F lcasep.8//'
  789. .TH LCASEP 8
  790. .tr ~
  791. .SH NAME
  792. lcasep \- convert first field to lower case
  793. .SH SYNOPSIS
  794. .B lcasep
  795. [ -f infile ] [ -o outfile ]
  796. .SH DESCRIPTION
  797. .I Lcasep
  798. converts all upper case characters
  799. in the first field of each input line to lower case
  800. and writes the line to its output.  By default,
  801. .I lcasep
  802. reads from the standard input and writes to the standard output.
  803. Fields are delimited by a tab (ascii~0x9) character.
  804. It is used in preparation for sorting
  805. .IR smail "'s"
  806. .I paths
  807. database.  There is a bug in
  808. .I sort -f
  809. that causes non-alphanumeric keys to be sorted incorrectly.
  810. Conversion before sorting avoids this bug.
  811. .SH SEE ALSO
  812. pathalias - by Peter Honeyman
  813. .br
  814. smail(8), paths(8), pathproc(8)
  815. .SH VERSION
  816. @(#)lcasep.8    2.5 (smail) 9/15/87
  817. //E*O*F lcasep.8//
  818.  
  819. echo x - mkfnames.8
  820. cat > "mkfnames.8" << '//E*O*F mkfnames.8//'
  821. .TH MKFNAMES 8
  822. .tr ~
  823. .SH NAME
  824. mkfnames \- create full name database
  825. .SH SYNOPSIS
  826. .B mkfnames [ file  ...]
  827. .SH DESCRIPTION
  828. .I mkfnames
  829. uses the named
  830. .I files
  831. as input and writes a sorted database suitable for
  832. use as the full name database for
  833. .IR smail (8)
  834. on the standard output.
  835. The format of an input line is defined by
  836. .IR nptx (8).
  837. If no
  838. .I files
  839. are specified, then the password file is
  840. used to parsed and an attempt is made to
  841. munge it into the format needed by
  842. .I nptx.  No guarantees on this, since
  843. there are so many bizarre password file
  844. formats.
  845. .SH SEE ALSO
  846. smail(8), paths(8), nptx(8)
  847. .SH VERSION
  848. @(#)mkfnames.8    2.5 (smail) 9/15/87
  849. //E*O*F mkfnames.8//
  850.  
  851. echo x - nptx.8
  852. cat > "nptx.8" << '//E*O*F nptx.8//'
  853. .TH NPTX 8
  854. .tr ~
  855. .SH NAME
  856. nptx \- full name permutations
  857. .SH SYNOPSIS
  858. .B nptx
  859. .SH DESCRIPTION
  860. .I nptx
  861. reads a list of address name pairs on the standard
  862. input and prints name permutations and the address
  863. pairs on the standard output.
  864. nptx is generally used in generation of a full name
  865. database for
  866. .IR smail (8).
  867. The format of an input line is
  868. .sp
  869. .ce
  870. address    name
  871. .sp
  872. The address field can contain any address, it is terminated by
  873. a TAB char (ascii 0x9).  No translation is done on the field.
  874. The name field consists of whitespace separated names or initials
  875. with an optional nickname given in parentheses, it is terminated
  876. by either a newline ascii (0xA) or a ',' (ascii 0x).  All permutations
  877. of the names and initials are printed.  The only restriction is
  878. that the last name will appear in each permutation.  The permutations
  879. are not necesarily unique.
  880. .SH EXAMPLES
  881. .nf
  882. .in +5
  883. $ echo "gpb@ECH.gatech.edu\tWrecker Burdell(George P.)"|nptx
  884. Burdell    gpb@ECH.gatech.edu
  885. W.Burdell    gpb@ECH.gatech.edu
  886. Wrecker.Burdell    gpb@ECH.gatech.edu
  887. Burdell    gpb@ECH.gatech.edu
  888. G.Burdell    gpb@ECH.gatech.edu
  889. George.Burdell    gpb@ECH.gatech.edu
  890. P.Burdell    gpb@ECH.gatech.edu
  891. P.Burdell    gpb@ECH.gatech.edu
  892. G.P.Burdell    gpb@ECH.gatech.edu
  893. George.P.Burdell    gpb@ECH.gatech.edu
  894. G.P.Burdell    gpb@ECH.gatech.edu
  895. George.P.Burdell    gpb@ECH.gatech.edu
  896. $
  897. .in
  898. .SH SEE ALSO
  899. smail(8), paths(8), mkfnames(8)
  900. .SH VERSION
  901. @(#)nptx.8    2.5 (smail) 9/15/87
  902. //E*O*F nptx.8//
  903.  
  904. echo x - pathproc.8
  905. cat > "pathproc.8" << '//E*O*F pathproc.8//'
  906. .TH PATHPROC 8
  907. .SH NAME
  908. pathproc \- pathalias post\-processor for smail routing database
  909. .SH DESCRIPTION
  910. .I Pathproc
  911. takes lines of the form
  912. .sp
  913. .ce
  914. \fIfirst_hop_cost    key    route\fP
  915. .sp
  916. as produced by
  917. .I pathalias -f
  918. and converts it to the form
  919. .sp
  920. .ce
  921. \fI key    route    cost\fP
  922. .sp
  923. as described in
  924. .IR paths (8).
  925. On the input, the
  926. .I route_cost
  927. is
  928. .IR pathalias "'s"
  929. total cost for the route.
  930. On the output, the
  931. .I cost
  932. is the cost for the
  933. .I first segment
  934. of the route.
  935. This represents the cost, to the local host,
  936. of passing the mail to its neighbor.
  937. .PP
  938. The output is sorted by
  939. .I key
  940. in ascending order.
  941. .SH EXAMPLE
  942. Here's an example of how you might use
  943. .I pathproc:
  944. .sp
  945. .in+3
  946. pathalias -f \fImap_files\fP | pathproc > newpaths
  947. .br
  948. mv newpaths /usr/lib/uucp/paths
  949. .in
  950. .sp
  951. .SH SEE ALSO
  952. pathalias - by Peter Honeyman
  953. .br
  954. smail(8), lcasep(8), paths(8)
  955. .SH VERSION
  956. @(#)pathproc.8    2.5 (smail) 9/15/87
  957. //E*O*F pathproc.8//
  958.  
  959. echo x - paths.8
  960. cat > "paths.8" << '//E*O*F paths.8//'
  961. .TH PATHS 8
  962. .tr ~
  963. .SH NAME
  964. paths \- smail routing database
  965. .SH DESCRIPTION
  966. The
  967. .I paths
  968. file is the routing database for
  969. .IR smail .
  970. Each line of the file provides routing information
  971. to either a host or to a domain.  Each line should
  972. have either two or three tab (ascii~0x9) separated fields.
  973. The format of each line in the paths file is:
  974. .tr ~
  975. .sp
  976. .ce
  977. \fIkey~~route~~~[cost]\fP
  978. .sp
  979. The
  980. .I key
  981. field is the key on which searches are performed.
  982. Typically this is either a UUCP host name or a domain name.
  983. .I smail
  984. uses a binary search algorithm when searching the database,
  985. so the keys must be sorted in ascending order.
  986. Case is ignored when searching, so the keys should be converted
  987. to lower case before sorting (see
  988. .IR lcase (8)
  989. and
  990. .IR pathproc (8)).
  991. .B Warning:
  992. There is a bug in
  993. .I sort -f,
  994. so don't use it.  Convert the keys to lower case, and then sort.
  995. .PP
  996. The
  997. .I route
  998. field is a "printf" string that details the route that mail to the
  999. .I key
  1000. should take.
  1001. See
  1002. .I pathalias
  1003. documentation for details.
  1004. .PP
  1005. The optional
  1006. .I cost
  1007. field is used by
  1008. .I smail
  1009. to determine whether to simply queue outbound
  1010. UUCP mail, or to attempt immediate delivery
  1011. (usually by invoking
  1012. .IR uucico ).
  1013. If the cost field is present, and the value is at or below
  1014. .IR smail "'s"
  1015. .I queueing threshold
  1016. then the mail will be queued and an attempt at immediate delivery
  1017. will be made.  This will speed mail delivery between hosts who
  1018. enjoy a cheap uucp link, like a hardwired line or some other
  1019. low cost transport medium, while allowing mail sent over more
  1020. expensive media to accumulate before transmission.
  1021. If the field is absent, the cost defaults to a value
  1022. above the
  1023. .I queueing threshold.
  1024. The default value for the queueing threshold is equal to the pathalias
  1025. cost DEDICATED+LOW.  Thus, direct links with cost DEDICATED+LOW or less
  1026. will see immediate delivery, while the others are queued for later delivery.
  1027. .SH EXAMPLE
  1028. Here's a sample paths file for a small host, like a pc, that doesn't
  1029. want to maintain complete routing information.  It illustrates
  1030. most of the aspect of the
  1031. .I paths
  1032. file.  Assme that the pc's name is
  1033. .I mypc,
  1034. and that it's in domain
  1035. .I .mydomain.
  1036. Also, assume that it has a dedicated link to
  1037. a smart host named
  1038. .I bighub,
  1039. and that
  1040. .IR bighub 's
  1041. administrator has given
  1042. .I mypc
  1043. .B permission
  1044. to use
  1045. .I bighub
  1046. as a mail relay.
  1047. Lastly, assume that
  1048. .I mypc
  1049. has a dialed on demand link to another computer named
  1050. .I friend.
  1051. .nf
  1052. .sp
  1053. .in +5
  1054. \fIpathalias\fP input
  1055. .sp
  1056.  mypc =    .mypc.mydomain
  1057.  mypc friend(DEMAND), bighub(DEDICATED)
  1058.  smart-host = bighub
  1059. .sp
  1060. \fIpaths\fP file produced by \fIpathalias -f inputfile|pathproc\fP
  1061. .sp
  1062.  .mypc.mydomain    %s    0
  1063.  bighub    bighub!%s    95
  1064.  friend    friend!%s    300
  1065.  mypc    %s    0
  1066.  smart-host    bighub!%s    95
  1067. .in
  1068. .sp
  1069. .fi
  1070. .SH SEE ALSO
  1071. pathalias - by Peter Honeyman
  1072. .br
  1073. smail(8), lcasep(8), pathproc(8)
  1074. .SH VERSION
  1075. @(#)paths.8    2.5 (smail) 9/15/87
  1076. //E*O*F paths.8//
  1077.  
  1078. echo x - smail.8
  1079. cat > "smail.8" << '//E*O*F smail.8//'
  1080. .TH SMAIL 8
  1081. .SH NAME
  1082. smail, rmail \- UUCP mailer with routing
  1083. .SH SYNOPSIS
  1084. .B smail
  1085. [ options ] address ...
  1086. .br
  1087. .B rmail
  1088. [ options ] address ...
  1089. .SH DESCRIPTION
  1090. The
  1091. .I smail/rmail
  1092. program replaces
  1093. .IR /bin/rmail (1)
  1094. to become the UUCP mail transport mechanism.
  1095. They are links to the same executable.
  1096. .I rmail
  1097. receives mail from UUCP,
  1098. .I smail
  1099. introduces mail into UUCP.
  1100. .PP
  1101. .I smail/rmail
  1102. can work with or without
  1103. .IR sendmail (8),
  1104. or another intelligent mail system.
  1105. For hosts with just
  1106. .IR /bin/mail (1),
  1107. .I smail/rmail
  1108. subsumes some of the functions of
  1109. .I sendmail,
  1110. and hands only local mail to
  1111. .I /bin/mail.
  1112. For hosts with
  1113. .I sendmail,
  1114. .I smail/rmail
  1115. can act as UUCP front and back ends to
  1116. .I sendmail,
  1117. allowing
  1118. .I sendmail
  1119. to process all mail through the host.
  1120. As distributed, 'bang' mail that is not bound for a local
  1121. recipient will be passed directly to
  1122. .I uux
  1123. without calling
  1124. .I sendmail.
  1125. .PP
  1126. To varying degrees,
  1127. .I smail/rmail
  1128. automatically routes the addresses it processes.
  1129. .I smail/rmail
  1130. most often routes domain style addresses (i.e. user@domain), producing
  1131. a UUCP path (i.e. host!address) or a local address (i.e. user), but it can
  1132. also reroute explicit UUCP paths.
  1133. .SH OPTIONS
  1134. .TP
  1135. .B \-A
  1136. Print the resolved addresses.  Don't collect a message or invoke a mailer.
  1137. .TP
  1138. .B \-d
  1139. Be verbose and don't invoke other mailers.
  1140. .TP
  1141. .B \-v
  1142. Be verbose, but still invoke other mailers.
  1143. .TP
  1144. .BI \-h " hostname"
  1145. Set hostname.  The default is configuration dependent, but usually provided
  1146. by a system call such as
  1147. .IR gethostname (2)
  1148. or
  1149. .IR uname (2).
  1150. .TP
  1151. .BI \-H " hostdomain"
  1152. set hostdomain.  The default is configuration dependent.
  1153. .TP
  1154. .BI \-F " address"
  1155. use
  1156. .I address
  1157. on the From: line in locally generated mail.
  1158. .TP
  1159. .BI \-p " pathfile"
  1160. Set path database file name if not /usr/lib/uucp/paths.
  1161. .TP
  1162. .BI \-a " aliasfile"
  1163. For sites without sendmail, set alias database file name if not in
  1164. the place defined at compile time (see ALIASES in defs.h).
  1165. This is usually
  1166. .I /usr/lib/aliases
  1167. .TP
  1168. .BI \-n " namelist"
  1169. .I smail
  1170. supports another type of aliasing intended for full name resolution
  1171. using a sorted file,
  1172. .I namelist,
  1173. of name/address pairs.
  1174. This allows mail to George.P.Burdell@gatech.edu to be delivered
  1175. appropriately.  These aliases are by their nature very simple
  1176. since they are not composed of long lists of recipients for each alias.
  1177. They are also numerous, since mail to George.P.Burdell may be addressed
  1178. to Burdell, G.Burdell, George.Burdell, P.Burdell, G.P.Burdell, or
  1179. George.P.Burdell.  This simpler form of aliasing uses the same
  1180. fast searching algorithm that is used for the paths file, so
  1181. it keeps resolution time manageable.
  1182. .TP
  1183. .BI \-q " number"
  1184. Take
  1185. .I number
  1186. as the queueing threshold.
  1187. When routing mail (
  1188. .I -r, -R,
  1189. or domain addressed mail
  1190. ) to a given host, if the cost listed in the
  1191. .I paths
  1192. file is less than the queueing threshold, then the mail
  1193. will be sent immediately.  This overrides the default threshold
  1194. (see QUEUECOST in defs.h) of DEDICATED+LOW.
  1195. .TP
  1196. .BI \-m " number"
  1197. At most 
  1198. .I number
  1199. jobs will be handed to uux for immediate delivery
  1200. by a single invocation of
  1201. .I smail
  1202. (see MAXNOQUEUE in defs.h).
  1203. .TP
  1204. .BI \-u " uuxflags"
  1205. Use
  1206. .I uuxflags
  1207. as the flags passed to uux for remote mail.
  1208. This overrides any of the default values and other queueing strategies.
  1209. .TP
  1210. .B -c
  1211. Consult the paths file for the cost of the path even when not routing
  1212. the mail.  This makes it possible to use the cost information when
  1213. sending pure UUCP path mail without rerouting it.
  1214. .TP
  1215. .B \-r
  1216. Route the first component of a UUCP path (host!address) in addition to routing
  1217. domain addresses (user@domain).
  1218. .TP
  1219. .B \-R
  1220. Reroute UUCP paths, trying successively larger righthand substrings
  1221. of a path until a component is recognized.
  1222. .TP
  1223. .B \-l
  1224. Instead of routing a domain address, send it to the local mailer for
  1225. processing.  Normally, only local addresses go to the local mailer.
  1226. .TP
  1227. .B \-L
  1228. Send all addresses to the local mailer for processing, including UUCP paths.
  1229. .PP
  1230. Most of the flags are also compile time options, since
  1231. .I uux
  1232. does not normally invoke
  1233. .I rmail
  1234. with the desired flags.
  1235. .I smail
  1236. resets any preset
  1237. .B -l
  1238. or
  1239. .B -L
  1240. flags.
  1241. .B -l
  1242. flag causes 
  1243. .B rmail
  1244. to send all domain addresses through the local mailer,
  1245. to process addresses for non UUCP domains.
  1246. The
  1247. .B -L
  1248. flag causes
  1249. .B rmail
  1250. to send even explicit UUCP paths through the local mailer,
  1251. presumably to make use of other transport mechanisms.
  1252. In both cases, rmail defers any routing until smail gets hold it.
  1253. .SH ADDRESSES
  1254. .I smail/rmail
  1255. understands "user@domain" to be a domain address, "host!address" to be a
  1256. UUCP path, and anything else to be a local address.
  1257. .PP
  1258. Because hostile
  1259. .I rmail's
  1260. unpredictably interpret mixed UUCP/domain addresses,
  1261. .I smail/rmail
  1262. understands "domain!user" to be a domain address, and generates
  1263. "path!domain!user" when mailing to a cognate
  1264. .I smail/rmail
  1265. host.
  1266. To distinguish domain "domain!user" from UUCP "host!address", "domain"
  1267. contains at least one (1) period.
  1268. Unlike the old
  1269. .I /bin/rmail,
  1270. .I smail/rmail
  1271. gives precedence to @ over ! when parsing mixed addresses,
  1272. thus a!b@c is parsed as (a!b)@c, rather than a!(b@c).
  1273. .SH ROUTING
  1274. Because
  1275. .I smail/rmail
  1276. is the UUCP transport mechanism, it can only effect delivery on UUCP paths 
  1277. and local addresses; domain addresses require resolution into UUCP paths or
  1278. local addresses.  
  1279. To resolve a domain address,
  1280. .I smail/rmail
  1281. finds a route to the most specific part of the domain specification listed
  1282. in the routing table.
  1283. Two degrees of resolution can occur:
  1284. .RS
  1285. .PP
  1286. Full resolution:
  1287. .I smail/rmail
  1288. finds a route for the entire domain specification, and tacks the user
  1289. specification onto the end of the UUCP path.
  1290. The address can also fully resolve to a local address (the UUCP path is null).
  1291. .PP
  1292. Partial resolution:
  1293. .I smail/rmail
  1294. finds a route for only righthand part of the domain specification, so it 
  1295. tacks the complete address (in the form domain!user) onto the end of the 
  1296. UUCP path.
  1297. Since this syntax is not widely understood, UUCP gateways listed in
  1298. the path database must install new UUCP software, either
  1299. .I smail/rmail
  1300. or new
  1301. .I sendmail
  1302. configuration files (or both).
  1303. .RE
  1304. .PP
  1305. It is an error if a partially resolved address routes to the local host 
  1306. (a null UUCP path), since according to the routing table, the local
  1307. host is responsible for resolving the address more fully.
  1308. .PP
  1309. The
  1310. .B -r
  1311. flag causes
  1312. .I smail/rmail
  1313. to attempt to route the first component of a UUCP path, probably so it
  1314. can impress people with how many UUCP hosts it knows.
  1315. If this fails, it passes the unrouted address to
  1316. .I uux,
  1317. in case the path database is not complete.
  1318. The 
  1319. .B -R
  1320. flag causes
  1321. .I smail/rmail
  1322. to take a UUCP path and route the rightmost component of the path (save
  1323. the user name) possible.
  1324. This is mostly for hosts that have very up-to-date routing tables.
  1325. .PP
  1326. If a route cannot be discerned from the available routing database,
  1327. then one more attempt to route the mail is made by searching for an
  1328. entry in the database for a route to a
  1329. .I smart-host.
  1330. If this entry exists, then the mail will be forwarded along that route
  1331. to be delivered.  This allows a host to depend on another, presumably
  1332. better informed, host for delivering its mail.
  1333. This kind of arrangement should be worked out,
  1334. .I in advance,
  1335. with the
  1336. .IR smart-host 's
  1337. administrator.
  1338. .PP
  1339. After
  1340. .I smail/rmail
  1341. resolves an address, it reparses it to see if it is now a UUCP path or
  1342. local address.  If the new address turns out to be another
  1343. domain address, smail complains because we don't like to resolve more than once.
  1344. This error occurs when an address partially resolves the local host.
  1345. .PP
  1346. By default,
  1347. .I smail
  1348. will not alter the explicit bang path routing of any mail message.
  1349. If the stated path is unuseable, (i.e., the next hop host is unknown)
  1350. then smail will apply ALWAYS routing, and attempt to deliver the mail
  1351. to the potentially new address.  If this fails too, then REROUTE routing
  1352. will be applied to the address, and another attempt to deliver is made.
  1353. Lastly, an attempt to find a path to a better informed host
  1354. .I smart-host
  1355. will be made and the mail passed to that host.
  1356. .SH FROMMING
  1357. .I smail/rmail
  1358. collapses From_ and >From_ lines to generate a simple from argument, which
  1359. it can pass to
  1360. .I sendmail
  1361. or use to create its own "From" line.
  1362. The rule for fromming is: concatenate each "remote from" host (separating 
  1363. them by !'s), and tack on the address on the last From_ line; if that address 
  1364. is in user@domain format, rewrite it as domain!user; ignore host or
  1365. domain if either is simply the local hostname.  It also removes redundant
  1366. information from the From_ line.  For instance:
  1367. .sp
  1368. .ce
  1369.  ...!myhost!myhost.mydomain!...
  1370. .sp
  1371. becomes
  1372. .sp
  1373. .ce
  1374.  ...!myhost!...
  1375. .sp
  1376. Leading occurrences of the local host name are elided as well.
  1377. .PP
  1378. .I smail/rmail
  1379. generates it own From_ line, unless it is feeding
  1380. .I sendmail,
  1381. which is happy with the
  1382. .BI -f from
  1383. argument.
  1384. For UUCP bound mail,
  1385. .I smail/rmail
  1386. generates a "remote from hostname", where hostname is the UUCP hostname
  1387. (not the domain name), so that From_ can indicate a valid UUCP path, leaving
  1388. the sender's domain address in From:.
  1389. .SH HEADERS
  1390. Certain headers, To:, From:, Date, etc., are required by RFC822.
  1391. If these headers are absent in locally generated mail, they will
  1392. be inserted by smail.  Also, a line of trace information, called
  1393. a Received: line, will be inserted at the top of each message.
  1394. .SH UNDELIVERABLE MAIL"
  1395. Although nobody likes to have a mail message fail to reach its
  1396. intended destination, it somtimes happens that way.
  1397. Mail that is found to be undeliverable
  1398. (i.e., unknown user or unknown host)
  1399. will be returned to the sender.
  1400. .SH FILES
  1401. /usr/lib/uucp/paths        ascii path database
  1402. .br
  1403. /usr/lib/aliases        ascii alias database
  1404. .br
  1405. /usr/spool/uucp/mail.log        log of mail
  1406. .br
  1407. /tmp/mail.log            record of mail
  1408. .SH SUPPORT
  1409. Enhancements, enhancement requests, trouble reports, etc.,
  1410. should be sent to
  1411. .sp
  1412. .ce
  1413. uucp-problem@Stargate.COM.
  1414. .sp
  1415. .SH "SEE ALSO"
  1416. .IR uux (1),
  1417. .IR paths (8),
  1418. .IR aliases (8)
  1419. .br
  1420. .IR sendmail (8)
  1421. .br
  1422. .IR binmail (1)
  1423. on BSD systems only
  1424. .br
  1425. .IR mail (1)
  1426. on System V systems
  1427. .SH VERSION
  1428. @(#)smail.8    2.5 (smail) 9/15/87
  1429. //E*O*F smail.8//
  1430.  
  1431. exit 0
  1432.