home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume8 / ease / part03 < prev    next >
Encoding:
Internet Message Format  |  1987-02-10  |  41.4 KB

  1. Subject:  v08i055:  Ease, a language for writing sendmail.cf files, Part03/04
  2. Newsgroups: mod.sources
  3. Approved: mirror!rs
  4.  
  5. Submitted by: ksb@j.cc.purdue.edu
  6. Mod.sources: Volume 8, Issue 55
  7. Archive-name: ease/Part03
  8.  
  9. #    This is a shell archive.
  10. #    Remove everything above and including the cut line.
  11. #    Then run the rest of the file through sh.
  12. #----cut here-----cut here-----cut here-----cut here----#
  13. #!/bin/sh
  14. # shar:    Shell Archiver
  15. #    Run the following text with /bin/sh to create:
  16. #    config-files
  17. mkdir config-files
  18. chdir config-files
  19. mkdir FINIS
  20. chdir FINIS
  21. cat << \SHAR_EOF > zerobase.cpp
  22.  
  23. /***********************************************************
  24.  ***********************************************************
  25.  ****
  26.  ****    RULESET ZERO PREAMBLE
  27.  ****
  28.  ****    The beginning of ruleset zero is constant through all
  29.  ****    configurations.
  30.  ****
  31.  ****    $Id: zerobase.cpp,v 1.4 86/04/04 14:31:36 kcs Exp $
  32.  ****
  33.  ***********************************************************
  34.  ***********************************************************/
  35.  
  36. ruleset BASE_RW {
  37.  
  38.     /* first make canonical */
  39.  
  40.     if ( anypath < anypath > anypath )
  41.         retry ( $1$2$3);            /* defocus */
  42.     if ( path )
  43.         next ( NAME_CANON ( $1 ) );        /* make canonical */
  44.  
  45.     /* handle special cases..... */
  46.  
  47.     if ( @ )
  48.         resolve ( mailer (local),
  49.               user ("MAILER-DAEMON") );    /* handle <> form */
  50.     if ( anypath < @[path] > anypath )
  51.         resolve ( mailer (tcp),
  52.               host (hostnum ($2)),
  53.               user ("$1@[$2]$3") );        /* numeric internet spec */
  54.  
  55.     /* arrange for local names to be fully qualified */
  56.  
  57.     /***
  58.     if ( anypath < anypath campushost > anypath )
  59.         retry ( $1<$2$3".LOCAL">$4 );        /* user@campushost */
  60.     /***
  61.     if ( anypath < anypath berkhost > anypath )
  62.         retry ( $1<$2$3".LOCAL">$4 );        /* user@berkhost */
  63.     /***
  64.     if ( anypath < path ".ARPA.LOCAL" > anypath )
  65.         retry ( $1<$2".ARPA">$3 );        /* because ARPA is a host */
  66.  
  67.     /* delete local domain info -- this is a (temporary?) kludge */
  68.  
  69.     if ( anypath < anypath "." $localname > anypath )
  70.         retry ( $1<$2>$3 );            /* strip local domain */
  71.     if ( anypath < anypath "." localdomain > anypath )
  72.         retry ( $1<$2>$4 );            /* strip local subdomains */
  73.  
  74.     /* now delete (more) local info */
  75.  
  76.     if ( anypath < anypath this_host "." topdomain_id > anypath )
  77.         retry ( $1<$2>$5 );            /* this_host.LOCAL */
  78.     if ( anypath < anypath this_host > anypath )
  79.         retry ( $1<$2>$4 );            /* this_host */
  80.     if ( anypath < anypath "." > anypath )
  81.         retry ( $1<$2>$3 );            /* drop trailing dot */
  82.     if ( < @ > : anypath )
  83.         return ( BASE_RW ( $1 ) );        /* retry after route strip */
  84.     if ( anypath < @ > )
  85.         return ( BASE_RW ( $1 ) );        /* strip null trash and retry */
  86.  
  87.  
  88. /********************************
  89.  * End of ruleset zero preamble * 
  90.  ********************************/
  91. SHAR_EOF
  92. if test 2139 -ne "`wc -c zerobase.cpp`"
  93. then
  94. echo shar: error transmitting zerobase.cpp '(should have been 2139 characters)'
  95. fi
  96. cat << \SHAR_EOF > version.cpp
  97.  
  98. /* $Id: version.cpp,v 1.3 85/05/04 17:01:03 acu Exp Locker: acu $ */
  99.  
  100. macro
  101.     berkhosts = "4.41";
  102. SHAR_EOF
  103. if test 98 -ne "`wc -c version.cpp`"
  104. then
  105. echo shar: error transmitting version.cpp '(should have been 98 characters)'
  106. fi
  107. cat << \SHAR_EOF > pucc-h.mc
  108. /***********************************************************
  109.  ***********************************************************
  110.  ****
  111.  ****    SENDMAIL CONFIGURATION FILE
  112.  ****
  113.  ****    For PUCC-H
  114.  ****
  115.  ****    $Id: pucc-h.mc,v 1.2 86/04/04 14:18:03 kcs Exp $
  116.  ****
  117.  ***********************************************************
  118.  ***********************************************************/
  119.  
  120.  
  121. /***********************************************************
  122.  **    local info
  123.  ***********************************************************/
  124.  
  125. macro
  126.     m_sitename = "h.cc.purdue.edu";        /* internet hostname */
  127.     berkname   = "h.cc.purdue.edu";        /* berknet hostname  */
  128.  
  129. class
  130.     m_sitename = { "h.cc.purdue.edu", pucc-h, pucch, h };
  131.  
  132.  
  133. #include "puccbase.cpp"
  134.  
  135.  
  136. options
  137.     /***
  138.     o_slog = "1";        /* override logging level in base.cpp */
  139.  
  140.  
  141. #include "zerobase.cpp"
  142.  
  143.  
  144. /***********************************************
  145.  **  Machine dependent part of ruleset zero   **
  146.  ***********************************************/
  147.  
  148.     /* resolve berknet names */
  149.  
  150.     if ( < @berkhost > : path )
  151.         resolve ( mailer ( berk ),
  152.               host ( $1 ),
  153.               user ( $2 ) );        /* @berkhost: ... */
  154.  
  155.     if ( usr < @berkhost > )
  156.         resolve ( mailer ( berk ),
  157.               host ( $2 ),
  158.               user ( $1 ) );        /* user@berknethost */
  159.  
  160.     /* we don't do uucp */
  161.  
  162.     if ( anypath < @anypath ".UUCP" > anypath )
  163.         resolve ( mailer ( error ),
  164.               user ( "Non-Local UUCP Mail Unavailable" ) );
  165.  
  166.     /* resolve campus names (actually, all non-local names) */
  167.  
  168.     if ( anypath < @anypath hostname > anypath )
  169.         resolve ( mailer ( pcl ),
  170.               host ( $3 ),
  171.               user ( $1<@$2$3>$4 ) );    /* user@campushost */
  172.  
  173.     if ( path )
  174.         resolve ( mailer ( local ),
  175.               user ( $1 ) );        /* everything else */
  176.  
  177.  
  178. /**************************************
  179.  **  Host dependent address cleanup  **
  180.  **************************************/
  181.  
  182.  
  183. ruleset HOSTDEP_RW {
  184.  
  185.     if ( anypath uucphost!usr@path )
  186.         retry ( $3@$4 );            /* drop uucp forward */
  187.  
  188.     if ( anypath campushost ".ARPA" anypath )
  189.         retry ( $1$2$3 );            /* drop ".ARPA" */
  190.  
  191. }
  192.  
  193. #include "pclm.cpp"
  194. #include "berkm.cpp"
  195. SHAR_EOF
  196. if test 2042 -ne "`wc -c pucc-h.mc`"
  197. then
  198. echo shar: error transmitting pucc-h.mc '(should have been 2042 characters)'
  199. fi
  200. cat << \SHAR_EOF > phonenethosts.cpp
  201. /*******************************************************
  202.  *******************************************************
  203.  ****
  204.  ****    Phonenet Host List
  205.  ****
  206.  ****    Mail to these sites should be routed
  207.  ****    through csnet-relay.
  208.  ****
  209.  ****    $Id: phonenethosts.cpp,v 1.3 85/07/10 22:37:28 acu Exp $
  210.  ****
  211.  *******************************************************
  212.  *******************************************************/
  213.  
  214. class
  215.     phonehosts = { albany, alcoa-atc, alcoa-sei, arizona, asu, bostonu,
  216.                boulder, brandeis, brown, brown-cogsci, btl, buffalo,
  217.                canisius, carleton, case, clemson, colgate, colostate,
  218.                ct, dartmouth, depaul, digital, duke, emory, france,
  219.                gatech, georgetown, germany, gmr, gte-labs, houston,
  220.                hplabs, ibm-sj, icase, indiana, iowa-state, israel, jhu,
  221.                kaist, kansas-state, kent, lsu, mcnc, mtu, ncar, nmsu,
  222.                nmt, northeastern, nsf-cs, nwu, ohio-state, okstate,
  223.                oregon-grad, oregon-state, penn-state, pitt, portland,
  224.                princeton, rit, rpi, scarolina, smu, src, suny-bing,
  225.                suny-sb, syr, tamu, tektronix, ti-csl, ti-eg, toronto,
  226.                tufts, tulane, uab, ubc, ucd, ucf, uchicago, uconn, 
  227.                ucsb, ucsc, udenver, ufl, uhcl, uiowa, ukans, ulowell,
  228.                umass, umass-boston, umich, umiss, umn-cs, unc, unh,
  229.                unl, unlv, uno, uoregon, upenn, usc-cse, usl, utd,
  230.                utenn, uvm, uwm, vanderbilt, virginia, vpi, wang-inst,
  231.                waterloo, williams, wfu, wright, wsu };
  232. SHAR_EOF
  233. if test 1481 -ne "`wc -c phonenethosts.cpp`"
  234. then
  235. echo shar: error transmitting phonenethosts.cpp '(should have been 1481 characters)'
  236. fi
  237. cat << \SHAR_EOF > Makefile
  238. ######################################################################
  239. #
  240. #    Makefile for Sendmail PUCC configuration files
  241. #
  242. #    $Id: Makefile,v 1.4 86/04/04 14:16:17 kcs Exp $
  243. #
  244. ######################################################################
  245.  
  246.  
  247. PUCCSRCS=pucc-h.mc \
  248.     pucc-i.mc \
  249.     pucc-j.mc \
  250.     pucc-k.mc \
  251.     stat-l.mc \
  252.     pucc-n.mc \
  253.     pucc-s.mc
  254.  
  255. GENSRCS=base.cpp \
  256.     berkhosts.cpp \
  257.     berkm.cpp \
  258.     compat.cpp \
  259.     localhosts.cpp \
  260.     localm.cpp \
  261.     pclm.cpp \
  262.     puccbase.cpp \
  263.     tcpm.cpp \
  264.     version.cpp \
  265.     zerobase.cpp
  266.  
  267. SRCS=    $(GENSRCS) $(PUCCSRCS)
  268.  
  269. PUCCALL=pucc-h.cf \
  270.     pucc-i.cf \
  271.     pucc-j.cf \
  272.     pucc-k.cf \
  273.     stat-l.cf \
  274.     pucc-n.cf \
  275.     pucc-s.cf
  276.  
  277. ALL=    $(PUCCALL)
  278.  
  279.  
  280. .SUFFIXES: .mc .cf
  281.  
  282. .mc.cf:
  283.     /lib/cpp $*.mc > $*.cf
  284.  
  285. all: $(ALL)
  286.  
  287. ############################
  288. #   special dependencies   #
  289. ############################
  290.  
  291. # pessimize -- basic dependencies
  292. $(ALL): base.cpp berkhosts.cpp localm.cpp localhosts.cpp pclm.cpp puccbase.cpp \
  293.     version.cpp zerobase.cpp
  294.  
  295. # hosts on berknet
  296. pucc-h.cf: berkm.cpp
  297.  
  298. # hosts on the arpanet
  299. pucc-j.cf: tcpm.cpp
  300.  
  301. # hosts on csnet
  302. pucc-j.cf: phonenethosts.cpp
  303.  
  304. # mailers requiring backwards compatibility
  305. berkm.cpp tcpm.cpp: compat.cpp
  306.  
  307. #####################
  308. #   administrivia   #
  309. #####################
  310.  
  311. sources: $(SRCS)
  312.  
  313. clean:
  314.     rm -f $(ALL) a.out core errs
  315. SHAR_EOF
  316. if test 1283 -ne "`wc -c Makefile`"
  317. then
  318. echo shar: error transmitting Makefile '(should have been 1283 characters)'
  319. fi
  320. cat << \SHAR_EOF > base.cpp
  321. /***********************************************************
  322.  ***********************************************************
  323.  ****
  324.  ****    General configuration information
  325.  ****
  326.  ****    This information is basically just "boiler-plate"; it must be
  327.  ****    there, but is essentially constant.
  328.  ****
  329.  ****    Information in this file should be independent of location --
  330.  ****    i.e., although there are some policy decisions made, they are
  331.  ****    not specific to Berkeley per se.
  332.  ****
  333.  ****    $Id: base.cpp,v 1.3 85/05/04 17:00:43 acu Exp Locker: acu $
  334.  ****
  335.  ***********************************************************
  336.  ***********************************************************/
  337.  
  338.  
  339. #include "version.cpp"
  340.  
  341.  
  342. /************************
  343.  **   Special macros   **
  344.  ************************/
  345.  
  346. macro
  347.     m_daemon = "MAILER-DAEMON";
  348.         /* my name */
  349.  
  350.     m_ufrom = "From ${m_sreladdr}  ${m_udate}";
  351.         /* UNIX header format */
  352.  
  353.     m_addrops = ".:%@!^=/[]";
  354.         /* delimiter (operator) characters */
  355.  
  356.     m_defaddr = concat ( 
  357.             ifset (m_sname, "${m_sname} "),
  358.             "<${m_sreladdr}>"
  359.                 );
  360.         /* format of a total name */
  361.  
  362.     m_smtp = "${m_oname} Sendmail ${m_version}/${berkhosts} ready at ${m_adate}";
  363.         /* SMTP login message */
  364.  
  365.  
  366. /***************
  367.  **   Class   **
  368.  ***************/
  369.  
  370. class
  371.     uucphosts = {};
  372.  
  373. /*****************
  374.  **   Options   **
  375.  *****************/
  376.  
  377. options
  378.     o_alias = "/usr/lib/aliases";
  379.         /* location of alias file */
  380.  
  381.     o_ewait    = "10";
  382.         /* wait up to ten minutes for alias file rebuild */
  383.  
  384.     o_bsub  = ".";
  385.         /* substitution for space (blank) characters */
  386.  
  387.     o_delivery = d_background;
  388.         /* default delivery mode (deliver in background) */
  389.  
  390.     /***
  391.     o_qwait = "";
  392.         /* (don't) connect to "expensive" mailers */
  393.  
  394.     o_tmode = "0600";
  395.         /* temporary file mode */
  396.  
  397.     o_gid = "3";
  398.         /* default GID (network) */
  399.  
  400.     o_fsmtp = "/usr/lib/sendmail.hf";
  401.         /* location of help file */
  402.  
  403.     o_slog = "9";
  404.         /* log level */
  405.  
  406.     /***
  407.     o_dnet = "ARPA";
  408.          /* default network name */
  409.  
  410.     o_hformat = "";
  411.          /* default messages to old style */
  412.  
  413.     o_qdir = "/usr/spool/mqueue";
  414.         /* queue directory */
  415.  
  416.     o_tread = "2h";
  417.         /* read timeout -- violates protocols */
  418.  
  419.     o_flog = "/usr/lib/sendmail.st";
  420.          /* status file */
  421.  
  422.     o_safe = "";
  423.          /* queue everything before transmission */
  424.  
  425.     o_qtimeout = "3d";
  426.         /* default timeout interval */
  427.  
  428.     o_timezone = "EST";
  429.          /* time zone names (V6 only) */
  430.  
  431.     o_dmuid = "5";
  432.          /* default UID (network) */
  433.  
  434.     o_wizpass = "XXXXXXXXXXXXX";
  435.          /* wizard's password */
  436.  
  437.     o_loadq = "999";
  438.          /* load average at which we just queue messages */
  439.  
  440.     o_loadnc = "999";
  441.          /* load average at which we refuse connections */
  442.  
  443.  
  444. /*****************************
  445.  **   Message precedences   **
  446.  *****************************/
  447.  
  448. precedence
  449.     first-class      = 0;
  450.     special-delivery = 100;
  451.     junk         = -100;
  452.  
  453.  
  454. /***********************
  455.  **   Trusted users   **
  456.  ***********************/
  457.  
  458. trusted
  459.     {root, daemon, uucp, network};
  460.     {aat};
  461.  
  462.  
  463. /***************************
  464.  **   Format of headers   **
  465.  ***************************/
  466.  
  467. header
  468.     define ("Received:", concat (ifset (m_shostname, "from ${m_shostname} "),
  469.         "by ${m_oname}; ${m_adate}"));
  470.     define ("Subject:", "");
  471.  
  472.     /*** 
  473.     define ("Posted-Date:", "${m_odate}");
  474.      ***/
  475.  
  476.     for (f_return)
  477.         define ("Return-Path:", "<${m_sreladdr}>");
  478.  
  479.     for (f_date) {
  480.         define ("Resent-Date:", "${m_odate}");
  481.         define ("Date:",     "${m_odate}");
  482.     };
  483.  
  484.     for (f_from) {
  485.         define ("Resent-From:", "${m_defaddr}");
  486.         define ("From:",     "${m_defaddr}");
  487.     };
  488.  
  489.     for (f_full)
  490.         define ("Full-Name:", "${m_sname}");
  491.  
  492.     /***
  493.     for (f_locm)
  494.         define ("Received-Date:", "${m_adate}");
  495.      ***/
  496.  
  497.     for (f_mesg) {
  498.         define ("Resent-Message-Id:", "<${m_ctime}.${m_qid}@${m_oname}>");
  499.         define ("Message-Id:",           "<${m_ctime}.${m_qid}@${m_oname}>");
  500.     };
  501.  
  502.  
  503. /*************************
  504.  *************************
  505.  **   Rewriting rules   **
  506.  ************************* 
  507.  *************************/
  508.  
  509. /*************************
  510.  **  Field definitions  **
  511.  *************************/
  512.  
  513. field
  514.     anypath            : match (0*);
  515.     path, usr, hostpath,
  516.     domain            : match (1*);
  517.     this_host        : match (1) in m_sitename;
  518.     hostname        : match (1);
  519.     campushost        : match (1) in campushosts;
  520.     localdomain        : match (1) in localname;
  521.     topdomain_id        : match (1) in topdomain;
  522.     uucphost        : match (1) in uucphosts;
  523.     phonehost        : match (1) in phonehosts;
  524.  
  525. /********************************
  526.  *  Sender Field Pre-rewriting  *
  527.  ********************************/
  528.  
  529. ruleset SEND_PRW {
  530.  
  531. /***
  532.     if ( anypath < anypath > anypath )
  533.         retry ( $1$2$3 );            /* defocus */
  534.  
  535. }
  536.  
  537. /***********************************
  538.  *  Recipient Field Pre-rewriting  *
  539.  ***********************************/
  540.  
  541. ruleset RECP_PRW {
  542.  
  543. /***
  544.     if ( anypath < anypath > anypath )
  545.         retry ( $1$2$3 );            /* defocus */
  546.  
  547. }
  548.  
  549.  
  550. /*********************************
  551.  *  Final Output Post-rewriting  *
  552.  *********************************/
  553.  
  554. ruleset FINAL_RW {
  555.  
  556.     if ( @ )
  557.         return ();                /* handle <> error addr */
  558.  
  559.     /* externalize local domain info */
  560.  
  561.     /***
  562.     if ( anypath < anypath "LOCAL" > anypath )
  563.         retry ( $1 < $2 $localname > $3 );    /* change local info */
  564.     
  565.     /***
  566.     if ( anypath < anypath "LOCAL.ARPA" > anypath )
  567.         retry ( $1 < $2 $localname > $3 );    /* change local info */
  568.  
  569.     if ( anypath < path > anypath )
  570.         retry ( $1$2$3 );            /* defocus */
  571.         
  572.     if ( @path: @path: usr )
  573.         retry ( @$1,@$2:$3);            /* <route-addr> canonical */
  574.  
  575.     /* UUCP must always be presented in old form */
  576.  
  577.     if ( usr @ hostname ".UUCP" )
  578.         retry ( $2!$1);                /* u@h.UUCP => h!u */
  579.  
  580.     /* delete duplicate local names -- mostly for arpaproto.mc */
  581.  
  582.     if ( usr % this_host @ this_host )
  583.         retry ( $1@$3 );            /* u%UCB@UCB => u@UCB */
  584.  
  585.     if ( usr % this_host @ this_host ".ARPA" )
  586.         retry ( $1@$3 ".ARPA" );        /* u%UCB@UCB => u@UCB */
  587.  
  588. }
  589.  
  590.  
  591. /***************************
  592.  *  Name Canonicalization  *
  593.  ***************************/
  594.  
  595. ruleset NAME_CANON {
  596.  
  597.     /* handle "from:<>" special case */
  598.  
  599.     if ( <>    )
  600.         return ( @ );                /* turn into magic token */
  601.  
  602.     /* basic textual canonicalization -- note RFC733 heuristic here */
  603.  
  604.     if ( anypath < anypath < anypath < path > anypath > anypath > anypath )
  605.         retry ( $4 );                /* 3-level <> nesting */
  606.  
  607.     if ( anypath < anypath < path > anypath > anypath )
  608.         retry ( $3 );                /* 2-level <> nesting */
  609.  
  610.     if ( anypath < path > anypath )
  611.         retry ( $2 );                /* basic RFC821/822 parsing */
  612.  
  613.     if ( usr " at " path )
  614.         retry ( $1@$2 );            /* "at" -> "@" for RFC 822 */
  615.  
  616.     /* make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later */
  617.  
  618.     if ( @path, usr )
  619.         retry ( @$1:$2 );            /* change all "," to ":" */
  620.  
  621.     /* localize and dispose of route-based addresses */
  622.  
  623.     if ( @path: usr )
  624.         return ( LOCAL_RW ( <@$1>:$2 ) );    /* handle <route-addr> */
  625.  
  626.     /* more miscellaneous cleanup */
  627.  
  628.     if ( path )
  629.         next ( HOSTDEP_RW ( $1 ) );        /* host dependent cleanup */
  630.  
  631.     if ( path: anypath; @domain )
  632.         return ( $1:$2;@$3 );            /* list syntax */
  633.  
  634.     if ( usr @ domain )
  635.         next ( $1<@$2> );            /* focus on domain */
  636.  
  637.     if ( path < path @ domain > )
  638.         retry ( $1$2<@$3> );            /* move gaze right */
  639.  
  640.     if ( path < @domain > )
  641.         return ( LOCAL_RW ( $1<@$2> ) );    /* already canonical */
  642.  
  643.     /* convert old-style addresses to a domain-based address */
  644.  
  645.     if ( usr % hostpath )
  646.         return ( LOCAL_RW ( $1<@$2> ) );    /* user%host */
  647.  
  648.     if ( hostname:usr )
  649.         return ( LOCAL_RW ( $2<@$1> ) );    /* host:user */    
  650.  
  651.     if ( hostname.usr )
  652.         return ( LOCAL_RW ( $2<@$1> ) );    /* host.user */
  653.  
  654.     if ( hostname^usr )
  655.         retry ( $1!$2);                /* convert ^ to ! */
  656.  
  657.     if ( hostname!usr )
  658.         return ( LOCAL_RW ( $2<@$1".UUCP"> ) );       /* resolve uucp names */
  659.  
  660.     if ( hostname=usr )
  661.         return ( LOCAL_RW ( $2<@$1".BITNET"> ) );  /* resolve bitnet names */
  662. SHAR_EOF
  663. if test 7566 -ne "`wc -c base.cpp`"
  664. then
  665. echo shar: error transmitting base.cpp '(should have been 7566 characters)'
  666. fi
  667. cat << \SHAR_EOF > berkhosts.cpp
  668. /***********************************************************
  669.  ***********************************************************
  670.  ****
  671.  ****    Berknet Host List
  672.  ****
  673.  ****    $Id: berkhosts.cpp,v 1.4 85/07/21 22:15:14 acu Exp Locker: acu $
  674.  ****
  675.  ***********************************************************
  676.  ***********************************************************/
  677.  
  678. class
  679.     berkhosts = { C, pucc-c, puccc, 
  680.               D, pucc-d, puccd,
  681.               E, pucc-e, pucce,
  682.               X, asterix, library, libr,
  683.               W, physics, pur-phy, phy-a, 
  684.               physics-galileo, purdue-galileo, galileo };
  685.  
  686. SHAR_EOF
  687. if test 576 -ne "`wc -c berkhosts.cpp`"
  688. then
  689. echo shar: error transmitting berkhosts.cpp '(should have been 576 characters)'
  690. fi
  691. cat << \SHAR_EOF > berkm.cpp
  692. /***********************************************************
  693.  ***********************************************************
  694.  ****
  695.  ****    Berknet Mailer specification
  696.  ****
  697.  ****    $Id: berkm.cpp,v 1.4 85/07/10 22:32:07 acu Exp $
  698.  ****
  699.  ***********************************************************
  700.  ***********************************************************/
  701.  
  702. #ifdef cppCOMPAT
  703. #include "compat.cpp"
  704. #endif
  705.  
  706. mailer
  707.     berk {
  708.         Path    = "/usr/net/bin/sendberkmail",
  709.         Flags    = { f_ffrom, f_strip, f_date, f_from, f_mesg, f_addrw };
  710.         Sender  = BERKSEND_RW;
  711.         Recipient = BERKREC_RW;
  712.         Argv    = "sendberkmail -m ${m_rhost} -h ${m_hops} -t ${m_ruser}";
  713.         Maxsize    = "25000"
  714.     };
  715.  
  716. ruleset BERKSEND_RW {
  717.  
  718.     if ( path )
  719.         next ( OLDSTYLE_RW ( $1 ) );        /* convert to old style */
  720.     if ( hostname:usr )
  721.         return ( $1:$2);            /* old berknet as is */
  722.  
  723.     if ( path < @path > )
  724.         return ( $1<@$2> );            /* don't modify arpanet */
  725.  
  726.     if ( hostname!usr )
  727.         return ( $1!$2 );            /* don't modify uucp */
  728.  
  729.     if ( < @path > )
  730.         return ( <@$1> );            /* don't modify <routeaddr> */
  731.  
  732.     if ( path )
  733.         return ( $m_shostname:$1 );        /* make others relative */
  734.  
  735. }
  736.  
  737.  
  738. ruleset BERKREC_RW {
  739.  
  740.     if ( path )
  741.         next ( OLDSTYLE_RW ( $1 ) );        /* convert to old style */
  742.  
  743. }
  744. SHAR_EOF
  745. if test 1211 -ne "`wc -c berkm.cpp`"
  746. then
  747. echo shar: error transmitting berkm.cpp '(should have been 1211 characters)'
  748. fi
  749. cat << \SHAR_EOF > compat.cpp
  750. /***********************************************************
  751.  ***********************************************************
  752.  ****
  753.  ****    Provide Backward Compatibility
  754.  ****
  755.  ****    $Id: compat.cpp,v 1.4 85/11/24 22:46:32 acu Exp $
  756.  ****
  757.  ***********************************************************
  758.  ***********************************************************/
  759.  
  760. #define cppCOMPAT 4.2
  761.  
  762. field
  763.     berkhost: match (1) in berkhosts;
  764.  
  765. /***************************************************
  766.  * General code to convert back to old style names *
  767.  ***************************************************/
  768.  
  769. ruleset OLDSTYLE_RW {
  770.  
  771.     if ( usr < @berkhost > )
  772.         return ( $2:$1 );            /* u@bhost => h:u */
  773.  
  774.     if ( usr < @hostname ".UUCP" > )
  775.         retry ( $2!$1 );            /* u@host.UUCP => host!u */
  776.  
  777.     if ( usr @ hostpath ".ARPA" )
  778.         retry ( $1@$2 );            /* u@host.ARPA => u@host */
  779.  
  780. }
  781. SHAR_EOF
  782. if test 843 -ne "`wc -c compat.cpp`"
  783. then
  784. echo shar: error transmitting compat.cpp '(should have been 843 characters)'
  785. fi
  786. cat << \SHAR_EOF > localhosts.cpp
  787. /***********************************************************
  788.  ***********************************************************
  789.  **** 
  790.  ****    Campus Host List
  791.  ****
  792.  ****    $Id: localhosts.cpp,v 1.3 85/06/26 16:10:15 acu Exp $
  793.  ****
  794.  ***********************************************************
  795.  ***********************************************************/
  796.  
  797. class
  798.     campushosts = { pucc-c, c, puccc,
  799.             pucc-d, d, puccd,
  800.             pucc-e, e, pucce,
  801.             pucc-h, h, pucch,
  802.             pucc-i, i, pucci,
  803.             pucc-j, j, puccj, pucc,
  804.             pucc-k, k, pucck,
  805.             pucc-n, n, puccn,
  806.             stat-l, l, statl, stat,
  807.             purdue-arthur, arthur, purdue, purdue-cs,
  808.             purdue-merlin, merlin,
  809.             purdue-mordred, mordred, cs,
  810.             purdue-bmec, purdue-ecn-bmec, ecn-bmec, bmec,
  811.             purdue-chem, purchem, chemistry, purdue-chemistry,
  812.             purdue-dipl, ecn-dipl, dipl,
  813.             purdue-ecn-ca, ecn-ca, ca, ca-en,
  814.             purdue-ecn-cb, ecn-cb, cb, cb-en,
  815.             purdue-ecn-ec, ecn-ec, ec, ec-en,
  816.             purdue-ecn-ed, ecn-ed, ed, ed-en,
  817.             purdue-ecn-ee, ecn-ee, ee, ee-en, pur-ee, ecn, purdue-ecn,
  818.             purdue-ecn-ef, ecn-ef, ef, ef-en,
  819.             purdue-ecn-ef, ecn-ef, ef, ef-rsch,
  820.             purdue-ecn-eg, ecn-eg, eg, eg-en,
  821.             purdue-ecn-eh, ecn-eh, eh, eh-en, ecn-test,
  822.             purdue-ecn-ei, ecn-ei, ei, ei-en,
  823.             purdue-ecn-ej, ecn-ej, ej, ej-en,
  824.             purdue-ecn-ek, ecn-ek, ek, ek-en,
  825.             purdue-ecn-ga, ecn-ga, ga, ga-en,
  826.             purdue-ecn-gb, ecn-gb, gb, gb-en,
  827.             purdue-ecn-ma, ecn-ma, ma, ma-en,
  828.             purdue-ecn-mb, ecn-mb, mb, mb-en,
  829.             purdue-ecn-md, ecn-md, md, md-en,
  830.             purdue-ecn-pb, ecn-pb, pb, pb-en, cidmac,
  831.             purdue-ecn-pc, ecn-pc, pc, pc-en,
  832.             purdue-galileo, galileo, physics-galileo,
  833.             purdue-malcolm, ecn-malcolm, malcolm,
  834.             purdue-newton, newton, physics-newton,
  835.             purdue-trillian, ecn-trillian, trillian,
  836.             purdue-vlsi, puvlsi, vlsi,
  837.             purdue-zaphod, ecn-zaphod, zaphod };
  838.  
  839.     /* non-standard names for CS hosts (translated to CS) */
  840.  
  841.     othercs = { cs-arthur, cs-mordred, cs-merlin };
  842. SHAR_EOF
  843. if test 1906 -ne "`wc -c localhosts.cpp`"
  844. then
  845. echo shar: error transmitting localhosts.cpp '(should have been 1906 characters)'
  846. fi
  847. cat << \SHAR_EOF > pclm.cpp
  848. /****************************************************************************
  849.  ****************************************************************************
  850.  ****
  851.  ****    PCL11 Mailer specification
  852.  ****
  853.  ****    Messages processed by this configuration are assumed to remain
  854.  ****    in the same domain.  Hence, they may not necessarily correspond
  855.  ****    to RFC822 in all details.
  856.  ****
  857.  ****    $Id: pclm.cpp,v 1.4 85/06/26 15:10:46 acu Exp $
  858.  ****
  859.  ****************************************************************************
  860.  ****************************************************************************/
  861.  
  862. mailer
  863.     pcl {
  864.         Path    = "[IPC]",
  865.         Flags    = { f_mult, f_date, f_from, f_mesg, f_upperu, 
  866.                 f_addrw, f_dot, f_smtp },
  867.         Sender    = HOSTNAME_RW,
  868.         Recipient = HOSTNAME_RW,
  869.         Argv    = "IPC ${m_rhost}",
  870.         Maxsize = "100000"
  871.     };
  872.  
  873. ruleset HOSTNAME_RW {
  874.  
  875.     if ( anypath < @path > anypath )
  876.         return ( $1<@$2>$3 );            /* already ok */
  877.  
  878.     if ( path )
  879.         return ( $1<@$m_sitename );        /* tack on our hostname */
  880.  
  881. }
  882. SHAR_EOF
  883. if test 995 -ne "`wc -c pclm.cpp`"
  884. then
  885. echo shar: error transmitting pclm.cpp '(should have been 995 characters)'
  886. fi
  887. cat << \SHAR_EOF > localm.cpp
  888. /***********************************************************
  889.  ***********************************************************
  890.  ****
  891.  ****    Local and Program Mailer specification
  892.  ****
  893.  ****    $Id: localm.cpp,v 1.4 85/07/10 22:38:09 acu Exp $
  894.  ****
  895.  ***********************************************************
  896.  ***********************************************************/
  897.  
  898. mailer
  899.     local {
  900.         Path     = "/bin/mail",
  901.         Flags    = { f_rfrom, f_locm, f_strip, f_date, f_from,
  902.                 f_mesg, f_mult, f_noufrom },
  903.         Sender    = MAGIC_RW,
  904.         Recipient = UNIMPLEMENTED,
  905.         Argv    = "mail -d ${m_ruser}",
  906.         Maxsize    = "200000"
  907.     };
  908.  
  909.     prog {
  910.         Path    = "/bin/sh",
  911.         Flags    = { f_locm, f_strip, f_date, f_from, f_mesg, f_upperu },
  912.         Sender    = MAGIC_RW,
  913.         Recipient = UNIMPLEMENTED,
  914.         Argv    = "sh -c ${m_ruser}",
  915.         Maxsize    = "200000"
  916.     };
  917.  
  918.  
  919. ruleset MAGIC_RW {
  920.  
  921.     if ( @ )
  922.         return ( "MAILER-DAEMON" );    /* errors to mailer-daemon */
  923.  
  924. }
  925. SHAR_EOF
  926. if test 893 -ne "`wc -c localm.cpp`"
  927. then
  928. echo shar: error transmitting localm.cpp '(should have been 893 characters)'
  929. fi
  930. cat << \SHAR_EOF > pucc-j.mc
  931. /***********************************************************
  932.  ***********************************************************
  933.  ****
  934.  ****    SENDMAIL CONFIGURATION FILE
  935.  ****
  936.  ****    For PUCC-J
  937.  ****
  938.  ****    $Id: pucc-j.mc,v 1.2 86/04/04 14:20:57 kcs Exp $
  939.  ****
  940.  ***********************************************************
  941.  ***********************************************************/
  942.  
  943.  
  944.  
  945. /***********************************************************
  946.  **    local info
  947.  ***********************************************************/
  948.  
  949. macro
  950.     m_sitename = "j.cc.purdue.edu";     /* internet hostname */
  951.     arpa_name  = "asc";            /* our arpanet name */
  952.  
  953. class
  954.     m_sitename = { "j.cc.purdue.edu", pucc-j, puccj, j, pucc, purdue-asc, 
  955.                 purdue-205-gw, purdue-asc-tn, asc, "asc.purdue.edu", 
  956.                "asc.cc.purdue.edu", 205-gw, asc-tn };
  957.  
  958.     arpa_name = { "asc.purdue.edu", "asc.cc.purdue.edu", asc, purdue-asc,
  959.                purdue-205-gw };
  960.  
  961. #include "phonenethosts.cpp"
  962.  
  963. #include "puccbase.cpp"
  964.  
  965. #include "zerobase.cpp"
  966.  
  967. /**********************************************
  968.  **  Machine dependent part of ruleset zero  **
  969.  **********************************************/
  970.  
  971.     /* send berknet names through relay */
  972.  
  973.     if ( < @berkhost > : path )
  974.         resolve ( mailer ( pcl ),
  975.               host ( $relay_host ),
  976.               user ( $2<@$1> ) );        /* @berkhost: ... */
  977.  
  978.     if ( anypath < @anypath berkhost > anypath )
  979.         resolve ( mailer ( pcl ),
  980.               host ( $relay_host ),
  981.               user ( $1<@$2$3>$4 ) );    /* user@berknethost */
  982.  
  983.     /* resolve campus names */
  984.  
  985.     if ( anypath < @anypath campushost > anypath )
  986.         resolve ( mailer ( pcl ),
  987.               host ( $3 ),
  988.               user ( $1<@$2$3>$4 ) );    /* user@campushost */
  989.  
  990.     /* send csnet names through relay */
  991.  
  992.     if ( anypath < @phonehost > anypath )
  993.         resolve ( mailer ( tcp ),
  994.               host ( "CSNet-Relay" ),
  995.               user ( $1%$2<@"CSNet-Relay">$3 ) );
  996.  
  997.     if ( anypath < @phonehost ".ARPA" > anypath )
  998.         resolve ( mailer ( tcp ),
  999.               host ( "CSNet-Relay" ),
  1000.               user ( $1%$2<@"CSNet-Relay">$3 ) );
  1001.  
  1002.     if ( anypath < @path ".CSNET" > anypath )
  1003.         resolve ( mailer ( tcp ),
  1004.               host ( "CSNet-Relay" ),
  1005.               user ( $1%$2<@"CSNet-Relay">$3 ) );
  1006.  
  1007.     /* we don't do uucp */
  1008.  
  1009.     if ( anypath < @anypath ".UUCP" > anypath )
  1010.         resolve ( mailer ( error ),
  1011.               user ( "Non-Local UUCP Mail Unavailable" ) );
  1012.  
  1013.     /* we don't do bitnet (yet) */
  1014.  
  1015.     if ( anypath < @anypath ".BITNET" > anypath )
  1016.             resolve ( mailer ( error ),
  1017.                   user ( "Bitnet Mail Unavailable At This Time" ) );
  1018.  
  1019.     /* other non-local names to the arpanet */
  1020.  
  1021.     if ( anypath < @anypath > anypath )
  1022.         resolve ( mailer ( tcp ),
  1023.               host ( $2 ),
  1024.               user ( $1<@$2>$3 ) );        /* user@arpahost */
  1025.  
  1026.     /* remaining names must be local */
  1027.  
  1028.     if ( path )
  1029.         resolve ( mailer ( local ),
  1030.               user ( $1 ) );        /* everything else */
  1031.  
  1032. /**************************************
  1033.  **  Host dependent address cleanup  **
  1034.  **************************************/
  1035.  
  1036. ruleset HOSTDEP_RW {
  1037.  
  1038.     if ( anypath uucphost!usr@hostpath )
  1039.         retry ( $3@$4 );            /* drop uucp forward */
  1040.  
  1041. }
  1042.  
  1043. #include "pclm.cpp"
  1044. #include "tcpm.cpp"
  1045. SHAR_EOF
  1046. if test 3004 -ne "`wc -c pucc-j.mc`"
  1047. then
  1048. echo shar: error transmitting pucc-j.mc '(should have been 3004 characters)'
  1049. fi
  1050. cat << \SHAR_EOF > pucc-i.mc
  1051. /***********************************************************
  1052.  ***********************************************************
  1053.  ****
  1054.  ****    SENDMAIL CONFIGURATION FILE
  1055.  ****
  1056.  ****    For PUCC-I
  1057.  ****
  1058.  ****    $Id: pucc-i.mc,v 1.2 86/04/04 14:19:21 kcs Exp $
  1059.  ****
  1060.  ***********************************************************
  1061.  ***********************************************************/
  1062.  
  1063.  
  1064.  
  1065. /***********************************************************
  1066.  **    local info
  1067.  ***********************************************************/
  1068.  
  1069. macro
  1070.     m_sitename = "i.cc.purdue.edu";     /* internet hostname */
  1071.  
  1072. class
  1073.     m_sitename = { "i.cc.purdue.edu", pucc-i, pucci, i };
  1074.  
  1075. #include "puccbase.cpp"
  1076.  
  1077. options
  1078.     /***
  1079.     o_slog = "1";         /* override logging level in base.cpp */
  1080.  
  1081. #include "zerobase.cpp"
  1082.  
  1083. /**********************************************
  1084.  **  Machine dependent part of ruleset zero  **
  1085.  **********************************************/
  1086.  
  1087.     /* send berknet names through relay */
  1088.  
  1089.     if ( < @berkhost > : path )
  1090.         resolve ( mailer ( pcl ),
  1091.                 host ( $relay-host ),
  1092.                 user ( $2<@$1> ) );        /* @berkhost: ... */
  1093.  
  1094.     if ( anypath < @anypath berkhost > anypath )
  1095.         resolve ( mailer ( pcl ),
  1096.               host ( $relay-host ),
  1097.               user ( $1<@$2$3>$4 ) );    /* user@berknethost */
  1098.  
  1099.     /* we don't do uucp */
  1100.  
  1101.     if ( anypath < @anypath ".UUCP" > anypath )
  1102.         resolve ( mailer ( error ),
  1103.               user ( "Non-Local UUCP Mail Unavailable" ) );
  1104.  
  1105.     /* resolve campus names (actually, all non-local names) */
  1106.  
  1107.     if ( anypath < @anypath hostname > anypath )
  1108.         resolve ( mailer ( pcl ),
  1109.               host ( $3 ),
  1110.               user ( $1<@$2$3>$4 ) );    /* user@campushost */
  1111.  
  1112.     /* remaining names must be local */
  1113.  
  1114.     if ( path )
  1115.         resolve ( mailer ( local ),
  1116.               user ( $1 ) );        /* everything else */
  1117.  
  1118.  
  1119. /**************************************
  1120.  **  Host dependent address cleanup  **
  1121.  **************************************/
  1122.  
  1123. ruleset HOSTDEP_RW {
  1124.  
  1125.     if ( anypath uucphost!usr@path )
  1126.         retry ( $3@$4 );            /* drop uucp forward */
  1127.  
  1128.     if ( anypath campushost ".ARPA" anypath )
  1129.         retry ( $1$2$3 );            /* drop ".ARPA" */
  1130.  
  1131. }
  1132.  
  1133. #include "pclm.cpp"
  1134. SHAR_EOF
  1135. if test 2059 -ne "`wc -c pucc-i.mc`"
  1136. then
  1137. echo shar: error transmitting pucc-i.mc '(should have been 2059 characters)'
  1138. fi
  1139. cat << \SHAR_EOF > puccbase.cpp
  1140.  
  1141. /************************************************
  1142.  ************************************************
  1143.  ****
  1144.  ****    General configuration information
  1145.  ****
  1146.  ****    $Id: puccbase.cpp,v 1.4 86/04/04 14:25:46 kcs Exp $
  1147.  ****
  1148.  ************************************************
  1149.  ************************************************/
  1150.  
  1151. /********************
  1152.  *  General Macros  *
  1153.  ********************/
  1154.  
  1155. macro
  1156.     localname = "PURDUE.EDU";         /* local domain names */
  1157.     relay_host = "pucc-h";            /* berknet relay host */
  1158.     m_oname = "${m_sitename}";        /* my official hostname (sort of */
  1159.  
  1160. class
  1161.     localname = { "PURDUE.EDU", PURDUE, CC, Purdue-CS, CS, ECN };
  1162.     topdomain = { LOCAL, ARPA, UUCP, BITNET, CSNET };    /* known top-level domains */
  1163.  
  1164. #include "localhosts.cpp"
  1165. #include "berkhosts.cpp"
  1166. #include "base.cpp"
  1167.  
  1168. /*********************
  1169.  *  Rewriting rules  *
  1170.  *********************/
  1171.  
  1172. /*** special local conversions ***/
  1173. S6
  1174. # R$*<@$*$=D>$*        $1<@$2LOCAL>$4            convert local domain
  1175. # R$*<@$*$=D.ARPA>$*    $1<@$2LOCAL>$4
  1176. R$*<@$+.$=T.$=T>$*    $1<@$2.$3>$5            delete dup top level
  1177. R$*<@$*$=S.UUCP>$*    $1<@$2$3>$4            local UUCP direct
  1178. R$*<@$*$=Z.UUCP>$*    $1<@$2$3>$4            local UUCP direct
  1179. R$*<@$=Y$*>$*        $1<@cs$3>$4            cs-host => cs kludge
  1180.  
  1181.  
  1182. #include "localm.cpp"
  1183. SHAR_EOF
  1184. if test 1219 -ne "`wc -c puccbase.cpp`"
  1185. then
  1186. echo shar: error transmitting puccbase.cpp '(should have been 1219 characters)'
  1187. fi
  1188. chdir ..
  1189. cat << \SHAR_EOF > KEY
  1190.         USES FOR MACROS AND CLASSES
  1191.  
  1192.     MACROS                CLASSES
  1193.     ======                =======
  1194.  
  1195. A    arpanet name            arpanet names
  1196. B
  1197. C    comp ctr gateway (ucbvax only)    comp ctr hosts (ucbvax & jade only)
  1198.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1199. D    full local domain name        (bottom) local domain names  $locdomain
  1200. E
  1201. F    forwarding host, $R default    hosts that we cannot talk directly to
  1202.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1203. G
  1204. H    internet name            all names this host is known by
  1205. I
  1206.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1207. J
  1208. K
  1209. L
  1210.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1211. M
  1212. N    ncp gateway            list of ncp-only hosts
  1213. O
  1214.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1215. P
  1216. Q
  1217. R    relay host (e.g., ucbvax)
  1218.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1219. S                    known internet hostnames
  1220. T                    top level domains
  1221. U    uucp name            uucp names
  1222.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1223. V    a machine with local uucp link    uucp sites on $V machine
  1224. W    a machine with local uucp link    uucp sites on $W machine
  1225. X    a machine with local uucp link    uucp sites on $X machine
  1226.  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -  -
  1227. Y
  1228. Z    config version code        known berknet hosts    $berkhosts
  1229. SHAR_EOF
  1230. if test 1377 -ne "`wc -c KEY`"
  1231. then
  1232. echo shar: error transmitting KEY '(should have been 1377 characters)'
  1233. fi
  1234. cat << \SHAR_EOF > README
  1235. Ironically enough, PUCC doesn't yet use ease for our configuration
  1236. files.  These are approximations to what will eventually become
  1237. our configuration files.  They are not entirely finished, but the ones
  1238. in "FINIS" are pretty much done, according to what Jim Schoner said
  1239. before he left.  Someday I'll finish them...
  1240.  
  1241. Jeff Smith
  1242. SHAR_EOF
  1243. if test 327 -ne "`wc -c README`"
  1244. then
  1245. echo shar: error transmitting README '(should have been 327 characters)'
  1246. fi
  1247. cat << \SHAR_EOF > pucc-k.mc
  1248. /***********************************************************
  1249.  ***********************************************************
  1250.  ****
  1251.  ****    SENDMAIL CONFIGURATION FILE
  1252.  ****
  1253.  ****    For PUCC-K
  1254.  ****
  1255.  ****    $Id: pucc-k.mc,v 1.2 86/04/04 14:22:32 kcs Exp $
  1256.  ****
  1257.  ***********************************************************
  1258.  ***********************************************************/
  1259.  
  1260.  
  1261.  
  1262. /***********************************************************
  1263.  **    local info
  1264.  ***********************************************************/
  1265.  
  1266. /* internet hostname */
  1267. Dwk.cc.purdue.edu
  1268. Cwk.cc.purdue.edu pucc-k pucck k
  1269.  
  1270. #include "puccbase.cpp"
  1271.  
  1272. /* override logging level in base.cpp */
  1273. # OL1
  1274.  
  1275. #include "zerobase.cpp"
  1276.  
  1277. ################################################
  1278. ###  Machine dependent part of ruleset zero  ###
  1279. ################################################
  1280.  
  1281. # send berknet names through relay
  1282. R<@$=Z>:$+        $#pcl$@$R$:$2<@$1>        @berkhost: ...
  1283. R$*<@$*$=Z>$*        $#pcl$@$R$:$1<@$2$3>$4        user@berknethost
  1284.  
  1285. # we don't do uucp 
  1286. R$*<@$*.UUCP>$*        $#error$:Non-Local UUCP Mail Unavailable
  1287.  
  1288. # resolve campus names (actually, all non-local names)
  1289. R$*<@$*$->$*        $#pcl$@$3$:$1<@$2$3>$4        user@campushost
  1290.  
  1291. # remaining names must be local
  1292. R$+            $#local$:$1            everything else
  1293.  
  1294. ########################################
  1295. ###  Host dependent address cleanup  ###
  1296. ########################################
  1297.  
  1298. S8
  1299. R$*$=U!$+@$+        $3@$4                drop uucp forward
  1300. R$*$=S.ARPA$*        $1$2$3                drop ".ARPA"
  1301.  
  1302.  
  1303. include(pclm.cpp)
  1304. SHAR_EOF
  1305. if test 1462 -ne "`wc -c pucc-k.mc`"
  1306. then
  1307. echo shar: error transmitting pucc-k.mc '(should have been 1462 characters)'
  1308. fi
  1309. cat << \SHAR_EOF > pucc-n.mc
  1310. /***********************************************************
  1311.  ***********************************************************
  1312.  ****
  1313.  ****    SENDMAIL CONFIGURATION FILE
  1314.  ****
  1315.  ****    For PUCC-N
  1316.  ****
  1317.  ****    $Id: pucc-n.mc,v 1.2 86/04/04 14:23:57 kcs Exp $
  1318.  ****
  1319.  ***********************************************************
  1320.  ***********************************************************/
  1321.  
  1322.  
  1323.  
  1324. /***********************************************************
  1325.  **    local info
  1326.  ***********************************************************/
  1327.  
  1328. /* internet hostname */
  1329. Dwn.cc.purdue.edu
  1330. Cwn.cc.purdue.edu pucc-n puccn n
  1331.  
  1332. #include "puccbase.cpp"
  1333.  
  1334. # override logging level in base.cpp
  1335. # OL1
  1336.  
  1337. include(zerobase.cpp)
  1338.  
  1339. ################################################
  1340. ###  Machine dependent part of ruleset zero  ###
  1341. ################################################
  1342.  
  1343. # send berknet names through relay
  1344. R<@$=Z>:$+        $#pcl$@$R$:$2<@$1>        @berkhost: ...
  1345. R$*<@$*$=Z>$*        $#pcl$@$R$:$1<@$2$3>$4        user@berknethost
  1346.  
  1347. # we don't do uucp 
  1348. R$*<@$*.UUCP>$*        $#error$:Non-Local UUCP Mail Unavailable
  1349.  
  1350. # resolve campus names (actually, all non-local names)
  1351. R$*<@$*$->$*        $#pcl$@$3$:$1<@$2$3>$4        user@campushost
  1352.  
  1353. # remaining names must be local
  1354. R$+            $#local$:$1            everything else
  1355.  
  1356. ########################################
  1357. ###  Host dependent address cleanup  ###
  1358. ########################################
  1359.  
  1360. S8
  1361. R$*$=U!$+@$+        $3@$4                drop uucp forward
  1362. R$*$=S.ARPA$*        $1$2$3                drop ".ARPA"
  1363.  
  1364.  
  1365. include(pclm.cpp)
  1366. SHAR_EOF
  1367. if test 1456 -ne "`wc -c pucc-n.mc`"
  1368. then
  1369. echo shar: error transmitting pucc-n.mc '(should have been 1456 characters)'
  1370. fi
  1371. cat << \SHAR_EOF > pucc-s.mc
  1372. /***********************************************************
  1373.  ***********************************************************
  1374.  ****
  1375.  ****    SENDMAIL CONFIGURATION FILE
  1376.  ****
  1377.  ****    For PUCC-S
  1378.  ****
  1379.  ****    $Id: pucc-s.mc,v 1.1 86/03/31 11:16:37 kcs Exp Locker: kcs $
  1380.  ****
  1381.  ***********************************************************
  1382.  ***********************************************************/
  1383.  
  1384.  
  1385.  
  1386. /***********************************************************
  1387.  **    local info
  1388.  ***********************************************************/
  1389.  
  1390. /* internet hostname */
  1391. Dws.cc.purdue.edu
  1392. Cws.cc.purdue.edu pucc-s puccs s
  1393.  
  1394. #include "puccbase.cpp"
  1395.  
  1396. /* override logging level in base.cpp */
  1397. # OL1
  1398.  
  1399. include(zerobase.cpp)
  1400.  
  1401. ################################################
  1402. ###  Machine dependent part of ruleset zero  ###
  1403. ################################################
  1404.  
  1405. # send berknet names through relay
  1406. R<@$=Z>:$+        $#pcl$@$R$:$2<@$1>        @berkhost: ...
  1407. R$*<@$*$=Z>$*        $#pcl$@$R$:$1<@$2$3>$4        user@berknethost
  1408.  
  1409. # we don't do uucp 
  1410. R$*<@$*.UUCP>$*        $#error$:Non-Local UUCP Mail Unavailable
  1411.  
  1412. # resolve campus names (actually, all non-local names)
  1413. R$*<@$*$->$*        $#pcl$@$3$:$1<@$2$3>$4        user@campushost
  1414.  
  1415. # remaining names must be local
  1416. R$+            $#local$:$1            everything else
  1417.  
  1418. ########################################
  1419. ###  Host dependent address cleanup  ###
  1420. ########################################
  1421.  
  1422. S8
  1423. R$*$=U!$+@$+        $3@$4                drop uucp forward
  1424. R$*$=S.ARPA$*        $1$2$3                drop ".ARPA"
  1425.  
  1426.  
  1427. include(pclm.cpp)
  1428. SHAR_EOF
  1429. if test 1472 -ne "`wc -c pucc-s.mc`"
  1430. then
  1431. echo shar: error transmitting pucc-s.mc '(should have been 1472 characters)'
  1432. fi
  1433. cat << \SHAR_EOF > puccbase.cpp
  1434.  
  1435. /************************************************
  1436.  ************************************************
  1437.  ****
  1438.  ****    General configuration information
  1439.  ****
  1440.  ****    $Id: puccbase.cpp,v 1.4 86/04/04 14:25:46 kcs Exp $
  1441.  ****
  1442.  ************************************************
  1443.  ************************************************/
  1444.  
  1445. /********************
  1446.  *  General Macros  *
  1447.  ********************/
  1448.  
  1449. macro
  1450.     localname = "PURDUE.EDU";         /* local domain names */
  1451.     relay_host = "pucc-h";            /* berknet relay host */
  1452.     m_oname = "${m_sitename}";        /* my official hostname (sort of */
  1453.  
  1454. class
  1455.     localname = { "PURDUE.EDU", PURDUE, CC, Purdue-CS, CS, ECN };
  1456.     topdomain = { LOCAL, ARPA, UUCP, BITNET, CSNET };    /* known top-level domains */
  1457.  
  1458. #include "localhosts.cpp"
  1459. #include "berkhosts.cpp"
  1460. #include "base.cpp"
  1461.  
  1462. /*********************
  1463.  *  Rewriting rules  *
  1464.  *********************/
  1465.  
  1466. /*** special local conversions ***/
  1467. S6
  1468. # R$*<@$*$=D>$*        $1<@$2LOCAL>$4            convert local domain
  1469. # R$*<@$*$=D.ARPA>$*    $1<@$2LOCAL>$4
  1470. R$*<@$+.$=T.$=T>$*    $1<@$2.$3>$5            delete dup top level
  1471. R$*<@$*$=S.UUCP>$*    $1<@$2$3>$4            local UUCP direct
  1472. R$*<@$*$=Z.UUCP>$*    $1<@$2$3>$4            local UUCP direct
  1473. R$*<@$=Y$*>$*        $1<@cs$3>$4            cs-host => cs kludge
  1474.  
  1475.  
  1476. #include "localm.cpp"
  1477. SHAR_EOF
  1478. if test 1219 -ne "`wc -c puccbase.cpp`"
  1479. then
  1480. echo shar: error transmitting puccbase.cpp '(should have been 1219 characters)'
  1481. fi
  1482. cat << \SHAR_EOF > stat-l.mc
  1483. ############################################################
  1484. ############################################################
  1485. #####
  1486. #####    SENDMAIL CONFIGURATION FILE
  1487. #####
  1488. #####    For STAT-L
  1489. #####
  1490. #####    $Id: stat-l.mc,v 1.2 86/04/04 14:27:47 kcs Exp $
  1491. #####
  1492. ############################################################
  1493. ############################################################
  1494.  
  1495.  
  1496.  
  1497. ############################################################
  1498. ###    local info
  1499. ############################################################
  1500.  
  1501. # internet hostname
  1502. Dwstat-l
  1503. Cwstat-l statl l stat
  1504.  
  1505. include(puccbase.cpp)
  1506.  
  1507. include(zerobase.cpp)
  1508.  
  1509. ################################################
  1510. ###  Machine dependent part of ruleset zero  ###
  1511. ################################################
  1512.  
  1513. # send berknet names through relay
  1514. R<@$=Z>:$+        $#pcl$@$R$:$2<@$1>        @berkhost: ...
  1515. R$*<@$*$=Z>$*        $#pcl$@$R$:$1<@$2$3>$4        user@berknethost
  1516.  
  1517. # we don't do uucp 
  1518. R$*<@$*.UUCP>$*        $#error$:Non-Local UUCP Mail Unavailable
  1519.  
  1520. # resolve campus names (actually, all non-local names)
  1521. R$*<@$*$->$*        $#pcl$@$3$:$1<@$2$3>$4        user@campushost
  1522.  
  1523. # remaining names must be local
  1524. R$+            $#local$:$1            everything else
  1525.  
  1526. ########################################
  1527. ###  Host dependent address cleanup  ###
  1528. ########################################
  1529.  
  1530. S8
  1531. R$*$=U!$+@$+        $3@$4                drop uucp forward
  1532. R$*$=S.ARPA$*        $1$2$3                drop ".ARPA"
  1533.  
  1534.  
  1535. include(pclm.cpp)
  1536. SHAR_EOF
  1537. if test 1384 -ne "`wc -c stat-l.mc`"
  1538. then
  1539. echo shar: error transmitting stat-l.mc '(should have been 1384 characters)'
  1540. fi
  1541. cat << \SHAR_EOF > tcpm.cpp
  1542.  
  1543. /***********************************************************
  1544.  ***********************************************************
  1545.  ****
  1546.  ****    Arpanet TCP Mailer specification
  1547.  ****
  1548.  ****    Messages processed by this specification are assumed to leave
  1549.  ****    the local domain -- hence, they must be canonical according to
  1550.  ****    RFC822 etc.
  1551.  ****
  1552.  ****    $Id: tcpm.cpp,v 1.5 86/04/04 14:29:16 kcs Exp $
  1553.  ****
  1554.  ***********************************************************
  1555.  ***********************************************************/
  1556.  
  1557. #ifndef cppCOMPAT
  1558. #include "compat.cpp"
  1559. #endif
  1560.  
  1561. mailer
  1562.     tcp { Path    = "[IPC]",
  1563.           Flags    = { f_mult, f_date, f_from, f_mesg, f_upperu,
  1564.                 f_dot, f_llimit },
  1565.           Sender    = MAP_RW,
  1566.           Recipient = MAP_RW,
  1567.           Argv    = "IPC ${m_rhost}",
  1568.           Eol    = "\r\n",
  1569.           Maxsize    = "100000"
  1570.     };
  1571.  
  1572.  
  1573. ruleset MAP_RW {
  1574.  
  1575.     /* pass <route-addr>'s through */
  1576.  
  1577.     /***
  1578.     if ( < @path > anypath )
  1579.         return ( <@canon($1)>$2 );        /* resolve <route-addr> */
  1580.  
  1581.     if ( < @path > anypath )
  1582.         return ( <@$1>$2 );            /* resolve <route-addr> */
  1583.  
  1584.     /* map colons to dots everywhere..... */
  1585.  
  1586.     if ( anypath : anypath )
  1587.         retry ( $1.$2 );            /* map colons to dots */
  1588.  
  1589.     /* handle the simple case.... */
  1590.  
  1591.     /***
  1592.     if ( path < @hostname ".ARPA" > )
  1593.         return ( $1<@canon($2".ARPA")> );    /* user@host.ARPA */
  1594.  
  1595.     if ( path < @hostname ".ARPA" > )
  1596.         return ( $1<@$2".ARPA"> );        /* user@host.ARPA */
  1597.  
  1598.     /***
  1599.     if ( path < @hostpath ".LOCAL" > )
  1600. # R$+<@$+.LOCAL>    $@$1%$2<@$A>            local hosts
  1601. # R$+<@$+.BITNET>    $@$1%$2.BITNET<@$A>        user@host.BITNET
  1602. # R$+<@$+.CSNET>    $@$1.$2<@CSNET-RELAY.ARPA>    user@host.CSNET
  1603.  
  1604. # handle other external cases
  1605. # R$+<@$->        $@$1<@$[$2$]>            no .ARPA on simple names
  1606. R$+<@$->        $@$1<@$2>            no .ARPA on simple names
  1607. R$+<@$+.$->        $@$1<@$2$3>            already ok (we think)
  1608. # R$+<@$+.$-.ARPA>    $@$1%$2<@$[$3.ARPA$]>        approximate something
  1609. R$+<@[$+]>        $@$1<@[$2]>            already ok
  1610.  
  1611. # convert remaining addresses to old format and externalize appropriately
  1612. R$+            $:$>5$1                => old format
  1613. R$-:$+            $@$1.$2<@$A.$D>            convert berk hosts
  1614. R$*            $@$1<@$A.$D>            tack on our host name
  1615. SHAR_EOF
  1616. if test 2055 -ne "`wc -c tcpm.cpp`"
  1617. then
  1618. echo shar: error transmitting tcpm.cpp '(should have been 2055 characters)'
  1619. fi
  1620. chdir ..
  1621. #    End of shell archive
  1622. exit 0
  1623.  
  1624.