home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume3 / gatech / part01 < prev    next >
Encoding:
Internet Message Format  |  1986-11-30  |  24.6 KB

  1. From: Gene Spafford <genrad!linus!gatech!spaf>
  2. Subject: GaTech Sendmail (Part 1 of 3)
  3. Newsgroups: mod.sources
  4. Approved: jpn@panda.UUCP
  5.  
  6. Mod.sources:  Volume 3, Issue 23
  7. Submitted by: Gene Spafford <ihnp4!gatech!spaf>
  8.  
  9.  
  10. #! /bin/sh
  11.  
  12. # Make a new directory for these sources, cd to it, and run kits 1 thru 3 
  13. # through sh.  When all 3 kits have been run, read README.
  14.  
  15. echo "This is GaTech Sendmail kit 1 (of 3).  If kit 1 is complete, the line"
  16. echo '"'"End of kit 1 (of 3)"'" will echo at the end.'
  17. echo ""
  18. export PATH || (echo "You didn't use sh, you clunch." ; kill $$)
  19. echo Extracting PATCHES
  20. cat >PATCHES <<'!STUFFY!FUNK!'
  21. From: topaz!hedrick  17 Sept 1985
  22.  
  23. Here are some patches to SENDMAIL.
  24.   1) They allow us to handle an Arpanet host table containing names
  25.     like topaz.rutgers.edu.  The original version of sendmail,
  26.     as well as sendmail.cf, assumed that all host names end in
  27.     .arpa.  Changes may also be needed in UUCP and net news
  28.     if your site name does not end in .ARPA.
  29.   2) They allow you to translate all host names to their 
  30.     canonical forms, i.e. replace nicknames with the primary
  31.     name.  This is now considered the correct thing to do on
  32.     the Arpanet.  This adds an operator, $%, for doing the
  33.     mapping. WARNING: $% uses a single fixed location for
  34.     the translated address.  Thus only one translated address
  35.     may be active at a time.  This is fine for foo@bar,
  36.     but you could not normalize all of the host names in an
  37.     address like @foo,@bar:bar@gorp.  In practice I don't
  38.     believe this is a problem.
  39.   3) They allow you to make processing depend upon whether mail
  40.     arrived via UUCP or TCP.  In addition to the patches here,
  41.     you will need to modify rmail, or whatever program calls
  42.     sendmail to delivery UUCP mail.  It should call sendmail
  43.     with an extra argument, -pUUCP.  This adds an operator,
  44.     $&, for evaluating macros at runtime instead of when
  45.     sendmail.cf is loaded.  It adds an option to sendmail,
  46.     -p, to specify the protocol name.  It implements $r,
  47.     which is documented in the source but never actually
  48.     implemented.  It is the name of the protocol via which
  49.     mail arrived.  $r is set from the -p option, or by the
  50.     SMTP daemon code, which automatically sets it to the
  51.     value TCP.  The code for reading and writing queue files
  52.     saves the protocol in a line beginning with O.  In case
  53.     a message gets queued, this allows us to remember which
  54.     way it arrived.
  55.  
  56. Originally, SENDMAIL would tack .ARPA onto your host name.  This is
  57. a bad idea, since not all host names end in .ARPA.  The assumption
  58. was that your rc file said
  59.    hostname foo
  60. and this would turn it into foo.arpa.  We now do
  61.    hostname foo.rutgers.edu
  62. and do not want .ARPA tacked on the end.
  63.  
  64. *** daemon.c.ORIG    Fri Feb 10 06:59:21 1984
  65. --- daemon.c    Sat Aug  3 07:49:46 1985
  66. ***************
  67. *** 183,189
  68.               /* determine host name */
  69.               hp = gethostbyaddr(&otherend.sin_addr, sizeof otherend.sin_addr, AF_INET);
  70.               if (hp != NULL)
  71. !                 (void) sprintf(buf, "%s.ARPA", hp->h_name);
  72.               else
  73.                   /* this should produce a dotted quad */
  74.                   (void) sprintf(buf, "%lx", otherend.sin_addr.s_addr);
  75.  
  76. --- 185,191 -----
  77.               /* determine host name */
  78.               hp = gethostbyaddr(&otherend.sin_addr, sizeof otherend.sin_addr, AF_INET);
  79.               if (hp != NULL)
  80. !                 (void) sprintf(buf, "%s", hp->h_name);
  81.               else
  82.                   /* this should produce a dotted quad */
  83.                   (void) sprintf(buf, "%lx", otherend.sin_addr.s_addr);
  84. ***************
  85.  
  86. The following patches add two operators: $% and $&.  $% is used to
  87. map host names into their canonical forms.  Suppose a user sends mail
  88. to RED.  This should be turned into the official name, RED.RUTGERS.EDU,
  89. in the headers.  The fact that Unix does not do that causes problems
  90. to a number of mailers.  It is a violation of the standards.  $%n
  91. behaves like $n, i.e. it is replaced with the nth thing on the left
  92. hand side.  However before doing the replacement, the thing is looked
  93. up in /etc/hosts.  If it is a host name or nickname, the official
  94. form of the host name is used instead.
  95.  
  96. $& is part of a change to allow us to differentiate between UUCP and
  97. TCP mail.  What does foo!bar@baz mean?  If the mail arrived via UUCP,
  98. it is probably foo!<bar@baz>.  If it arrived via TCP, it is by
  99. definition <foo!bar>@baz.  As we are a UUCP/TCP gateway, it is
  100. important for us to get these things right.  In order to do so, we
  101. have done two things:
  102.   - implemented $r.  This is documented as being the name of the
  103.     protocol via which the message arrived.  However this was
  104.     not implemented.  I implement it as follows:
  105.       - rmail calls sendmail with an option -pUUCP
  106.       - the sendmail daemon code sets TCP automatically
  107.       - everything else should be local mail, and does
  108.         not set any value in this macro.
  109.       - when a queue entry is written, the protocol name
  110.         must be written out
  111.   - implemented a new operator $& to allow us to use the
  112.     value of $r in productions.  You can't just use $r
  113.     on the right side of a production.  It will be
  114.     evaluated when the freeze file is made.  So $&r
  115.     is equivalent to $r, but is evaluated when the
  116.     rule is executed.  This allows us to write rules
  117.     that differentiate.  Here is the part of sendmail.cf
  118.     that uses it.  It checks for foo!bar, but only if
  119.     the message arrived via UUCP.  Note the use of $&r
  120.     to put the protocol name into the address, so we can
  121.     match on it.
  122.  
  123. R$-!$*            $:<$&r>$1!$2            check arriving protocol
  124. R$-^$*            $:<$&r>$1^$2            both syntaxes
  125. R<UUCP>$-!$*        $@$>7$2<@$1.UUCP>        if via UUCP, resolve
  126. R<UUCP>$-^$*        $@$>7$2<@$1.UUCP>        if via UUCP, resolve
  127. R<$*>$*            $2                undo kludge
  128.  
  129. *** main.c.ORIG    Fri Feb 10 11:17:52 1984
  130. --- main.c    Mon Aug 26 04:10:51 1985
  131. ***************
  132. *** 320,325
  133.               OpMode = MD_INITALIAS;
  134.               break;
  135.   # endif DBM
  136.           }
  137.       }
  138.   
  139.  
  140. --- 320,328 -----
  141.               OpMode = MD_INITALIAS;
  142.               break;
  143.   # endif DBM
  144. +           case 'p':    /* set protocol used to receive */
  145. +             define('r', &p[2], CurEnv);
  146. +             break;
  147.           }
  148.       }
  149.   
  150. ***************
  151. *** 538,543
  152.           /* at this point we are in a child: reset state */
  153.           OpMode = MD_SMTP;
  154.           (void) newenvelope(CurEnv);
  155.           openxscript(CurEnv);
  156.   #endif DAEMON
  157.       }
  158.  
  159. --- 541,547 -----
  160.           /* at this point we are in a child: reset state */
  161.           OpMode = MD_SMTP;
  162.           (void) newenvelope(CurEnv);
  163. +         define('r',"TCP",CurEnv);
  164.           openxscript(CurEnv);
  165.   #endif DAEMON
  166.       }
  167. ***************
  168. *** 701,706
  169.   
  170.       /* and finally the conditional operations */
  171.       '?', CONDIF,    '|', CONDELSE,    '.', CONDFI,
  172.   
  173.       '\0'
  174.   };
  175.  
  176. --- 705,716 -----
  177.   
  178.       /* and finally the conditional operations */
  179.       '?', CONDIF,    '|', CONDELSE,    '.', CONDFI,
  180. +     /* now the normalization operator */
  181. +     '%', NORMREPL,
  182. +     /* and run-time macro expansion */
  183. +     '&', MACVALUE,
  184.   
  185.       '\0'
  186.   };
  187. *** parseaddr.c.ORIG    Fri Feb 10 06:59:12 1984
  188. --- parseaddr.c    Mon Aug 26 04:44:15 1985
  189. ***************
  190. *** 394,400
  191.           expand("$o", buf, &buf[sizeof buf - 1], CurEnv);
  192.           (void) strcat(buf, DELIMCHARS);
  193.       }
  194. !     if (c == MATCHCLASS || c == MATCHREPL || c == MATCHNCLASS)
  195.           return (ONE);
  196.       if (c == '"')
  197.           return (QST);
  198.  
  199. --- 394,401 -----
  200.           expand("$o", buf, &buf[sizeof buf - 1], CurEnv);
  201.           (void) strcat(buf, DELIMCHARS);
  202.       }
  203. !     if (c == MATCHCLASS || c == MATCHREPL || c == MATCHNCLASS ||
  204. !         c == MACVALUE || c == NORMREPL )
  205.           return (ONE);
  206.       if (c == '"')
  207.           return (QST);
  208. ***************
  209. *** 446,451
  210.   
  211.   # define MAXMATCH    9    /* max params per rewrite */
  212.   
  213.   
  214.   rewrite(pvp, ruleset)
  215.       char **pvp;
  216.  
  217. --- 447,453 -----
  218.   
  219.   # define MAXMATCH    9    /* max params per rewrite */
  220.   
  221. + char hostbuf[512];
  222.   
  223.   
  224.   rewrite(pvp, ruleset)
  225. ***************
  226. *** 447,452
  227.   # define MAXMATCH    9    /* max params per rewrite */
  228.   
  229.   
  230.   rewrite(pvp, ruleset)
  231.       char **pvp;
  232.       int ruleset;
  233.  
  234. --- 449,455 -----
  235.   
  236.   char hostbuf[512];
  237.   
  238.   rewrite(pvp, ruleset)
  239.       char **pvp;
  240.       int ruleset;
  241. ***************
  242. *** 626,631
  243.           /* substitute */
  244.           for (avp = npvp; *rvp != NULL; rvp++)
  245.           {
  246.               register struct match *m;
  247.               register char **pp;
  248.   
  249.  
  250. --- 629,635 -----
  251.           /* substitute */
  252.           for (avp = npvp; *rvp != NULL; rvp++)
  253.           {
  254. + #include <netdb.h>
  255.               register struct match *m;
  256.               register char **pp;
  257.               char **oldavp,**tavp;
  258. ***************
  259. *** 628,633
  260.           {
  261.               register struct match *m;
  262.               register char **pp;
  263.   
  264.               rp = *rvp;
  265.               if (*rp != MATCHREPL)
  266.  
  267. --- 632,640 -----
  268.   #include <netdb.h>
  269.               register struct match *m;
  270.               register char **pp;
  271. +             char **oldavp,**tavp;
  272. +             struct hostent *hostpt;
  273. +             extern char *macvalue();
  274.   
  275.               rp = *rvp;
  276.               if ((*rp != MATCHREPL) && (*rp != NORMREPL))
  277. ***************
  278. *** 630,636
  279.               register char **pp;
  280.   
  281.               rp = *rvp;
  282. !             if (*rp != MATCHREPL)
  283.               {
  284.                   if (avp >= &npvp[MAXATOM])
  285.                   {
  286.  
  287. --- 637,643 -----
  288.               extern char *macvalue();
  289.   
  290.               rp = *rvp;
  291. !             if ((*rp != MATCHREPL) && (*rp != NORMREPL))
  292.               {
  293.                   if (avp >= &npvp[MAXATOM])
  294.                   {
  295. ***************
  296. *** 637,643
  297.                       syserr("rewrite: expansion too long");
  298.                       return;
  299.                   }
  300. !                 *avp++ = rp;
  301.                   continue;
  302.               }
  303.   
  304.  
  305. --- 644,655 -----
  306.                       syserr("rewrite: expansion too long");
  307.                       return;
  308.                   }
  309. !                 if (*rp == MACVALUE) {
  310. !                   if (macvalue(rp[1],CurEnv))
  311. !                     *avp++ = macvalue(rp[1],CurEnv);
  312. ! }
  313. !                 else
  314. !                   *avp++ = rp;
  315.                   continue;
  316.               }
  317.   
  318. ***************
  319. *** 642,647
  320.               }
  321.   
  322.               /* substitute from LHS */
  323.               m = &mlist[rp[1] - '1'];
  324.   # ifdef DEBUG
  325.               if (tTd(21, 15))
  326.  
  327. --- 654,660 -----
  328.               }
  329.   
  330.               /* substitute from LHS */
  331.               m = &mlist[rp[1] - '1'];
  332.   # ifdef DEBUG
  333.               if (tTd(21, 15))
  334. ***************
  335. *** 658,663
  336.               }
  337.   # endif DEBUG
  338.               pp = m->first;
  339.               while (pp <= m->last)
  340.               {
  341.                   if (avp >= &npvp[MAXATOM])
  342.  
  343. --- 671,677 -----
  344.               }
  345.   # endif DEBUG
  346.               pp = m->first;
  347. +             oldavp = avp;
  348.               while (pp <= m->last)
  349.               {
  350.                   if (avp >= &npvp[MAXATOM])
  351. ***************
  352. *** 666,671
  353.                       return;
  354.                   }
  355.                   *avp++ = *pp++;
  356.               }
  357.           }
  358.           *avp++ = NULL;
  359.  
  360. --- 680,695 -----
  361.                       return;
  362.                   }
  363.                   *avp++ = *pp++;
  364. +             }
  365. +             if (*rp == NORMREPL) {
  366. +               hostbuf[0] = '\0';
  367. +               for (tavp = oldavp; tavp < avp; tavp++)
  368. +                 strcat(hostbuf,*tavp);
  369. +               hostpt = gethostbyname(hostbuf);
  370. +               if (hostpt) {
  371. +                 *oldavp = hostpt -> h_name;
  372. +                 avp = oldavp + 1;
  373. +               }
  374.               }
  375.           }
  376.           *avp++ = NULL;
  377. *** queue.c.ORIG    Fri Feb 10 06:59:20 1984
  378. --- queue.c    Mon Aug 26 04:45:19 1985
  379. ***************
  380. *** 105,110
  381.       /* output creation time */
  382.       fprintf(tfp, "T%ld\n", e->e_ctime);
  383.   
  384.       /* output name of data file */
  385.       fprintf(tfp, "D%s\n", e->e_df);
  386.   
  387.  
  388. --- 105,115 -----
  389.       /* output creation time */
  390.       fprintf(tfp, "T%ld\n", e->e_ctime);
  391.   
  392. +     /* output protocol */
  393. +     if (macvalue('r',e)) {
  394. +       fprintf(tfp, "O%s\n", macvalue('r',e));
  395. + }
  396.       /* output name of data file */
  397.       fprintf(tfp, "D%s\n", e->e_df);
  398.   
  399. ***************
  400. *** 565,571
  401.       /*
  402.       **  Open the file created by queueup.
  403.       */
  404.       p = queuename(e, 'q');
  405.       f = fopen(p, "r");
  406.       if (f == NULL)
  407.  
  408. --- 570,576 -----
  409.       /*
  410.       **  Open the file created by queueup.
  411.       */
  412. !        
  413.       p = queuename(e, 'q');
  414.       f = fopen(p, "r");
  415.       if (f == NULL)
  416. ***************
  417. *** 575,580
  418.       }
  419.       FileName = p;
  420.       LineNumber = 0;
  421.   
  422.       /*
  423.       **  Read and process the file.
  424.  
  425. --- 580,586 -----
  426.       }
  427.       FileName = p;
  428.       LineNumber = 0;
  429. +     define('r',NULL,e);
  430.   
  431.       /*
  432.       **  Read and process the file.
  433. ***************
  434. *** 595,600
  435.                   (void) chompheader(&buf[1], FALSE);
  436.               break;
  437.   
  438.             case 'M':        /* message */
  439.               e->e_message = newstr(&buf[1]);
  440.               break;
  441.  
  442. --- 601,610 -----
  443.                   (void) chompheader(&buf[1], FALSE);
  444.               break;
  445.   
  446. +           case 'O':
  447. +             define('r',newstr(&buf[1]),e);
  448. +             break;
  449.             case 'M':        /* message */
  450.               e->e_message = newstr(&buf[1]);
  451.               break;
  452. ***************
  453. *** 628,634
  454.               break;
  455.           }
  456.       }
  457.       FileName = NULL;
  458.   }
  459.    /*
  460.  
  461. --- 638,643 -----
  462.               break;
  463.           }
  464.       }
  465.       FileName = NULL;
  466.   }
  467.    /*
  468. *** sendmail.h.ORIG    Fri Feb 10 06:59:10 1984
  469. --- sendmail.h    Sat Aug  3 05:06:53 1985
  470. ***************
  471. *** 290,295
  472.   # define CONDIF        '\031'    /* conditional if-then */
  473.   # define CONDELSE    '\032'    /* conditional else */
  474.   # define CONDFI        '\033'    /* conditional fi */
  475.    /*
  476.   **  Symbol table definitions
  477.   */
  478.  
  479. --- 290,300 -----
  480.   # define CONDIF        '\031'    /* conditional if-then */
  481.   # define CONDELSE    '\032'    /* conditional else */
  482.   # define CONDFI        '\033'    /* conditional fi */
  483. + /* normalize Internet address operator */
  484. + # define NORMREPL       '\034'  /* normalized host replacement */
  485. + # define MACVALUE    '\035'    /* run-time macro value */
  486.    /*
  487.   **  Symbol table definitions
  488.   */
  489.  
  490.  
  491. !STUFFY!FUNK!
  492. echo Extracting README
  493. cat >README <<'!STUFFY!FUNK!'
  494. The files in this package build the sendmail.cf files for machines at
  495. Georgia Tech.  They are derived from the standard BSD 4.2 sendmail
  496. files, and form a set of sendmail files we received along with PMDF
  497. from the folks at CSNet.  The CSNet set of files were put together by
  498. Ray Essick (essick@uiucdcs) and were a great help in putting this
  499. package together.  Many of the individual rules were derived from
  500. various sources posted to the Usenet net.mail and net.sources
  501. newsgroups.  Credit is also due Rick Adams at seismo.css.gov for his
  502. continued comments and help in debugging some of headers, and to
  503. Stuart Stirling at emory.CSNET for help with some of the initial
  504. debugging.
  505.  
  506. Contained in this package are the following:
  507. 1) MANIFEST which lists each file in the package, along with a
  508.    one line description of what it does;
  509. 2) KEY which describes macros used in the sendmail files;
  510. 3) source and Makefiles for building our various sendmail.cf files;
  511. 4) overview.ms, a paper describing how mail gets routed when
  512.    mailed to or through gatech (nroff -ms overview.ms | more);
  513. 5) uumail.c, the source to our rerouting mailer ("pathalias", which
  514.    is used to build the mailer database, has been posted multiple times
  515.    to the net and is not included).  See the comments at the beginning
  516.    of the program before your try to install it;
  517. 6) PATCHES, which is a set of changes to the sendmail code, developed
  518.    at Rutgers, and needed to be implemented to make these
  519.    sendmail rules work optimally.  Make sure to read about the corresponding
  520.    change to "rmail" described in the comments.
  521. 7) Files, which is a brief list of the data files which are present to
  522.    drive the sendmail on "gatech".
  523.  
  524. The remainder of this file is an overview of the environment in which
  525. these files were developed and are used.
  526.  
  527. The machines using "sendmail" at Georgia Tech fall into 3 basic
  528. categories: gateway ("gatech"), department machines on a common
  529. ethernet ("stratus", "nimbus", et.al.), and campus machines not on the
  530. same Ethernet as "gatech" (only "gt-cmmsr" so far).  We have at least
  531. one Ethernet loop on campus which is separate from the ICS loop
  532. ("gtss", "gtqo", et. al.).
  533.  
  534. "gatech" is intended to be the campus gateway machine.  It is on the
  535. ICS common ethernet, has over 50 major uucp contacts known to the
  536. outside world, has a CSNet connection, a number of direct asynchronous
  537. links, and a set of rotored phone lines.  Sometime in the
  538. not-too-distant future, it is possible that "gatech" will also be on
  539. the Arpanet and/or Bitnet. It is also the "traditional" mail address
  540. known to most outsiders.  Thus, the machine is on 3 distinct networks,
  541. and has to be configured with the possibility of connecting to at least
  542. 1 other major international network in the near future.
  543.  
  544. The department machines currently are comprised of the Clouds research
  545. machines "gt-stratus", "gt-cirrus", and "gt-nimbus", and the ICS/OCS
  546. Pyramid "gitpyr".  They are connected via a common ethernet link, and
  547. they all can speak TCP at each other.  Other machines are expected to
  548. be added to this group before long.  Almost all of these machines have
  549. a single phone line and/or direct links for uucp to machines that can't
  550. speak TCP.  (We are trying to keep a consistant naming scheme in use,
  551. and thus all campus machines will henceforth be named with the prefix
  552. "gt-" in the name.  There are a few machines around which had
  553. established UUCP networks connections with different names before the
  554. decision to use this standard came into being, and their names will
  555. probably not change (e.g., "gitpyr").)
  556.  
  557.  
  558. The third class of machine on campus runs sendmail but has no TCP
  559. connection to the others because our Net/One bridge won't pass TCP
  560. packets across the backbone.  These sites use a phone line or Net/One
  561. virtual circuit to connect to "gatech" and some of the other systems.
  562. Some of these machines may talk to each other via Ethernet, but
  563. there is no common connection amongst all of them.
  564.  
  565. The basic idea in our configuration is for users to be able to use
  566. addresses of the forms:
  567.         site!user, site!site2!user, user@site.UUCP
  568.         user@site.CSNET, user@site.ARPA, user@site.MAILNET,
  569.         user@site.BITNET user@site.DEC
  570. and the local case:     user@site.GTNET, site:user, user%site
  571. We'd also like to be able to use just "user@site" and let the mailer
  572. figure it out.  Here's how my sendmail files accomplish that:
  573.  
  574. All of the internal machines are simple: they merely canonicalize the
  575. address according to standard rule, look to see if it is a GTNET host
  576. that they know and send the letter straight to that host. Local letters
  577. are handled appropriately. Any other address which looks like a network
  578. address is sent to the relay site, "gatech", except that each machine
  579. can have a small number of direct UUCP connections to outside
  580. machines.  Ruleset zero for these systems check for these UUCP
  581. connections.  Note that we use a file (/usr/lib/mail/uucp.local) to
  582. hold the UUCP connection list so that we don't have to play around with
  583. the actual sendmail configuration if we change contacts.  The only
  584. thing one has to do to update the list of UUCP connections available on
  585. that host is update the file. If you run with a frozen sendmail.cf, you
  586. also have to type "/usr/lib/sendmail -bz".
  587.  
  588. The "gatech" machine is the complex one.  Any address that the internal
  589. machines are unable to handle gets bounced to this machine. The
  590. "gatech" machine speaks to a plethora of people. "gatech" should be
  591. able to recognize and route any (valid) address.  The "gatech" machine
  592. compares UUCP addresses against a file similarl to the way the other
  593. machines handle them.  Mail to the CSNET domain is sent to the PMDF
  594. mailer, which queues the letter for phone transmission to the
  595. CSnet-relay host.  Mail to the ARPA domain, since we have no direct
  596. ARPA connection (yet), is handed to the PMDF mailer for transmission to the
  597. CSnet-relay, which is an ARPA host.  Mail to the BITNET (IBM
  598. derivative) and MAILNET (through MIT-multics) machines are routed to
  599. the host defined by the $B and $M macros.  Mail to the DEC E-net is
  600. routed to the site listed in the $E macro, currently "decwrl.arpa".
  601. Mail to the OZ network (Australia) is routed to munnari.uucp ($Z).
  602. Since we do not have connections to any of those networks, we instead
  603. append the address of a known gateway to the address forming something
  604. like: user@host.mailnet@mit-multics.arpa and then re-iterate through
  605. ruleset 0 to get from our machine to the gateway.
  606.  
  607. Any address without a domain gets converted into an address of the form
  608. "user@site", and it makes an attempt to intuit the domain. This is done
  609. by checking (in order) the list of local sites, local uucp contacts (1
  610. hop), CSNET, ARPA, BITNET, UUCP, and DEC E-net sites. In the event of a
  611. match, the proper domain name is appended to the address and we
  612. re-iterate through ruleset zero.  This catches a fair number of missing
  613. domain problems and hasn't caused too much confusion about names in use
  614. in several domains.
  615.  
  616. Finally, the "gatech" machine takes any left-over non-local names and
  617. returns them to the sender with a message about the fact that there is
  618. an unknown host/domain name in his letter.
  619.  
  620. The UUCP mailer on "gatech" is a re-routing mailer.  Any path or address
  621. handed to "uumail" gets an "optimal" path supplied to it.  That is, the
  622. program steps through the address from ultimate destination to
  623. beginning, and if it knows a path to that site it will substitute that
  624. path for the remainder of the user-supplied path.  For example, if the
  625. address "a!b!c!d!e!f" is provided to the mailer, and it knows how to
  626. get to site "d" via "z!y" (but no idea how to get to "e"), it will
  627. rewrite the path to be "z!y!d!e!f".  The path database is built using
  628. "pathalias" on the uucp map data obtained from the Usenix
  629. machine ("gatech" is a regional repository of UUCP map information and
  630. gets near-synchronous copies of map updates).
  631. The ruleset along with "uumail" rewrites the "To:" field to look like
  632. "f@e.UUCP" since the user-supplied address-path is probably not the
  633. path that the mailer is going to use. Note that this means that
  634. "uumail.m4" and "uucpm.m4" are NOT identical in function -- beware if
  635. you decide to use one of them as a base in building your own files.
  636. "uucpm.m4" does not muck about with the "To:" field, nor does it
  637. reroute mail.
  638.  
  639. This uucp mechanism allows any of our users to simply address mail to
  640. "foo@site.UUCP" and not worry about a path.  It also optimizes message
  641. paths provided when answering news articles, and it allows our
  642. neighbors without mail routing software to address mail to
  643. "gatech!somesite!person" and expect the mail to get through, if
  644. possible.  So far, no one has complained about not being able to force
  645. a particular path through our mailer.  In the 6+ months this mechanism
  646. has been working, I've only discovered about 6 sites not registered
  647. with the map project and thus ccausing mail to them to fail.
  648.  
  649. That's about it.  If you find these useful in some way, great.  If you
  650. should find bugs or possible enhancements to these files, I would
  651. greatly appreciate hearing about it.
  652. ----
  653. Gene Spafford
  654. The Clouds Project, School of ICS, Georgia Tech, Atlanta GA 30332
  655. CSNet:    Spaf @ GATech        ARPA:    Spaf%GATech.CSNet @ CSNet-Relay.ARPA
  656. uucp:    ...!{akgua,allegra,hplabs,ihnp4,linus,seismo,ulysses}!gatech!spaf
  657. !STUFFY!FUNK!
  658. echo Extracting Files
  659. cat >Files <<'!STUFFY!FUNK!'
  660. The following are the files that this particular sendmail configuration
  661. uses.  These are in addition to the files /usr/lib/sendmail* and
  662. /usr/lib/aliases*.
  663.  
  664. These files are normally set up in the directory /usr/lib/mail on each
  665. machine.  The file uucp.local needs to be present on each machine, or
  666. else the declaration in gtbase.m4 changed so that the uucp neighbors
  667. are defined as a class macro in the individual .mc files.  I chose
  668. the easy way out for here at GaTech.
  669.  
  670. Each list is assumed to be one-per-line, unless otherwise stated.
  671.  
  672.  
  673. arpa.hosts -- a list of Arpa (EDU, DDN, etc.) hosts.  This is derived
  674.     from one of the hosts.txt file from the Arpa CIC.  These also
  675.     sometimes get posted to net.mail and/or sent out to CSNet sites
  676.     from the CSNet NIC.
  677.  
  678. bitnet.hosts -- a list of Bitnet hosts.  This is obtained from some
  679.     friendly Bitnet neighbor, or else taken from net.mail the
  680.     next time it is posted there.
  681.  
  682. csnet.hosts -- a list of CSNet hosts and acceptable nicknames.  This can
  683.     be obtained from the CSNet NIC.
  684.  
  685. decnet.hosts -- a list of DEC network hostnames.  This list is really
  686.     a kludge and I am seriously considering removing it.  DEC considers
  687.     the actual list to be a company secret and so the list is by
  688.     no means complete.  I derived my copy from checking news paths
  689.     and trading lists with other such watchers.  Each entry is
  690.     in the list twice -- once as "site" and once as "dec-site".
  691.     This leads to some horrible name conflicts.
  692.  
  693. mailnet.hosts -- a list of Mailnet hosts.  I have no idea where you can
  694.     get an up-to-date copy.  Someone mailed me a copy a long time
  695.     ago, and I haven't seen much mention since.  I know next
  696.     to nothing about it.
  697.  
  698. uucp.hosts -- the output of pathalias when run on the uucp maps.  This
  699.     list is of all sites reachable via uucp, one per line, with
  700.     a "sprintf" format string specifying the path on the same
  701.     line, separated from the hostname by a tab.  I sort mine,
  702.     but I don't think it makes a difference.
  703.  
  704. uucp.hosts.dir, uucp.hosts.pag -- the uucp.hosts file in dbm format
  705.     after running makedb on them (makedb was part of the last
  706.     pathalias release).
  707.  
  708. uucp.local -- a list of all sites reachable directly via uucp from this
  709.     site.  That is, sites for which we have L.sys info.
  710.  
  711. uumail -- the uumail program executable file.
  712.  
  713. uumail.log -- a log of uucp mail passing through our site.  Each line
  714.     consists of the sender's address, followed by a tab, the
  715.     destination address as it was presented to uumail from 
  716.     sendmail, a tab, and the actual path that uumail dispatched
  717.     the mail along.  This data can be analysed for traffic patterns,
  718.     finding sites not listed in the uucp maps, and checking to
  719.     see how well uumail is working.
  720.  
  721.     If the input to uumail generates an error, the third field is
  722.     the error message generated by uumail and sent back to the
  723.     "sender".
  724. !STUFFY!FUNK!
  725. echo ""
  726. echo "End of kit 1 (of 3)"
  727. cat /dev/null >kit1isdone
  728. config=true
  729. for iskit in 1 2 3; do
  730.     if test -f kit${iskit}isdone; then
  731.     echo "You have run kit ${iskit}."
  732.     else
  733.     echo "You still need to run kit ${iskit}."
  734.     config=false
  735.     fi
  736. done
  737. case $config in
  738.     true)
  739.     echo "You have run all your kits.  Please read README."
  740.     ;;
  741. esac
  742. : I do not append .signature, but someone might mail this.
  743. exit
  744.  
  745.