home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume25 / ease3.5 / part01 next >
Encoding:
Internet Message Format  |  1991-12-09  |  56.6 KB

  1. Subject:  v25i017:  Ease 3.5 - high-level sendmail.cf language, Part01/06
  2. Newsgroups: comp.sources.unix
  3. Approved: vixie@pa.dec.com
  4.  
  5. Submitted-by: Bruce G. Barnett <barnett@crdgw1.ge.com>
  6. Posting-number: Volume 25, Issue 17
  7. Archive-name: ease3.5/part01
  8.  
  9. If you would like to write:
  10.  
  11.         if ( exactly_one ! one_or_more )        /* uucphost!user */
  12.                 return (RULESET_6 ($2<@$1."uucp">));
  13.  
  14. ...instead of:
  15.  
  16.     R$-!$+        $@$>6$2<@$1.uucp>    uucphost!user
  17.  
  18. ...then you want this package.  If you don't understand the above, you may
  19. want to unpack this and look at it, since it provides an excellent high-
  20. level way of looking at the otherwise inscrutable sendmail.cf philosophy.
  21.  
  22. This is Ease 3.5, and it includes a "decompiler" that lets you start from
  23. your existing ("working") sendmail.cf.  You can translate your existing
  24. sendmail.cf into "ease", edit it as "ease" code, and then translate it back.
  25. It's never been safer to try something new.
  26.  
  27.                                 --mod
  28.  
  29. #! /bin/sh
  30. # This is a shell archive.  Remove anything before this line, then unpack
  31. # it by saving it into a file and typing "sh file".  To overwrite existing
  32. # files, type "sh file -c".  You can also feed this as standard input via
  33. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  34. # will see the following message at the end:
  35. #        "End of archive 1 (of 6)."
  36. # Contents:  MANIFEST README TESTING TODO bin cfc cfc/Makefile debug
  37. #   debug/Makefile debug/debug.in debug/showhow debug/showwhere doc
  38. #   doc/Makefile doc/ap1 doc/ap2 doc/ap3 doc/ap4 doc/cover
  39. #   doc/ease.man doc/et.man src src/fixstrings.c src/fixstrings.h
  40. #   src/symtab.h test test/README test/args test/test.addresses
  41. #   test/test.cf utils utils/Makefile utils/build-new-aliases
  42. #   utils/cfdiff.sh utils/cfstrip.sh
  43. # Wrapped by vixie@cognition.pa.dec.com on Tue Dec 10 08:45:55 1991
  44. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  45. if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  46.   echo shar: Will not clobber existing file \"'MANIFEST'\"
  47. else
  48. echo shar: Extracting \"'MANIFEST'\" \(1739 characters\)
  49. sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
  50. X   File Name        Archive #    Description
  51. X-----------------------------------------------------------
  52. X CONVERTING                 2    
  53. X INTRO                      3    
  54. X MANIFEST                   1    
  55. X Makefile                   2    
  56. X README                     1    
  57. X TESTING                    1    
  58. X TODO                       1    
  59. X bin                        1    
  60. X cfc                        1    
  61. X cfc/Makefile               1    
  62. X cfc/cfc.c                  6    
  63. X debug                      1    
  64. X debug/Makefile             1    
  65. X debug/debug.in             1    
  66. X debug/showhow              1    
  67. X debug/showwhere            1    
  68. X doc                        1    
  69. X doc/Makefile               1    
  70. X doc/ap1                    1    
  71. X doc/ap2                    1    
  72. X doc/ap3                    1    
  73. X doc/ap4                    1    
  74. X doc/cfc.man                2    
  75. X doc/cover                  1    
  76. X doc/ease.man               1    
  77. X doc/ease.paper             5    
  78. X doc/et.man                 1    
  79. X src                        1    
  80. X src/Makefile               2    
  81. X src/ease.sh                2    
  82. X src/emitcf.c               3    
  83. X src/errors.c               2    
  84. X src/fixstrings.c           1    
  85. X src/fixstrings.h           1    
  86. X src/idman.c                2    
  87. X src/lexan.l                3    
  88. X src/lexan.patch            2    
  89. X src/main.c                 3    
  90. X src/parser.y               4    
  91. X src/strops.c               3    
  92. X src/symtab.c               2    
  93. X src/symtab.h               1    
  94. X test                       1    
  95. X test/README                1    
  96. X test/args                  1    
  97. X test/test.addresses        1    
  98. X test/test.cf               1    
  99. X test/test.mc               2    
  100. X utils                      1    
  101. X utils/Makefile             1    
  102. X utils/build-new-aliases    1    
  103. X utils/cfdiff.sh            1    
  104. X utils/cfstrip.sh           1    
  105. END_OF_FILE
  106. if test 1739 -ne `wc -c <'MANIFEST'`; then
  107.     echo shar: \"'MANIFEST'\" unpacked with wrong size!
  108. fi
  109. # end of 'MANIFEST'
  110. fi
  111. if test -f 'README' -a "${1}" != "-c" ; then 
  112.   echo shar: Will not clobber existing file \"'README'\"
  113. else
  114. echo shar: Extracting \"'README'\" \(9927 characters\)
  115. sed "s/^X//" >'README' <<'END_OF_FILE'
  116. This is release 3.5 of the CFC and Ease programs.
  117. X
  118. XEase is a compiler for sendmail configuration files.  It reads a high-level
  119. mail configuration language and produces a sendmail.cf file.  If you've ever
  120. stared at a sendmail.cf, you know why this is valuable.
  121. X
  122. Cfc is performs the inverse operation: it converts sendmail.cf files
  123. into source for ease.  Combined with ease it allows you to convert a
  124. sendmail.cf file into a more readable format, which you can edit and
  125. convert back into sendmail.cf for installation.
  126. X
  127. There is no longer a reason to complain about the syntax of sendmail.cf files.
  128. X
  129. This is a complete posting of the entire source for 'ease' and "cfc'.
  130. It incorporates all of the previous netwide posting (version 2.0),
  131. plus some additional support for new and undocumented sendmail features.
  132. It supports several vendor-specific versions of Sendmail.
  133. X
  134. X
  135. X
  136. XEase was originally written by James S. Schoner, 
  137. X    Purdue University Computing Center,
  138. X    West Lafayette, Indiana  47907
  139. XEase 3.0 was developed by Bruce G. Barnett and has been enhanced and
  140. maintained by various persons, most notably
  141. X    Arnold D. Robbins (arnold@unix.cc.emory.edu),
  142. X    Stephen Schaefer of Bowling Green State University,
  143. X    Raymond A. Schnitzler of Bellcore,
  144. X    Andrew Partan of the Corporation for Open Systems,
  145. X    Rich Salz of Bolt Beranak, and Newman.
  146. X    bent@lccinc.UUCP (Ben Taylor)
  147. X    "Jonathan I. Kamens" <jik@pit-manager.mit.edu>
  148. X    Matt Heffron <heffron@falstaff.css.beckman.com>
  149. X    William Roberts <liam@cs.qmw.ac.uk>
  150. X    rainer@flyer.uni-duisburg.de (Rainer Bieniek)
  151. X    agq@dstos3.dsto.oz.au (Ashleigh Quick)
  152. X
  153. Cfc was written by Arnold D. Robbins, and has been enhanced by Bruce Barnett
  154. X(see below).
  155. X
  156. Notable changes to cfc since release 2.0 are described in the note
  157. from Bruce Barnett below.
  158. X
  159. X
  160. X    -----------------------------------------------------------
  161. X
  162. X            Ease 3.5 Release Notes:
  163. X        Bruce G. Barnett <barnett@crdgw1.ge.com>
  164. X            November 1991
  165. X
  166. I sent some patches to the authors of Ease several years ago, but they never 
  167. released them. I now have their permission to be the current maintainer of 
  168. XEase and cfc.  Most of the changes to Ease since 2.0 have been mine, with 
  169. some generous patches sent in from the people described above.
  170. X
  171. The main enhancement I added to Ease 3.0:
  172. X
  173. X
  174. X    I subjected the Cfc/Ease programs to a test suite
  175. X    that converted *.cf files to ease files, and back again.
  176. X    I compared the input of cfc  (The original .cf file)
  177. X    to the output of ease. The goal was twofold:
  178. X
  179. X        1. To automatically produce an Ease file than can
  180. X           be used to generate a .cf file identical to the original
  181. X        2. To produce an Ease file that can be used without
  182. X            editing. You will see warnings, and possible errors 
  183. X            that came from the vendor's supplied sendmail.cf
  184. X            file. But in a few minutes time, you should have a 
  185. X            working, and error free, ease version of your 
  186. X            sendmail.cf file.
  187. X
  188. X    In other words, you can start using ease as a high level
  189. langauge and feel confident that you won't break anything.
  190. X    
  191. X
  192. Current status of Ease 3.5
  193. X    It will handle 100% of the standard Ultrix, SunOS, HP, and Berkeley
  194. X    versions of sendmail (I hope). It handles 99.5% of the IDA
  195. X    enhancement package. It compiles of dozens of different machines.
  196. X    See the TODO file for problems.
  197. X
  198. X    I don't plan to do any major work maintaining this package,
  199. but I will gladly accept bug fixes and enhancements.
  200. X
  201. New features of the Ease grammar at a glance:
  202. X
  203. Added asm("") command. This can be used to insert something strange into
  204. X    the sendmail file. Or something Ease or cfc is too stupid to
  205. X    translate properly. This is the work-around for the new/fancy
  206. X    stuff.
  207. X
  208. XExample:
  209. X    asm("Dq$?x$!x <$g>$|$g$.");
  210. X
  211. Added eval()    [$&]
  212. X
  213. SunOS 4.0 support:
  214. X    Added m_domain
  215. X    Added o_maxempty
  216. X    Added o_maxhops    
  217. X    Added o_nfs    
  218. X    Added o_aliasfile
  219. X    Added ypmap()    [${   $} on RHS]
  220. X
  221. X    Added default definitions of
  222. X        any_in_etc_hosts
  223. X        any_in_mydomainname
  224. X        any_in_myhostname
  225. X
  226. Ultrix 3.0 support:
  227. X    Added f_mail11
  228. X    Added ypalias()  [${ on LHS]
  229. X    Added yppasswd() [$" on LHS]
  230. X
  231. HP/UX support:
  232. X    added o_nameserver    OI
  233. X    added program()        $<
  234. X
  235. IDA support:
  236. X    Added f_relativize
  237. X    Added m_uucpname
  238. X    Added o_envelope
  239. X    Added f_bsmtp
  240. X    Support for Header/Envelope re-write rulesets (S=20/21)
  241. X    alias()            $(@    in RHS
  242. X    quote()            $!    in headers
  243. X
  244. X    resolved():
  245. X    #     if (resolved( one_or_more ))    /* found one, return it */
  246. X    #         resolve (mailer ($1));
  247. X    R$#$+    $#$1
  248. X
  249. X    nested rulesets:
  250. X    #     if ( one_or_more @. one_or_more ? one_or_more )    /* relativize & return */
  251. X    #         resolve (mailer (TCP),
  252. X    #                 host ($3 ),
  253. X    #                 user (retry (RULESET_28($1@.$2))));
  254. X    R$+@.$+?$+    $#TCP$@$3$:$>28 $1@.$2
  255. X                user (retry (RULESET_28($1@.$2))));
  256. X
  257. X    canon with default value:
  258. X    #     if ( one_or_more @ exactly_one )    /* host: try name server */
  259. X    #         return ( $1@ canon ( $2 default (  $2."UUCP ")));
  260. X    R$+@$-    $@$1@$[$2$:$2.UUCP $]
  261. X
  262. X
  263. X
  264. X----------------
  265. General Improvements to the Ease Program:
  266. X    Improved reporting of syntax errors
  267. X    Built in use of /lib/cpp
  268. X        if et is given a CPP flag, it will call it.
  269. X    If a macro is a single upper case letter, and has not been defined
  270. X    the letter assigned to it will be the same as the macro name.
  271. X    This allows the original input file to be compared to the ease
  272. X    output.
  273. X
  274. X    There have been some substantial changes to the grammar handling.
  275. X    Several improvements have been made to the error reporting.
  276. X    In addition, ease supports the -d flag, which is used to debug
  277. X    the parser.  (See the makefile if you are interested in this.)
  278. X
  279. X    Several bugs were fixed, including a lot of problems with the ifset()
  280. X    construct. It's still not perfect. See the manual page for cfc(local)
  281. X
  282. X----------------------------
  283. Changes to CFC (Sendmail.cf to ease translator):
  284. X
  285. X    Added new flags to cfc:
  286. X    -s => SunOS
  287. X    -i => IDA sendmail
  288. X    -d => Ultrix
  289. X    -C [..] => add predefined classes 
  290. X        e.g. -C ADG => added classes A, B, and G
  291. X
  292. See the file CONVERTING on tips to convert your sendmail file into ease.
  293. I have included some scripts that can compare the original sendmail
  294. file to the output of ease. If the rules are identical, then you can
  295. feel comfortable using ease instead of raw cf.
  296. X
  297. X
  298. X--------------
  299. I have included the document TESTING, along with some
  300. shellscripts that I use to perform regression testing of sendmail.
  301. When I make a major change to my sendmail rules, I run a series of
  302. addresses through sendmail and look at the differences. This way I can
  303. check for address rewrite errors before I install a new version.
  304. X
  305. I have also include a document called INTRO, that gives a simple
  306. introduction to sendmail. You may want to look at the file
  307. X    debug/Makefile
  308. as this gives you an example how I do it.
  309. X
  310. This package also includes two more goodies:
  311. X
  312. X    build-new-aliases - this is a shell script I use to 
  313. X        kill sendmail, rebuild the aliases, and restart
  314. X        sendmail. The problem is sometimes a kill -15 won't
  315. X        immediately stop sendmail from running. This gives
  316. X        the daemons a change to clean up first.
  317. X
  318. Also - see the directory test. This includes a shell script to test
  319. sendmail files, written by Simon Kenyon. You have two ways to debug
  320. sendmail files now!
  321. X
  322. X
  323. Release Notes:
  324. X
  325. X    3.5:    Documentation and Copyright changes, 
  326. X        doc/makefile changed
  327. X    3.4:
  328. X        generate error if the number of positional parameters on 
  329. X        the RHS don't match the LHS, i.e. 
  330. X            if (  <@ any_in_myhostname . "LOCAL">: one_or_more)
  331. X                next ($3); /* should be $2 */
  332. X    3.3:
  333. X        Support for $? $| $. on LHS
  334. X            added warning if $. is missing
  335. X        Support for $? after $#
  336. X        Fix DATA_RW compile option
  337. X        Eliminate warnings about "LOCAL" and "ERROR" 
  338. X            mailers being undefined. Case doesn't matter.
  339. X            but I don't want to convert to lower because the cfdiff
  340. X            might complain
  341. X    3.2:
  342. X    Added better support for IDA sendmail
  343. X    Added better support for unusual values in mailer flags, and options
  344. X    Better BSD/SYSV Portability (See the Makefile)
  345. X    Better support for those machines with read only text areas.
  346. X        (See compile flag DATA_RW in makefile)
  347. X    The cfstrip and cfdiff script was improved
  348. X    The documentation was improved
  349. X
  350. Release 3.1:
  351. X    Fixed bug with machines that didn't like free(0).
  352. X    Other portability problems
  353. X    Added support for MALLOC_DEBUG flag
  354. X
  355. Release 3.0:
  356. X    First release of Bruce's changes to the net in alt.sources
  357. X
  358. X
  359. X
  360. NOTE:
  361. X
  362. on some systems (e.g. SunOS) , you will get the warning:
  363. X    make: Warning: Infinite loop: Target `lexdefs.h' depends on itself
  364. This is okay. If the line was removed, Make wouldn't work on other machines.
  365. Better a warning than an error on other machines.
  366. X
  367. X============================================================================
  368. X
  369. If you find these programs useful, or if you have suggestions or changes,
  370. please drop me a line. I would really appreciate any patches to this
  371. package. I will merge any patches and release new versions, as they
  372. are sent to me. 
  373. X
  374. X    Bruce Barnett
  375. X    General Electric
  376. X    Corporate Research and Development
  377. X    P. O. Box 8, 1 River Road
  378. X    Schenectady, NY 12301
  379. X
  380. X    barnett@crd.ge.com
  381. X
  382. X
  383. X
  384. XEase was originally written by
  385. X    James S. Schoner, Purdue University Computing Center,
  386. X              West Lafayette, Indiana  47907
  387. and is copyright (c) 1985 by Purdue Research Foundation.
  388. Redistribution and use in source and binary forms are permitted
  389. provided that: (1) source distributions retain this entire copyright
  390. notice and comment, and (2) distributions including binaries display
  391. the following acknowledgement:  ``This product includes software
  392. developed by Purdue University, Indiana and its contributors''
  393. in the documentation or other materials provided with the distribution
  394. and in all advertising materials mentioning features or use of this
  395. software. Neither the name of the University nor the names of its
  396. contributors may be used to endorse or promote products derived
  397. from this software without specific prior written permission.
  398. THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
  399. IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
  400. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
  401. END_OF_FILE
  402. if test 9927 -ne `wc -c <'README'`; then
  403.     echo shar: \"'README'\" unpacked with wrong size!
  404. fi
  405. # end of 'README'
  406. fi
  407. if test -f 'TESTING' -a "${1}" != "-c" ; then 
  408.   echo shar: Will not clobber existing file \"'TESTING'\"
  409. else
  410. echo shar: Extracting \"'TESTING'\" \(2305 characters\)
  411. sed "s/^X//" >'TESTING' <<'END_OF_FILE'
  412. X    Testing Sendmail Configuration files
  413. X
  414. I have written some shell scripts called "showhow" and "showwhere"
  415. that can be used to test your sendmail configuration file.
  416. X
  417. You create an input file with a set of addresses to test.  You run the
  418. script and it generates an output file, showing the results of each
  419. address. When I make a major change to a sendmail file, I run the test
  420. suite on it, comparing the results with the last time I tested the
  421. address. I can use this to see in any of the 400 addresses in my test
  422. suite will behave differently with the new configuration file. My
  423. addresses won't help you, so you have to be creative and add your own.
  424. Here are some guidelines.
  425. X
  426. The format or the input file debug.in is:
  427. X        rulesets    address
  428. X    or
  429. X        rulesets        address comment
  430. X
  431. Use the second if ruleset does not start with a '0'. I'll explain this later.
  432. X
  433. X    Example:
  434. X
  435. X        0    user@some.do.main
  436. X        0    site!user%site2@site3.com
  437. X        22,4    user@localsite    Sender_via_UUCP
  438. X
  439. where 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
  440. X
  441. Ruleset 0 must be avoided when testing the re-write rules for mailers
  442. because ruleset 0 outputs a triple (user, host, mailer), and only one
  443. part (user) passed to the mailers. Therefore you would typically have
  444. ruleset 0 when testing resolution decisions, and omit it when testing
  445. for mailer re-writes like UUCP and TCP final delivery.
  446. X
  447. Some newer versions of sendmail do not automatically run ruleset 3 when
  448. in debugging mode. You will have to add '3,' before each rule.
  449. X
  450. The makefile generates a file in tbl(1) format that 
  451. lists the following:
  452. X
  453. X    ruleset        address      mailer hostname user
  454. X
  455. Showing the resolved triplet for each address
  456. X
  457. I think the scripts I have will work on IDA, SunOS 4.0, and Ultrix 3.0
  458. sendmail executables. The problem is that older sendmails output debug
  459. info using ^V, etc. instead of $#.  The script is set up to work with
  460. Ultrix 3.0.  The sendmail with SunOS used a different set of
  461. characters to indicate the results of a rule (^W instead of ^V).
  462. X
  463. I have set up a makefile in the debug directory that you can use
  464. X    
  465. X    make     - tests your sendmail file against a known good file
  466. X        good.out. Once you have a working set of rules, copy
  467. X        debug.out to good.out
  468. X
  469. X    make report     will print a table of all of the addresses                resolved to the address, mailer, and hostname
  470. X
  471. END_OF_FILE
  472. if test 2305 -ne `wc -c <'TESTING'`; then
  473.     echo shar: \"'TESTING'\" unpacked with wrong size!
  474. fi
  475. # end of 'TESTING'
  476. fi
  477. if test -f 'TODO' -a "${1}" != "-c" ; then 
  478.   echo shar: Will not clobber existing file \"'TODO'\"
  479. else
  480. echo shar: Extracting \"'TODO'\" \(1886 characters\)
  481. sed "s/^X//" >'TODO' <<'END_OF_FILE'
  482. Things to do for Ease 3.?
  483. X-------------------------
  484. X
  485. X
  486. XFix the following constructs so that cfc/et handles the conversion properly:
  487. X
  488. X    # indirect macros, i.e. 
  489. X    DMroot
  490. X    T$M
  491. X
  492. XEliminate the concat() construct, if possible.
  493. X
  494. check for if (exactly_one) next($2); type error.
  495. check for matching < and > in rulesets
  496. Check for mailers "local" and "prog" 
  497. X
  498. Add the new IDA/sendmail macro $m
  499. X
  500. X    A new macro, $m, has been defined.  For single recipients in
  501. X    a local mail delivery, it's value is the original address before
  502. X    aliasing.  If all recipients for the current transaction derive
  503. X    from a single original recipient, use that for $m.  Else make
  504. X    $m undefined (to preserve Bcc: privacy).
  505. X
  506. X    The Received header now has 'for $m' in place of 'for $u'.  The
  507. X    new code release supports $m as the recipient prior to aliasing.
  508. X    This will not cause any problems with earlier code releases, except
  509. X    that the 'for user' will no appear on the header unless you change
  510. X    this back to $u.
  511. X
  512. X
  513. Add the IDA Os option:
  514. X
  515. X    If Os (SuperSafe) is set in the sendmail.cf file, files in the spool
  516. X    area will either be open()ed with O_SYNC set or fsync()ed prior
  517. X    to close.
  518. X
  519. IDA:
  520. X    Simon J Gerraty (sjg@melb.bull.oz.au) contributed patch for SUN's
  521. X    $%x and $!x features ($!x added as $^x).
  522. X
  523. X    * delayed macro evaluation using $&x syntax
  524. X    * RFC822 quoted macro expansion using $!x syntax
  525. X
  526. X
  527. Silicon Graphics:
  528. X    Add the $[! lookup operator for pathalias
  529. CFC improvements
  530. X    Make it a real two-pass parser. This way, it can
  531. X    properly specify the rulesets, macros, and classes it
  532. X    needs. Or else write a shell script that determines which rulesets,
  533. X    macros, and classes are needed.
  534. X
  535. XError Detections
  536. X    Eliminate syntax errors that just report "syntax error"    
  537. X
  538. Regression Testing script:
  539. X
  540. X    rewrite it into perl for speed
  541. X
  542. X--
  543. Bruce G. Barnett        <barnett@crdgw1.ge.com>  a.k.a.
  544. X<barnett@[192.35.44.4]>  uunet!crdgw1!barnett
  545. END_OF_FILE
  546. if test 1886 -ne `wc -c <'TODO'`; then
  547.     echo shar: \"'TODO'\" unpacked with wrong size!
  548. fi
  549. # end of 'TODO'
  550. fi
  551. if test ! -d 'bin' ; then
  552.     echo shar: Creating directory \"'bin'\"
  553.     mkdir 'bin'
  554. fi
  555. if test ! -d 'cfc' ; then
  556.     echo shar: Creating directory \"'cfc'\"
  557.     mkdir 'cfc'
  558. fi
  559. if test -f 'cfc/Makefile' -a "${1}" != "-c" ; then 
  560.   echo shar: Will not clobber existing file \"'cfc/Makefile'\"
  561. else
  562. echo shar: Extracting \"'cfc/Makefile'\" \(934 characters\)
  563. sed "s/^X//" >'cfc/Makefile' <<'END_OF_FILE'
  564. CC          =    cc
  565. CFLAGS          = -g 
  566. BINDIR        = ../bin
  567. XEXTHDRS          = /usr/include/ctype.h \
  568. X        /usr/include/stdio.h
  569. HDRS          =
  570. LDFLAGS          =
  571. LIBS          =
  572. LINKER          = $(CC)
  573. MAKEFILE      = Makefile
  574. OBJS          = cfc.o
  575. PRINT          = pr
  576. PROGRAM          = cfc
  577. SRCS          = cfc.c
  578. X#INSTALL          = install -s
  579. INSTALL          = cp
  580. all:        $(PROGRAM)
  581. X
  582. X$(PROGRAM):     $(OBJS) $(LIBS)
  583. X        @echo -n "Loading $(PROGRAM) ... "
  584. X        @$(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
  585. X        @echo "done"
  586. X
  587. lint:
  588. X        lint cfc.c
  589. clean:;        @rm -f $(OBJS) $(PROGRAM) core
  590. X
  591. depend:;    @mkmf -f $(MAKEFILE) "CFLAGS=$(CFLAGS)" PROGRAM=$(PROGRAM) BINDIR=$(BINDIR)
  592. X
  593. index:;        @ctags -wx $(HDRS) $(SRCS)
  594. X
  595. install:    $(PROGRAM)
  596. X        @echo Installing $(PROGRAM) in $(BINDIR)
  597. X        ${INSTALL} $(PROGRAM) $(BINDIR)
  598. X
  599. print:;        @$(PRINT) $(HDRS) $(SRCS)
  600. X
  601. program:        $(PROGRAM)
  602. X
  603. tags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
  604. X
  605. X###
  606. cfc.o: /usr/include/stdio.h /usr/include/ctype.h
  607. END_OF_FILE
  608. if test 934 -ne `wc -c <'cfc/Makefile'`; then
  609.     echo shar: \"'cfc/Makefile'\" unpacked with wrong size!
  610. fi
  611. # end of 'cfc/Makefile'
  612. fi
  613. if test ! -d 'debug' ; then
  614.     echo shar: Creating directory \"'debug'\"
  615.     mkdir 'debug'
  616. fi
  617. if test -f 'debug/Makefile' -a "${1}" != "-c" ; then 
  618.   echo shar: Will not clobber existing file \"'debug/Makefile'\"
  619. else
  620. echo shar: Extracting \"'debug/Makefile'\" \(988 characters\)
  621. sed "s/^X//" >'debug/Makefile' <<'END_OF_FILE'
  622. X# makefile for doing regression tests on sendmail files
  623. BINDIR=../bin
  624. X
  625. all: debug
  626. debug:    good.out debug.out sendmail.cf
  627. X    diff debug.out good.out 
  628. X
  629. sendmail.ease: ../sendmail.ease
  630. X    @echo getting your ease file from the top directory
  631. X    cp ../sendmail.ease .
  632. sendmail.cf:    sendmail.ease
  633. X    ${BINDIR}/et -C sendmail.ease >sendmail.cf
  634. debug.out:    debug.in sendmail.cf
  635. X    showwhere < debug.in    >debug.out
  636. debug.tbl:    debug.out
  637. X    echo ".TS"    >debug.tbl
  638. X    echo "l l l l l"    >>debug.tbl
  639. X    echo "l l l l l." >>debug.tbl
  640. X    echo "Ruleset    Input    Mailer    hostname    User" >>debug.tbl
  641. X    cat debug.out >>debug.tbl
  642. X    echo ".TE" >>debug.tbl
  643. report:    debug.tbl
  644. X    tbl debug.tbl | ptroff
  645. X    
  646. good.out: 
  647. X    @ echo you have to create this yourself by typing
  648. X    @ echo "    cp debug.out good.out"
  649. X    @ echo do this once you feel your sendmail test suite
  650. X    @ echo has results that you feel are correct
  651. X    @ echo 
  652. X    @ echo do this everytime you feel you want to update
  653. X    @ echo your test suite
  654. X    @ cp good.out /dev/null
  655. X
  656. X
  657. clean:
  658. X    rm debug.out debug.tbl 
  659. END_OF_FILE
  660. if test 988 -ne `wc -c <'debug/Makefile'`; then
  661.     echo shar: \"'debug/Makefile'\" unpacked with wrong size!
  662. fi
  663. # end of 'debug/Makefile'
  664. fi
  665. if test -f 'debug/debug.in' -a "${1}" != "-c" ; then 
  666.   echo shar: Will not clobber existing file \"'debug/debug.in'\"
  667. else
  668. echo shar: Extracting \"'debug/debug.in'\" \(396 characters\)
  669. sed "s/^X//" >'debug/debug.in' <<'END_OF_FILE'
  670. X0    user
  671. X0    user@localhost
  672. X0    user%localhost@localhost
  673. X0    barnett@crdgw1.ge.com
  674. X0    crdgw1.uucp!barnett
  675. X0    barnett@crdgw1.uucp
  676. X0       user@some.do.main
  677. X0       site!user%site2@site3.com
  678. X0    site1!site2!site3!user
  679. X0    site1!site2!site3!user@localhost
  680. X0    site1!site2!site3!user@machine.edu
  681. X0    site1!crd.ge.com!barnett
  682. X0    site1!crd.ge.com!barnett@crd.ge.com
  683. X0    user@bogus
  684. X22,4    user@crdgw1.UUCP  Sender_via_UUCP
  685. END_OF_FILE
  686. if test 396 -ne `wc -c <'debug/debug.in'`; then
  687.     echo shar: \"'debug/debug.in'\" unpacked with wrong size!
  688. fi
  689. # end of 'debug/debug.in'
  690. fi
  691. if test -f 'debug/showhow' -a "${1}" != "-c" ; then 
  692.   echo shar: Will not clobber existing file \"'debug/showhow'\"
  693. else
  694. echo shar: Extracting \"'debug/showhow'\" \(1262 characters\)
  695. sed "s/^X//" >'debug/showhow' <<'END_OF_FILE'
  696. X#!/bin/sh  
  697. X# written by Bruce Barnett <barnett@crdgw1.ge.com>
  698. X# Inspired from
  699. X#    Dan Long
  700. X#     CSNET Technical Staff
  701. X#     long@sh.cs.net
  702. X#
  703. X#    This script converts the sendmail debug output into something 
  704. X#    easier to parse.
  705. X#    Some sendmail programs output ^V, ^W, ^X
  706. X#    This script converts ^V to $#, ^X to $:, and ^W to $@
  707. X#    This matches Ultrix 3.1. SunOS 3.5 is different
  708. X#    Other sendmail versions output in the $:, $@, $# format
  709. X#    So this script just ignores those characters, 
  710. X#    as they are already correct.
  711. X#
  712. X#define your sendmail program compiled for debug
  713. SENDMAIL=/usr/lib/sendmail
  714. if [ $# -lt 2 ]
  715. then
  716. X    echo 'Usage: showhow rulesets address [mailer]' 1>&2;exit 2;
  717. fi
  718. X#FLAGS='-d21.12'
  719. XFLAGS=''
  720. case $1 in
  721. X0*)
  722. X    echo "$1 $2" | ${SENDMAIL} -bt -Csendmail.cf $FLAGS  |\
  723. X    egrep '\$\#|\^V' |\
  724. X    tail -1 |tr -d '"' |\
  725. X    sed \
  726. X        -e 's/\^V/$#/' \
  727. X        -e 's/\^X/$:/' \
  728. X        -e 's/\^W/$@/' \
  729. X        -e 's/^[a-zA-Z ][:a-zA-Z0-9 ]*//' \
  730. X        -e 's/local \$:/local $@ local $:/' \
  731. X        -e 's/\$# //' \
  732. X        -e 's/ \$@ /    /' \
  733. X        -e 's/ \$: /    /' \
  734. X        -e 's/ //g' 
  735. X    ;;
  736. X*)    # else a rewrite rule for a mailer
  737. X    if [ X$3 = X ]
  738. X    then
  739. X        mailer='-';
  740. X    else
  741. X        mailer=$3;
  742. X    fi
  743. X    echo "$1 $2" | ${SENDMAIL} -bt -Csendmail.cf $FLAGS |\
  744. X    egrep "^rewrite:"|tail -1 |tr -d '" '|\
  745. X    sed "s/^.*:/$mailer    /"
  746. X    ;;
  747. esac
  748. X
  749. X
  750. X
  751. X
  752. END_OF_FILE
  753. if test 1262 -ne `wc -c <'debug/showhow'`; then
  754.     echo shar: \"'debug/showhow'\" unpacked with wrong size!
  755. fi
  756. chmod +x 'debug/showhow'
  757. # end of 'debug/showhow'
  758. fi
  759. if test -f 'debug/showwhere' -a "${1}" != "-c" ; then 
  760.   echo shar: Will not clobber existing file \"'debug/showwhere'\"
  761. else
  762. echo shar: Extracting \"'debug/showwhere'\" \(207 characters\)
  763. sed "s/^X//" >'debug/showwhere' <<'END_OF_FILE'
  764. X#!/bin/sh 
  765. X# Written By Bruce Barnett
  766. while :
  767. do
  768. X    read username
  769. X#    echo i just read in  $username
  770. X    if [ $? -eq 0 ]
  771. X    then
  772. X        x="`./showhow $username`"
  773. X            echo $username  $x | tr ' ' '    '
  774. X    else
  775. X        exit 0
  776. X    fi
  777. done
  778. END_OF_FILE
  779. if test 207 -ne `wc -c <'debug/showwhere'`; then
  780.     echo shar: \"'debug/showwhere'\" unpacked with wrong size!
  781. fi
  782. chmod +x 'debug/showwhere'
  783. # end of 'debug/showwhere'
  784. fi
  785. if test ! -d 'doc' ; then
  786.     echo shar: Creating directory \"'doc'\"
  787.     mkdir 'doc'
  788. fi
  789. if test -f 'doc/Makefile' -a "${1}" != "-c" ; then 
  790.   echo shar: Will not clobber existing file \"'doc/Makefile'\"
  791. else
  792. echo shar: Extracting \"'doc/Makefile'\" \(915 characters\)
  793. sed "s/^X//" >'doc/Makefile' <<'END_OF_FILE'
  794. X#! /bin/make -f
  795. X#
  796. X# $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/Makefile,v 1.2 1991/11/25 18:31:53 barnett Exp $
  797. X#
  798. X# $Log: Makefile,v $
  799. X# Revision 1.2  1991/11/25  18:31:53  barnett
  800. X# Changes by Paul A. Vixie
  801. X#
  802. X# Revision 1.1  1991/11/25  18:24:01  barnett
  803. X# Initial revision - from 1.2 version
  804. X#
  805. X#
  806. X#
  807. X#    Makefile for Ease document.
  808. X#
  809. X#    James S. Schoner
  810. X#    Purdue University Computing Center
  811. X#    Modifications by Paul A. Vixie <vixie@pa.dec.com>
  812. X#
  813. X
  814. XEXT=l
  815. MANDEST = /usr/man/man${EXT}
  816. ROFF=ptroff
  817. X
  818. DOCS = cover ease.paper ap1 ap2 ap3 ap4
  819. MANS = ease.man et.man cfc.man
  820. X
  821. all:; @echo "'all' is a no-op here.  use install, printman, or printpaper"
  822. X
  823. install: ${MANS} FRC
  824. X    install -c ease.man $(MANDEST)/ease.${EXT}
  825. X    install -c et.man $(MANDEST)/et.${EXT}
  826. X    install -c cfc.man $(MANDEST)/cfc.${EXT}
  827. X
  828. printpaper: ${DOCS} FRC
  829. X    tbl ${DOCS} | ${ROFF} -ms
  830. X
  831. printman: ${MANS} FRC
  832. X    tbl ${MANS} | ${ROFF} -man
  833. X
  834. clean:
  835. X
  836. XFRC:
  837. END_OF_FILE
  838. if test 915 -ne `wc -c <'doc/Makefile'`; then
  839.     echo shar: \"'doc/Makefile'\" unpacked with wrong size!
  840. fi
  841. chmod +x 'doc/Makefile'
  842. # end of 'doc/Makefile'
  843. fi
  844. if test -f 'doc/ap1' -a "${1}" != "-c" ; then 
  845.   echo shar: Will not clobber existing file \"'doc/ap1'\"
  846. else
  847. echo shar: Extracting \"'doc/ap1'\" \(1490 characters\)
  848. sed "s/^X//" >'doc/ap1' <<'END_OF_FILE'
  849. X.DS C
  850. X\s+5\fBAppendix A\fR
  851. X
  852. X
  853. X\fBPre-Declared Macros\fR\s-5
  854. X.DE
  855. X.sp 5
  856. X.TS 
  857. center box;
  858. c|c|c
  859. l|l|l.
  860. X\fBEase\fR Macro    Raw Equivalent    Meaning*
  861. X=
  862. X\fIm_odate\fR    a    The origination date in Arpanet format
  863. X\fIm_adate\fR    b    The current date in Arpanet format
  864. X\fIm_hops\fR    c    The hop count
  865. X\fIm_udate\fR    d    The date in UNIX (ctime) format
  866. X\fIm_smtp\fR    e    The SMTP entry message
  867. X\fIm_saddr\fR    f    The sender (from) address
  868. X\fIm_sreladdr\fR    g    The sender address relative to the recipient
  869. X\fIm_rhost\fR    h    The recipient host
  870. X\fIm_qid\fR    i    The queue id
  871. X\fIm_oname\fR    j    The official domain name for this site
  872. X\fIm_ufrom\fR    l    The format of the UNIX from line
  873. X\fIm_daemon\fR    n    The name of the daemon (for error messages)
  874. X\fIm_addrops\fR    o    The set of "operators" in addresses
  875. X\fIm_pid\fR    p    Sendmail's pid
  876. X\fIm_defaddr\fR    q    The default format of sender address
  877. X\fIm_protocol\fR    r    Protocol used
  878. X\fIm_shostname\fR    s    Sender's host name
  879. X\fIm_ctime\fR    t    A numeric representation of the current time
  880. X\fIm_ruser\fR    u    The recipient user
  881. X\fIm_version\fR    v    The version number of sendmail
  882. X\fIm_sitename\fR    w    The hostname of this site
  883. X\fIm_sname\fR    x    The full name of the sender
  884. X\fIm_stty\fR    y    The id of the sender's tty
  885. X\fIm_rhdir\fR    z    The home directory of the recipient
  886. X\fIm_domain\fR    m    The domain of the host (SunOS)
  887. X\fIm_uucpname\fR    k    The official UUCP name (IDA)
  888. X.TE
  889. X.FS
  890. X*  Taken from pages 19 and 20 of the Sendmail Installation and Operation Guide
  891. X(SMM:7 in the 4.3 BSD UNIX System Manager's Manual), by Eric Allman.
  892. X.FE
  893. END_OF_FILE
  894. if test 1490 -ne `wc -c <'doc/ap1'`; then
  895.     echo shar: \"'doc/ap1'\" unpacked with wrong size!
  896. fi
  897. # end of 'doc/ap1'
  898. fi
  899. if test -f 'doc/ap2' -a "${1}" != "-c" ; then 
  900.   echo shar: Will not clobber existing file \"'doc/ap2'\"
  901. else
  902. echo shar: Extracting \"'doc/ap2'\" \(3024 characters\)
  903. sed "s/^X//" >'doc/ap2' <<'END_OF_FILE'
  904. X...
  905. X... $Header: /tmp_mnt/home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/ap2,v 3.3 1991/09/09 16:36:05 barnett Exp $
  906. X... 
  907. X... $Log: ap2,v $
  908. X... Revision 3.3  1991/09/09  16:36:05  barnett
  909. X... minor bug fixes
  910. X...
  911. X... Revision 2.1  1990/01/30  12:57:42  jeff
  912. X... Made changes corresponding to Ease release 2.1Alpha.
  913. X... se.
  914. X...
  915. X... Version 2.0  90/01/30  12:50:12  jeff
  916. X... Baseline version, corresponding to netwide release 2.0.
  917. X... 
  918. X... Revision 1.5  88/06/15  10:11:53  root
  919. X... Added undocumented/unimplemented options. Fixed so it would troff well. ADR.
  920. X... 
  921. X... Revision 1.4  88/01/21  17:10:33  root
  922. X... Added new option; change location of Sendmail doc to 4.3 SMM. ADR.
  923. X... 
  924. X... Revision 1.3  87/09/04  14:55:36  root
  925. X... Fixed typo in new options. ADR.
  926. X... 
  927. X... Revision 1.2  87/03/03  17:05:41  root
  928. X... Changes for 4.3 version of sendmail. ADR.
  929. X... 
  930. X... Revision 1.1  87/03/03  17:01:24  root
  931. X... Initial revision
  932. X... 
  933. X...
  934. X.DS C
  935. X\s+5\fBAppendix B\fR
  936. X
  937. X\fBSendmail Options\fR\s-5
  938. X.DE
  939. X.PP
  940. XFor a complete description of Sendmail's options and their values, refer to 
  941. Appendix B of the Sendmail Installation and Operation Guide (SMM:7 in the
  942. X4.3 BSD UNIX System Manager's Manual), by Eric Allman.
  943. X.sp
  944. X.TS 
  945. center box;
  946. c|c
  947. l|l.
  948. Sendmail Option (\fBEase\fR)    Sendmail Option (Raw)    Special Values
  949. X=
  950. X\fIo_alias\fR    A    
  951. X\fIo_ewait\fR    a    
  952. X\fIo_bsub\fR    B    
  953. X\fIo_checkpoint\fR    C *
  954. X\fIo_qwait\fR    c    
  955. X\fIo_delivery\fR  (special values below)    d  (special values below)
  956. X     \fId_interactive\fR         i 
  957. X     \fId_background\fR        b 
  958. X     \fId_queue\fR        q
  959. X\fIo_rebuild\fR    D
  960. X\fIo_handling\fR  (special values below)    e  (special values below)
  961. X     \fIh_print\fR         p 
  962. X     \fIh_exit\fR         q
  963. X     \fIh_mail\fR         m
  964. X     \fIh_write\fR         w
  965. X     \fIh_mailz\fR         e
  966. X\fIo_tmode\fR    F    
  967. X\fIo_usave\fR    f    
  968. X\fIo_gid\fR    g    
  969. X\fIo_fsmtp\fR    H    
  970. X\fIo_skipd\fR    i    
  971. X\fIo_nameserver\fR    I (HP/UX)
  972. X\fIo_slog\fR    L    
  973. X\fIo_rsend\fR    m    
  974. X\fIo_dnet\fR    N (Ultrix)
  975. X\fIo_validate\fR    n \(dg
  976. X\fIo_hformat\fR    o    
  977. X\fIo_pmaster\fR    P \(bu
  978. X\fIo_qdir\fR    Q    
  979. X\fIo_qfactor\fR    q
  980. X\fIo_tread\fR    r    
  981. X\fIo_flog\fR    S    
  982. X\fIo_safe\fR    s    
  983. X\fIo_qtimeout\fR    T    
  984. X\fIo_timezone\fR    t    
  985. X\fIo_dmuid\fR    u    
  986. X\fIo_verbose\fR    v    
  987. X\fIo_wizpass\fR    W    
  988. X\fIo_loadq\fR    x    
  989. X\fIo_loadnc\fR    X    
  990. X\fIo_recipfactor\fR    y
  991. X\fIo_newproc\fR    Y
  992. X\fIo_prifactor\fR    z
  993. X\fIo_waitfactor\fR    Z
  994. X\fIo_maxempty\fR    b (SunOS)
  995. X\fIo_maxhops\fR    h (SunOS)
  996. X\fIo_remote\fR    R (SunOS)
  997. X\fIo_aliasfile\fR    Y (SunOS)
  998. X\fIo_envelope\fR    / (IDA)
  999. X
  1000. X
  1001. X
  1002. X.TE
  1003. X.PP
  1004. X* This option is undocumented and unimplemented in 4.3BSD. It is
  1005. for checkpointing mail after \fIN\fR failed connections. \fBEase\fR supports
  1006. it in anticipation of future developments.
  1007. Ultrix uses this flag in Ultrix 3.0. I assume it means the same thing.
  1008. X.PP
  1009. X\(dg This option is undocumented in 4.3BSD. It specifies that the right hand
  1010. side of an alias definition should be checked for validity as an address
  1011. when the alias database is being rebuilt.
  1012. X.PP
  1013. X\(bu This option is undocumented in 4.3BSD.
  1014. It specifies the address of a Postmaster who should be carbon-copied on
  1015. all returned bad mail.
  1016. END_OF_FILE
  1017. if test 3024 -ne `wc -c <'doc/ap2'`; then
  1018.     echo shar: \"'doc/ap2'\" unpacked with wrong size!
  1019. fi
  1020. # end of 'doc/ap2'
  1021. fi
  1022. if test -f 'doc/ap3' -a "${1}" != "-c" ; then 
  1023.   echo shar: Will not clobber existing file \"'doc/ap3'\"
  1024. else
  1025. echo shar: Extracting \"'doc/ap3'\" \(1721 characters\)
  1026. sed "s/^X//" >'doc/ap3' <<'END_OF_FILE'
  1027. X...
  1028. X... $Header: /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v 2.1 90/01/30 12:57:45 jeff Exp $
  1029. X... 
  1030. X... $Log:    /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v $
  1031. X... Version 2.1  90/01/30  12:57:45  jeff
  1032. X... Made changes corresponding to Ease release 2.1Alpha.
  1033. X... se.
  1034. X... 
  1035. X... Version 2.0  90/01/30  12:50:38  jeff
  1036. X... Baseline version, corresponding to netwide release 2.0.
  1037. X... 
  1038. X... Revision 1.4  88/06/15  10:12:22  root
  1039. X... Added undocumented and unimplemented mailer flag.
  1040. X... 
  1041. X... Revision 1.3  88/01/21  17:10:57  root
  1042. X... Changed location of Sendmail doc to 4.3 SMM. ADR.
  1043. X... 
  1044. X... Revision 1.2  87/03/03  17:05:53  root
  1045. X... Changes for 4.3 version of sendmail. ADR.
  1046. X... 
  1047. X... Revision 1.1  87/03/03  17:04:52  root
  1048. X... Initial revision
  1049. X... 
  1050. X...
  1051. X.DS C
  1052. X\s+5\fBAppendix C\fR
  1053. X
  1054. X
  1055. X\fBMailer Flags\fR\s-5
  1056. X.DE
  1057. X.sp 5
  1058. X.PP
  1059. XFor a complete description of mailer flags, refer to 
  1060. Appendix C of the Sendmail Installation and Operation Guide (SMM:7 in the
  1061. X4.3 BSD UNIX System Manager's Manual), by Eric Allman.
  1062. X.sp 5
  1063. X.TS 
  1064. center box;
  1065. c|c
  1066. l|l.
  1067. Mailer Flag (\fBEase\fR)    Mailer Flag (Raw)
  1068. X=
  1069. X\fIf_ffrom\fR    f
  1070. X\fIf_rfrom\fR    r
  1071. X\fIf_noreset\fR    S
  1072. X\fIf_noufrom\fR    n
  1073. X\fIf_locm\fR    l
  1074. X\fIf_strip\fR    s 
  1075. X\fIf_mult\fR    m
  1076. X\fIf_from\fR    F
  1077. X\fIf_date\fR    D
  1078. X\fIf_mesg\fR    M
  1079. X\fIf_full\fR    x    
  1080. X\fIf_return\fR    P    
  1081. X\fIf_upperu\fR    u    
  1082. X\fIf_upperh\fR    h    
  1083. X\fIf_arpa\fR    A    
  1084. X\fIf_ufrom\fR    U    
  1085. X\fIf_expensive\fR    e    
  1086. X\fIf_dot\fR    X    
  1087. X\fIf_llimit\fR    L    
  1088. X\fIf_retsmtp\fR    p    
  1089. X\fIf_smtp\fR    I    
  1090. X\fIf_addrw\fR    C    
  1091. X\fIf_escape\fR    E
  1092. X\fIf_rport\fR    R *
  1093. X\fIf_mail11\fR    H    Ultrix 3.0
  1094. X\fIf_relativize\fR    V    IDA
  1095. X.TE
  1096. X.FS
  1097. X*  This flag specifies the use of a reserved TCP port. In 4.3BSD it is
  1098. both undocumented and unimplemented. \fBEase\fR supports it in anticipation
  1099. of future developments.
  1100. X.FE
  1101. END_OF_FILE
  1102. if test 1721 -ne `wc -c <'doc/ap3'`; then
  1103.     echo shar: \"'doc/ap3'\" unpacked with wrong size!
  1104. fi
  1105. # end of 'doc/ap3'
  1106. fi
  1107. if test -f 'doc/ap4' -a "${1}" != "-c" ; then 
  1108.   echo shar: Will not clobber existing file \"'doc/ap4'\"
  1109. else
  1110. echo shar: Extracting \"'doc/ap4'\" \(273 characters\)
  1111. sed "s/^X//" >'doc/ap4' <<'END_OF_FILE'
  1112. X.DS C
  1113. X\s+5\fBAppendix D\fR
  1114. X
  1115. X
  1116. X\fBPre-Defined Classes\fR\s-5
  1117. X.DE
  1118. X.sp 5
  1119. X.TS 
  1120. center box;
  1121. c|c|c
  1122. l|l|l.
  1123. X\fBEase\fR Class    Raw Equivalent    Meaning
  1124. X=
  1125. X\fIc_myname\fR    w    The list of names by which this host is known
  1126. X\fIc_mydomain\fR    m    The list of names by which this host is known
  1127. X.TE
  1128. END_OF_FILE
  1129. if test 273 -ne `wc -c <'doc/ap4'`; then
  1130.     echo shar: \"'doc/ap4'\" unpacked with wrong size!
  1131. fi
  1132. # end of 'doc/ap4'
  1133. fi
  1134. if test -f 'doc/cover' -a "${1}" != "-c" ; then 
  1135.   echo shar: Will not clobber existing file \"'doc/cover'\"
  1136. else
  1137. echo shar: Extracting \"'doc/cover'\" \(1034 characters\)
  1138. sed "s/^X//" >'doc/cover' <<'END_OF_FILE'
  1139. X...
  1140. X... $Header: /home/alydar/u0/barnett/Src/Ease/ease/doc/RCS/cover,v 3.4 1991/11/25 18:17:56 barnett Exp $
  1141. X...
  1142. X... $Log: cover,v $
  1143. X... Revision 3.4  1991/11/25  18:17:56  barnett
  1144. X... added .bp at EOF
  1145. X...
  1146. X... Revision 3.3  1991/09/09  16:36:05  barnett
  1147. X... minor bug fixes
  1148. X...
  1149. X... Revision 2.0  1990/01/30  12:50:41  jeff
  1150. X... Baseline version, corresponding to netwide release 2.0.
  1151. X...
  1152. X... Revision 1.2  87/12/23  11:30:36  root
  1153. X... Updated list of authors. ADR.
  1154. X... 
  1155. X... Revision 1.1  87/12/23  10:16:35  root
  1156. X... Initial revision
  1157. X... 
  1158. X...
  1159. X.DA
  1160. X.sp 15
  1161. X.nr PS 14
  1162. X.ps 14
  1163. X.DS C
  1164. X.DE
  1165. X.sp 10
  1166. X.nr PS 36
  1167. X.ps 36
  1168. X.DS C
  1169. X\fBEase:\fR
  1170. X.DE
  1171. X.sp 5
  1172. X.nr PS 22
  1173. X.ps 22
  1174. X.DS C
  1175. A Configuration Language
  1176. X  
  1177. for Sendmail
  1178. X.DE
  1179. X.sp 8
  1180. X.nr PS 14
  1181. X.ps 14
  1182. X.DS C
  1183. by
  1184. X
  1185. X\fIJames S. Schoner\fR
  1186. X\fIPurdue University Computing Center\fR
  1187. X
  1188. Amended by
  1189. X
  1190. X\fIJeff P. Stearns\fR
  1191. X\fIJohn Fluke Manufacturing Company\fR
  1192. X
  1193. X\fIArnold D. Robbins\fR
  1194. X\fIEmory University Computing Center\fR
  1195. X
  1196. X\fIBruce G. Barnett\fR
  1197. X\fIGeneral Electric\fR
  1198. X\fICorporate Research and Development\fR
  1199. X.DE
  1200. X.bp
  1201. END_OF_FILE
  1202. if test 1034 -ne `wc -c <'doc/cover'`; then
  1203.     echo shar: \"'doc/cover'\" unpacked with wrong size!
  1204. fi
  1205. # end of 'doc/cover'
  1206. fi
  1207. if test -f 'doc/ease.man' -a "${1}" != "-c" ; then 
  1208.   echo shar: Will not clobber existing file \"'doc/ease.man'\"
  1209. else
  1210. echo shar: Extracting \"'doc/ease.man'\" \(668 characters\)
  1211. sed "s/^X//" >'doc/ease.man' <<'END_OF_FILE'
  1212. X.\"    @(#)ease.l    (FLUKE) 25-feb-87
  1213. X.\"
  1214. X.TH EASE LOCAL "Feb 13, 1991"
  1215. X.UC 4
  1216. X.SH NAME
  1217. ease \- precompiler for sendmail configuration files
  1218. X.SH SYNOPSIS
  1219. X.B ease
  1220. X[
  1221. X.B \-D
  1222. X\fIname\fP[=\fIvalue\fP] ...
  1223. X]
  1224. file ...
  1225. X.br
  1226. X.SH DESCRIPTION
  1227. X.I Ease
  1228. compiles a high-level language into a form understood by
  1229. X.I /usr/lib/sendmail.
  1230. It is fully documented in the files which reside in the source directory.
  1231. X.PP
  1232. X.I Ease
  1233. is actually a shell script which passes the source file through
  1234. X.I cpp
  1235. and thence into the actual ease translator
  1236. X.I et.
  1237. Output is printed to the standard output.
  1238. X.SH "SEE ALSO"
  1239. cpp(1), et(local), sendmail(8), cfc(local)
  1240. X.SH BUGS
  1241. X.SH BROUGHT TO YOU BY
  1242. jeff@tc.fluke.COM
  1243. END_OF_FILE
  1244. if test 668 -ne `wc -c <'doc/ease.man'`; then
  1245.     echo shar: \"'doc/ease.man'\" unpacked with wrong size!
  1246. fi
  1247. # end of 'doc/ease.man'
  1248. fi
  1249. if test -f 'doc/et.man' -a "${1}" != "-c" ; then 
  1250.   echo shar: Will not clobber existing file \"'doc/et.man'\"
  1251. else
  1252. echo shar: Extracting \"'doc/et.man'\" \(1305 characters\)
  1253. sed "s/^X//" >'doc/et.man' <<'END_OF_FILE'
  1254. X.\"    @(#)et.man
  1255. X.\"
  1256. X.TH ET LOCAL "Feb 13, 1991"
  1257. X.UC 4
  1258. X.SH NAME
  1259. et \- translator for sendmail configuration files
  1260. X.SH SYNOPSIS
  1261. X.B Et
  1262. X[
  1263. X.B \-d
  1264. X]
  1265. X[
  1266. X.B \-q
  1267. X]
  1268. X[
  1269. X.B \-D
  1270. X\fIname\fP[=\fIvalue\fP] ...
  1271. X]
  1272. X[inputfile [outputfile]]
  1273. X.br
  1274. X.SH DESCRIPTION
  1275. X.I Et
  1276. compiles a high-level language into a form understood by
  1277. X.I /usr/lib/sendmail.
  1278. It is fully documented by the documentation provided with the program source.
  1279. X.PP
  1280. X.I Et
  1281. optionally passes the source file through
  1282. X.I cpp
  1283. before parsing it.  This allows all the power of
  1284. X.I cpp
  1285. to be applied to the input file.
  1286. X.PP
  1287. If no inputfile is specified, STDIN is used.
  1288. If no outputfile is specified, STDOUT is used.
  1289. The distinguished name "-" is synonymous with STDIN or STDOUT, as appropriate.
  1290. X.PP
  1291. By default,
  1292. X.I Et
  1293. passes input lines along into the output stream as comments.
  1294. X.SH OPTIONS
  1295. X.IP -d
  1296. turns on the yydebug flag for the curious or desperate.
  1297. X.IP -q
  1298. turns off the feature which passes input lines along into the output
  1299. stream as comments.
  1300. X.PP
  1301. X.I Et
  1302. accepts the options of
  1303. X.B cpp,
  1304. and passes them along to the C pre-processor when it is invoked.
  1305. X.B N.B 
  1306. If no such options are specified,
  1307. X.B cpp
  1308. is not invoked.
  1309. X.SH "SEE ALSO"
  1310. cpp(1), ease(local), sendmail(8), cfc(local)
  1311. X.SH BUGS
  1312. X.SH THIS MANUAL PAGE WRITTEN BY
  1313. jeff@tc.fluke.com, from inspection of the source code.
  1314. END_OF_FILE
  1315. if test 1305 -ne `wc -c <'doc/et.man'`; then
  1316.     echo shar: \"'doc/et.man'\" unpacked with wrong size!
  1317. fi
  1318. # end of 'doc/et.man'
  1319. fi
  1320. if test ! -d 'src' ; then
  1321.     echo shar: Creating directory \"'src'\"
  1322.     mkdir 'src'
  1323. fi
  1324. if test -f 'src/fixstrings.c' -a "${1}" != "-c" ; then 
  1325.   echo shar: Will not clobber existing file \"'src/fixstrings.c'\"
  1326. else
  1327. echo shar: Extracting \"'src/fixstrings.c'\" \(2012 characters\)
  1328. sed "s/^X//" >'src/fixstrings.c' <<'END_OF_FILE'
  1329. X/*
  1330. X * $Revision: 2.2 $
  1331. X * Check-in $Date: 1991/05/16 10:45:25 $
  1332. X *
  1333. X * $Author: barnett $
  1334. X *
  1335. X * $Log: fixstrings.c,v $
  1336. X * Revision 2.2  1991/05/16  10:45:25  barnett
  1337. X * Better support for System V machines
  1338. X * Support for machines with read only text segments
  1339. X *
  1340. X * Revision 2.1  1990/01/30  14:25:14  jeff
  1341. X * Comment changes only.
  1342. X *
  1343. X * Revision 2.0  88/06/15  14:41:19  root
  1344. X * Baseline release for net posting. ADR.
  1345. X * 
  1346. X * Version 1.2  87/02/25  16:55:13  jeff
  1347. X * Add RCS header lines.  No code changes.
  1348. X * 
  1349. X */
  1350. X#ifdef FLUKE
  1351. X# ifndef LINT
  1352. X    static char RCSid[] = "@(#)FLUKE  $Header: /home/kreskin/u0/barnett/Src/ease/src/RCS/fixstrings.c,v 2.2 1991/05/16 10:45:25 barnett Exp $";
  1353. X# endif LINT
  1354. X#endif FLUKE
  1355. X
  1356. X/*  FLUKE jps 16-apr-86 - special hacks for NULL pointers.
  1357. X *
  1358. X *  The author of ease used a *lot* of NULL pointers.  This isn't much
  1359. X *  of a problem on a vax, where NULL pointers look like "".  Not so on a Sun.
  1360. X *
  1361. X *  We hack around the problem by defining a set of wrappers for the
  1362. X *  standard string functions, making it appear as though they accept NULL
  1363. X *  pointers.  In the other C files, cpp macros are used to revector the
  1364. X *  standard string functions to this file.
  1365. X */
  1366. X#ifdef SYSV
  1367. X#include <string.h>
  1368. X#define index strchr
  1369. X#define rindex strrchr
  1370. X#else
  1371. X#include <strings.h>
  1372. X#endif
  1373. X#define fix(s) ((s) ? (s) : "")
  1374. X
  1375. char *Xstrcat (s1, s2)
  1376. char *s1, *s2; 
  1377. X{
  1378. X    return (strcat (s1, fix (s2)));
  1379. X}
  1380. X
  1381. char *Xstrncat (s1, s2, n)
  1382. char *s1, *s2; 
  1383. X{
  1384. X    return (strncat (s1, fix (s2), n));
  1385. X}
  1386. X
  1387. XXstrcmp (s1, s2)
  1388. char *s1, *s2; 
  1389. X{
  1390. X    return (strcmp (fix (s1), fix (s2)));
  1391. X}
  1392. X
  1393. XXstrncmp (s1, s2, n)
  1394. char *s1, *s2; 
  1395. X{
  1396. X    return (strncmp (fix (s1), fix (s2), n));
  1397. X}
  1398. X
  1399. char *Xstrcpy (s1, s2)
  1400. char *s1, *s2; 
  1401. X{
  1402. X    return (strcpy (s1, fix (s2)));
  1403. X}
  1404. X
  1405. char *Xstrncpy (s1, s2, n)
  1406. char *s1, *s2; 
  1407. X{
  1408. X    return (strncpy (s1, fix (s2), n));
  1409. X}
  1410. X
  1411. XXstrlen (s)
  1412. char *s; 
  1413. X{
  1414. X    return (strlen (fix (s)));
  1415. X}
  1416. X
  1417. char *Xindex (s, c)
  1418. char *s, c; 
  1419. X{
  1420. X    return (index (fix (s), c));
  1421. X}
  1422. X
  1423. char *Xrindex (s, c)
  1424. char *s, c; 
  1425. X{
  1426. X    return (rindex (fix (s), c));
  1427. X}
  1428. END_OF_FILE
  1429. if test 2012 -ne `wc -c <'src/fixstrings.c'`; then
  1430.     echo shar: \"'src/fixstrings.c'\" unpacked with wrong size!
  1431. fi
  1432. # end of 'src/fixstrings.c'
  1433. fi
  1434. if test -f 'src/fixstrings.h' -a "${1}" != "-c" ; then 
  1435.   echo shar: Will not clobber existing file \"'src/fixstrings.h'\"
  1436. else
  1437. echo shar: Extracting \"'src/fixstrings.h'\" \(1047 characters\)
  1438. sed "s/^X//" >'src/fixstrings.h' <<'END_OF_FILE'
  1439. X/*
  1440. X * $Revision: 3.2 $
  1441. X * Check-in $Date: 1991/05/16 10:45:25 $
  1442. X * $State: Exp $
  1443. X *
  1444. X * $Author: barnett $
  1445. X *
  1446. X * $Log: fixstrings.h,v $
  1447. X * Revision 3.2  1991/05/16  10:45:25  barnett
  1448. X * Better support for System V machines
  1449. X * Support for machines with read only text segments
  1450. X *
  1451. X * Revision 3.1  1991/02/25  22:09:52  barnett
  1452. X * Fixed some portability problems
  1453. X *
  1454. X * Revision 2.1  1990/01/30  14:28:33  jeff
  1455. X * Bring RCS version number in line with netwide version 2.1.  No code
  1456. X * changes.
  1457. X *
  1458. X * Revision 2.0  88/06/15  14:41:57  root
  1459. X * Baseline release for net posting. ADR.
  1460. X */
  1461. X
  1462. X/* FLUKE jps 16-apr-86 - revector the string routines to custom-coded ones
  1463. X *  which handle NULL pointers.
  1464. X */
  1465. X#ifdef SYSV
  1466. X#define strchr Xindex
  1467. X#define strrchr Xrindex
  1468. X#else
  1469. X#define index Xindex
  1470. X#define rindex Xrindex
  1471. X#endif
  1472. X#define strcat    Xstrcat
  1473. X#define strncat    Xstrncat
  1474. X#define strcmp    Xstrcmp
  1475. X#define strncmp    Xstrncmp
  1476. X#define strcpy    Xstrcpy
  1477. X#define strncpy    Xstrncpy
  1478. X#define strlen    Xstrlen
  1479. X
  1480. extern char *Xstrcpy();
  1481. extern char *Xindex();
  1482. extern char *Xstrcat();
  1483. END_OF_FILE
  1484. if test 1047 -ne `wc -c <'src/fixstrings.h'`; then
  1485.     echo shar: \"'src/fixstrings.h'\" unpacked with wrong size!
  1486. fi
  1487. # end of 'src/fixstrings.h'
  1488. fi
  1489. if test -f 'src/symtab.h' -a "${1}" != "-c" ; then 
  1490.   echo shar: Will not clobber existing file \"'src/symtab.h'\"
  1491. else
  1492. echo shar: Extracting \"'src/symtab.h'\" \(2671 characters\)
  1493. sed "s/^X//" >'src/symtab.h' <<'END_OF_FILE'
  1494. X/*
  1495. X *    symtab.h    -- Definitions related to the "et" symbol table. 
  1496. X *
  1497. X *    author        -- James S. Schoner, Purdue University Computing Center,
  1498. X *                     West Lafayette, Indiana  47907
  1499. X *
  1500. X *    date        -- July 1, 1985
  1501. X *
  1502. X *    Copyright (c) 1985 by Purdue Research Foundation
  1503. X *
  1504. X *    All rights reserved.
  1505. X *
  1506. X * $Log: symtab.h,v $
  1507. X * Revision 3.0  1991/02/22  18:50:27  barnett
  1508. X * Added support for HP/UX and IDA sendmail.
  1509. X *
  1510. X * Revision 2.1  1990/01/30  15:58:35  jeff
  1511. X * Added SunOS/Ultrix/IDA extensions  Jan 24, 1989 Bruce Barnett
  1512. X *
  1513. X * Revision 2.0  88/06/15  14:43:08  root
  1514. X * Baseline release for net posting. ADR.
  1515. X */
  1516. X
  1517. X#define TRUE      1
  1518. X#define FALSE     0
  1519. X#define SST       101        /* size of hash table (symbol table)          */
  1520. X#define RSNMAX    5        /* size of a ruleset number character buffer */
  1521. X#define VALRSNMAX 9999        /* max value of ruleset number             */
  1522. X
  1523. X
  1524. X/* identifier types */
  1525. X#define ID_UNTYPED 0
  1526. X#define ID_MACRO   01
  1527. X#define ID_CLASS   02
  1528. X#define ID_RULESET 04
  1529. X#define ID_FIELD   010
  1530. X#define ID_PREC       020
  1531. X#define ID_MAILER  040
  1532. X
  1533. X/* identifier type macros */
  1534. X#define ISTYPED(x) (x|ID_UNTYPED)
  1535. X#define ISMACRO(x) (x&ID_MACRO)
  1536. X#define ISCLASS(x) (x&ID_CLASS)
  1537. X#define ISRULESET(x) (x&ID_RULESET)
  1538. X#define ISFIELD(x) (x&ID_FIELD)
  1539. X#define ISPREC(x) (x&ID_PREC)
  1540. X#define ISMAILER(x) (x&ID_MAILER)
  1541. X
  1542. X/* block definition types */
  1543. enum bdefs {def_macro, def_class, def_option, def_prec, def_trusted, 
  1544. X        def_header, def_mailer, def_ruleset};
  1545. X
  1546. X/* option types */
  1547. enum opts {opt_A, opt_a, opt_B, opt_C, opt_c, opt_D, opt_d, opt_e, opt_F,
  1548. X       opt_f, opt_g, opt_H, opt_i, opt_L, opt_m, opt_N, opt_n, opt_o,
  1549. X       opt_P, opt_Q, opt_q, opt_r, opt_S, opt_s, opt_T, opt_t, opt_u,
  1550. X       opt_v, opt_W, opt_x, opt_X, opt_Y, opt_y, opt_Z, opt_z,
  1551. X       opt_b, opt_R, opt_SL, opt_h, opt_I,
  1552. X       d_opt_i, d_opt_b, d_opt_q,
  1553. X       e_opt_p, e_opt_e, e_opt_m, e_opt_w, e_opt_z};
  1554. X
  1555. X/* flag types */
  1556. enum flgs {flg_f, flg_r, flg_S, flg_n, flg_l, flg_s, flg_m, flg_F, flg_D,
  1557. X       flg_M, flg_x, flg_P, flg_u, flg_h, flg_A, flg_U, flg_e, flg_X,
  1558. X       flg_H, flg_V, flg_B,
  1559. X       flg_L, flg_p, flg_I, flg_C, flg_E, flg_R};
  1560. X
  1561. X/* mailer parameters */
  1562. enum mats {mat_path, mat_flags, mat_sender, mat_recipient, mat_argv, 
  1563. X       mat_eol, mat_maxsize};
  1564. X
  1565. struct he {    /* hash entry structure for symbol table node     */
  1566. X    unsigned   idtype;    /* identifier type         */
  1567. X    unsigned   idd;          /* identifier definition flag     */
  1568. X    char      *psb;        /* identifier string buffer     */
  1569. X    union {
  1570. X        char rsn[RSNMAX];     /* ruleset number             */
  1571. X        int prec;          /* precedence value           */
  1572. X        char idc;        /* one char id representation */
  1573. X        char *fstring;        /* field string               */
  1574. X    } idval;
  1575. X    struct he *phe;        /* next hash entry         */
  1576. X};
  1577. END_OF_FILE
  1578. if test 2671 -ne `wc -c <'src/symtab.h'`; then
  1579.     echo shar: \"'src/symtab.h'\" unpacked with wrong size!
  1580. fi
  1581. # end of 'src/symtab.h'
  1582. fi
  1583. if test ! -d 'test' ; then
  1584.     echo shar: Creating directory \"'test'\"
  1585.     mkdir 'test'
  1586. fi
  1587. if test -f 'test/README' -a "${1}" != "-c" ; then 
  1588.   echo shar: Will not clobber existing file \"'test/README'\"
  1589. else
  1590. echo shar: Extracting \"'test/README'\" \(1583 characters\)
  1591. sed "s/^X//" >'test/README' <<'END_OF_FILE'
  1592. This is my little package to work out what is going on inside sendmail.
  1593. It consists of a sendmail configuration file and a shell script. The sendmail
  1594. configuration file was created with ease (see previous messages in net.mail
  1595. about ease - i think it's due in mod.sources). The ease source is included.
  1596. X
  1597. What this is all about:
  1598. X
  1599. X    I was having difficulty creating a sendmail.cf. So, I wrote a
  1600. sendmail.cf whose sole function was to tag an address as it went through the
  1601. ruleset. I coupled this with a little shell script, called args, which snarfs
  1602. it's arguments (and stdin) and write them to a log file (/tmp/log is what I
  1603. have used - you can alter it to taste, bearing in mind that it will probably
  1604. have to suid to write to your directory :-()
  1605. X
  1606. What do you do:
  1607. X
  1608. X    Unpack all this junk. You should have test.mc, test.cf, args and
  1609. README. Put args in your search path. Create a dummy mail message. It helps
  1610. to know how you mailer calls sendmail. I used args to find out. (I briefly
  1611. replaced /usr/lib/sendmail with args and sent some mail). Call sendmail with
  1612. the dummy mail item as stdin. ie:
  1613. X
  1614. X    /usr/lib/sendmail -Ctest.cf foobar <<eof
  1615. X    To: foobar
  1616. X    Subject: test
  1617. X
  1618. X    test mail
  1619. X    eof
  1620. X
  1621. then have a look at what is in /tmp/log
  1622. X
  1623. Thats all there is folks. I also use args with real configuration files, so
  1624. that I can test them without disrupting the mail service through my machine.
  1625. If you have any problems with this stuff, mail me and I'll try and help.
  1626. X
  1627. X    Simon Kenyon
  1628. X    The National Software Centre,
  1629. X    28 Enterprise Centre,
  1630. X    Pearse Street,
  1631. X    Dublin 2
  1632. X    IRELAND
  1633. X    +353 1 716255
  1634. X    simon@einode.UUCP
  1635. END_OF_FILE
  1636. if test 1583 -ne `wc -c <'test/README'`; then
  1637.     echo shar: \"'test/README'\" unpacked with wrong size!
  1638. fi
  1639. # end of 'test/README'
  1640. fi
  1641. if test -f 'test/args' -a "${1}" != "-c" ; then 
  1642.   echo shar: Will not clobber existing file \"'test/args'\"
  1643. else
  1644. echo shar: Extracting \"'test/args'\" \(507 characters\)
  1645. sed "s/^X//" >'test/args' <<'END_OF_FILE'
  1646. X#!/bin/sh
  1647. X#
  1648. X# little shell script to snarf it's arguments and stdin and put them
  1649. X# in a log file. this way you can see what is being given to the various
  1650. X# mailers and also what is being done to addresses.
  1651. X# it's a real hack, but it works for me
  1652. X#
  1653. X#            Simon Kenyon, The NSC, Dublin, IRELAND. 24th Nov 86
  1654. X#
  1655. echo '-------------'`date`'------------------' >>/tmp/log
  1656. echo -n "Command line: " >>/tmp/log
  1657. for i in "$@"
  1658. do
  1659. echo -n "$i " >>/tmp/log
  1660. done
  1661. echo >>/tmp/log
  1662. while read foo
  1663. do
  1664. echo $foo >>/tmp/log
  1665. done
  1666. END_OF_FILE
  1667. if test 507 -ne `wc -c <'test/args'`; then
  1668.     echo shar: \"'test/args'\" unpacked with wrong size!
  1669. fi
  1670. # end of 'test/args'
  1671. fi
  1672. if test -f 'test/test.addresses' -a "${1}" != "-c" ; then 
  1673.   echo shar: Will not clobber existing file \"'test/test.addresses'\"
  1674. else
  1675. echo shar: Extracting \"'test/test.addresses'\" \(210 characters\)
  1676. sed "s/^X//" >'test/test.addresses' <<'END_OF_FILE'
  1677. X#! /bin/sh
  1678. X
  1679. X/usr/lib/sendmail -bt -Csun.cf    \
  1680. X| awk                \
  1681. X    '/^> >/ {printf "\n\n"};
  1682. X        {print}
  1683. X    '                \
  1684. X| sed                 \
  1685. X    -e 's/ \$# / mailer = /'    \
  1686. X    -e 's/ \$: / user = /'    \
  1687. X    -e 's/ \$@ / host = /'    
  1688. X
  1689. END_OF_FILE
  1690. if test 210 -ne `wc -c <'test/test.addresses'`; then
  1691.     echo shar: \"'test/test.addresses'\" unpacked with wrong size!
  1692. fi
  1693. chmod +x 'test/test.addresses'
  1694. # end of 'test/test.addresses'
  1695. fi
  1696. if test -f 'test/test.cf' -a "${1}" != "-c" ; then 
  1697.   echo shar: Will not clobber existing file \"'test/test.cf'\"
  1698. else
  1699. echo shar: Extracting \"'test/test.cf'\" \(2437 characters\)
  1700. sed "s/^X//" >'test/test.cf' <<'END_OF_FILE'
  1701. X###################################################
  1702. X##                                               ##
  1703. X##  WARNING: THIS FILE IS TO BE MODIFIED BY      ##
  1704. X##           THE EASE TRANSLATOR (ET) ONLY.      ##
  1705. X##                                               ##
  1706. X##           ALL OTHER MODIFICATIONS WILL        ##
  1707. X##           DISAPPEAR THE NEXT TIME ET IS RUN.  ##
  1708. X##                                               ##
  1709. X##           MAKE MODIFICATIONS TO THE EASE      ##
  1710. X##           SOURCE ONLY.                        ##
  1711. X##                                               ##
  1712. X###################################################
  1713. DAmy_domain
  1714. DBruleset tester V1.0
  1715. Dwwhatever
  1716. Dj$w.$A
  1717. DnMAILER-DAEMON
  1718. DlFrom $g  $d
  1719. Do.:%@!^=/[]{}
  1720. Dq$?x$x    <$g>$|$g$.
  1721. De$j Sendmail $v/$B ready at $b
  1722. OA/usr/lib/aliases
  1723. Odb
  1724. Ou1
  1725. OS/usr/lib/sendmail.st
  1726. OH/usr/lib/sendmail.hf
  1727. Og1
  1728. Oo
  1729. OQ/usr/spool/mqueue
  1730. OT3d
  1731. Os
  1732. OL9
  1733. OtWET
  1734. OF0644
  1735. Orr2h
  1736. OW*
  1737. Pfirst-class=0
  1738. Pspecial-delivery=100
  1739. Pjunk=-100
  1740. Troot daemon uucp network
  1741. Tsimon 
  1742. Ha: The origination date in Arpanet format = $a
  1743. Hb: The current date in Arpanet format = $b
  1744. Hc: The hop count = $c
  1745. Hd: The date in UNIX (ctime) format = $d
  1746. He: The SMTP entry message = $e
  1747. Hf: The sender (from) address = $f
  1748. Hg: The sender address relative to the recipient = $g
  1749. Hh: The recipient host = $h
  1750. Hi: The queue id = $i
  1751. Hj: The official domain name for this site = $j
  1752. Hl: The format of the UNIX from line = $l
  1753. Hn: The name of the daemon (for error messages) = $n
  1754. Ho: The set of operators in addresses = $o
  1755. Hp: Sendmail's pid = $p
  1756. Hq: The default format of sender address = $q
  1757. Hr: Protocol used = $r
  1758. Hs: Sender's host name = $s
  1759. Ht: A numeric representation of the current time = $t
  1760. Hu: The recipient user = $u
  1761. Hv: The version number of sendmail = $v
  1762. Hw: The hostname of this site = $w
  1763. Hx: The full name of the sender = $x
  1764. Hy: The id of the sender's tty = $y
  1765. Hz: The home directory of the recipient = $z
  1766. S3
  1767. R$+    $:{3}$1
  1768. S0
  1769. R$+@$+    $#uucp$@{0_uucp}$2$:{0_uucp}$1
  1770. R$+!$+    $#uucp$@{0_uucp}$1$:{0_uucp}$2
  1771. R$+    $#local$:{0_local}$1
  1772. S1
  1773. R$+    $@{1}$1
  1774. S2
  1775. R$+    $@{2}$1
  1776. S4
  1777. R$+    $@{4}$1
  1778. S10
  1779. R$+    $@{S_local}$1
  1780. S20
  1781. R$+    $@{R_local}$1
  1782. S11
  1783. R$+    $@{S_uucp}$1
  1784. S21
  1785. R$+    $@{R_uucp}$1
  1786. Mlocal, P=/usr/src/local/EUnet/ease/test/args, F=DFlMmnrs, S=10, R=20, A=args mail -d $u
  1787. Mprog, P=/usr/src/local/EUnet/ease/test/args, F=DeFlMns, S=10, R=20, A=args sh -c $u
  1788. Muucp, P=/usr/src/local/EUnet/ease/test/args, F=DFMsUhu, S=11, R=21, M=65535, A=args uumail -h -oc -gA -f$g $h!$u
  1789. END_OF_FILE
  1790. if test 2437 -ne `wc -c <'test/test.cf'`; then
  1791.     echo shar: \"'test/test.cf'\" unpacked with wrong size!
  1792. fi
  1793. # end of 'test/test.cf'
  1794. fi
  1795. if test ! -d 'utils' ; then
  1796.     echo shar: Creating directory \"'utils'\"
  1797.     mkdir 'utils'
  1798. fi
  1799. if test -f 'utils/Makefile' -a "${1}" != "-c" ; then 
  1800.   echo shar: Will not clobber existing file \"'utils/Makefile'\"
  1801. else
  1802. echo shar: Extracting \"'utils/Makefile'\" \(204 characters\)
  1803. sed "s/^X//" >'utils/Makefile' <<'END_OF_FILE'
  1804. X
  1805. BINDIR=../bin
  1806. X#INSTALL=install -m 755 
  1807. INSTALL=cp
  1808. X
  1809. all:    
  1810. clean:
  1811. X
  1812. install:
  1813. X    ${INSTALL} cfdiff.sh  ${BINDIR}/cfdiff
  1814. X    ${INSTALL} cfstrip.sh ${BINDIR}/cfstrip
  1815. X    chmod 755 ${BINDIR}/cfstrip  ${BINDIR}/cfdiff
  1816. X
  1817. END_OF_FILE
  1818. if test 204 -ne `wc -c <'utils/Makefile'`; then
  1819.     echo shar: \"'utils/Makefile'\" unpacked with wrong size!
  1820. fi
  1821. # end of 'utils/Makefile'
  1822. fi
  1823. if test -f 'utils/build-new-aliases' -a "${1}" != "-c" ; then 
  1824.   echo shar: Will not clobber existing file \"'utils/build-new-aliases'\"
  1825. else
  1826. echo shar: Extracting \"'utils/build-new-aliases'\" \(1226 characters\)
  1827. sed "s/^X//" >'utils/build-new-aliases' <<'END_OF_FILE'
  1828. X#!/bin/csh -f
  1829. X# build-new-aliases
  1830. X# Bruce Barnett
  1831. X#
  1832. X# this script makes a new alias file
  1833. X#
  1834. X# first it has to shutdown sendmail
  1835. X# But do it nicely, using kill -15 at first.
  1836. X
  1837. X# how many sendmail processes are running?
  1838. set j = (`ps ax |grep sendmail|grep -v grep`);
  1839. X
  1840. set loopcount = 0
  1841. if ( $#j > 0 ) then
  1842. X
  1843. loop:
  1844. X@    loopcount++
  1845. X    # wait 30 * 30 seconds for all of the sendmail processes to quit
  1846. X    if ( $loopcount > 30 ) then
  1847. X        echo ERROR - can not kill sendmail
  1848. X        goto problem
  1849. X    endif
  1850. X    kill -15 $j[1]
  1851. X    sleep 30
  1852. X    set j = (`ps ax |grep sendmail|grep -v grep`);        
  1853. X    if ( $#j > 0 ) then
  1854. X        goto loop
  1855. X    endif
  1856. endif
  1857. goto good
  1858. problem:
  1859. X# could not kill sendmail - try something drastic
  1860. X    echo `date` kill sendmail >>/usr/spool/adm/build-new-aliases.log
  1861. X    kill -9 $j[1]
  1862. good:
  1863. set frozen = 0
  1864. if ( -f /etc/sendmail.fc )  then
  1865. X    set frozen = 1
  1866. X    /bin/cp /dev/null /etc/sendmail.fc
  1867. endif
  1868. X# clean up any lock files
  1869. touch /usr/spool/mqueue/lf0
  1870. X/bin/rm -f /usr/spool/mqueue/lf*
  1871. X
  1872. X# see the documentation about the 'a' option of sendmail
  1873. X# or the "D" option
  1874. X#/usr/lib/newaliases
  1875. X# rebuild aliases
  1876. X/usr/lib/sendmail -bi
  1877. X
  1878. if ( $frozen > 0 ) then
  1879. X    /usr/lib/sendmail -bz
  1880. endif
  1881. X
  1882. X# restart the daemon with 30 minutes between cycles
  1883. X/usr/lib/sendmail -bd -q30m -om
  1884. END_OF_FILE
  1885. if test 1226 -ne `wc -c <'utils/build-new-aliases'`; then
  1886.     echo shar: \"'utils/build-new-aliases'\" unpacked with wrong size!
  1887. fi
  1888. chmod +x 'utils/build-new-aliases'
  1889. # end of 'utils/build-new-aliases'
  1890. fi
  1891. if test -f 'utils/cfdiff.sh' -a "${1}" != "-c" ; then 
  1892.   echo shar: Will not clobber existing file \"'utils/cfdiff.sh'\"
  1893. else
  1894. echo shar: Extracting \"'utils/cfdiff.sh'\" \(523 characters\)
  1895. sed "s/^X//" >'utils/cfdiff.sh' <<'END_OF_FILE'
  1896. X#!/bin/sh
  1897. X# Bruce Barnett
  1898. X# usage:
  1899. X# cfdiff file1.cf file2.cf
  1900. X# this removes all comments from the cf file
  1901. case  $#  in
  1902. X    0|1)
  1903. X    echo usage: cfdiff file1 file2;
  1904. X    exit 1
  1905. X    ;;
  1906. esac
  1907. X[ ! -f $1 ] && {
  1908. X    echo file $1 does not exist;
  1909. X    exit 1;
  1910. X};
  1911. X[ ! -f $2 ] && {
  1912. X    echo file $2 does not exist;
  1913. X    exit 1;
  1914. X}
  1915. X# if SunOS, use the -b -w option
  1916. DIFF="diff -b"
  1917. ARG1=`basename $1`
  1918. ARG2=`basename $2`
  1919. X[ $ARG1 = $ARG2 ] && {
  1920. X    ARG2=$ARG2-
  1921. X}
  1922. cfstrip <$1>/tmp/$ARG1
  1923. cfstrip <$2>/tmp/$ARG2
  1924. X
  1925. cd /tmp
  1926. X${DIFF} $ARG1 $ARG2
  1927. X
  1928. X/bin/rm /tmp/$ARG1 /tmp/$ARG2
  1929. END_OF_FILE
  1930. if test 523 -ne `wc -c <'utils/cfdiff.sh'`; then
  1931.     echo shar: \"'utils/cfdiff.sh'\" unpacked with wrong size!
  1932. fi
  1933. chmod +x 'utils/cfdiff.sh'
  1934. # end of 'utils/cfdiff.sh'
  1935. fi
  1936. if test -f 'utils/cfstrip.sh' -a "${1}" != "-c" ; then 
  1937.   echo shar: Will not clobber existing file \"'utils/cfstrip.sh'\"
  1938. else
  1939. echo shar: Extracting \"'utils/cfstrip.sh'\" \(686 characters\)
  1940. sed "s/^X//" >'utils/cfstrip.sh' <<'END_OF_FILE'
  1941. X#!/bin/sh
  1942. X# usage:
  1943. X#    cfstrip <infile >outfile
  1944. X# Bruce Barnett
  1945. X#
  1946. X# this file strips out all comments from a sendmail.cf file
  1947. X# it also converts 
  1948. X#    <tab>[whitespace]     to     <tab>
  1949. X#    <space>[whitespace]    to    <space>
  1950. X#    <space>$        to    $
  1951. X#    <space><        to    <
  1952. X#    <space>@        to    @
  1953. case  $#  in
  1954. X    0)
  1955. X        ;;
  1956. X    *)
  1957. X        echo no arguments are allowed;
  1958. X        exit 1
  1959. X        ;;
  1960. esac
  1961. sed -e '
  1962. s/^#.*//
  1963. s/^\(R[^    ]*[    ][    ]*[^    ]*\)[    ]*.*$/\1/
  1964. s/^\(R[^    ]*[    ][    ]*[^    ]*\)[    ]*$/\1/
  1965. s/^\(R[^    ]*[    ][    ]*[^    ]*\)$/\1/
  1966. s/    [     ]*/    /g
  1967. s/ [     ]*/ /g
  1968. s/ \$/$/g
  1969. s/ </</g
  1970. s/ @/@/g
  1971. X# convert multiple tabs into one tab
  1972. s/        */    /g
  1973. X# this one will really remove most spaces
  1974. s/^R\([^ ]*\) \([^ ]*\)/R\1\2/g
  1975. X# remove a space in "T root"
  1976. s/^T */T/
  1977. X/^[     ]*$/d
  1978. X' 
  1979. END_OF_FILE
  1980. if test 686 -ne `wc -c <'utils/cfstrip.sh'`; then
  1981.     echo shar: \"'utils/cfstrip.sh'\" unpacked with wrong size!
  1982. fi
  1983. chmod +x 'utils/cfstrip.sh'
  1984. # end of 'utils/cfstrip.sh'
  1985. fi
  1986. echo shar: End of archive 1 \(of 6\).
  1987. cp /dev/null ark1isdone
  1988. MISSING=""
  1989. for I in 1 2 3 4 5 6 ; do
  1990.     if test ! -f ark${I}isdone ; then
  1991.     MISSING="${MISSING} ${I}"
  1992.     fi
  1993. done
  1994. if test "${MISSING}" = "" ; then
  1995.     echo You have unpacked all 6 archives.
  1996.     rm -f ark[1-9]isdone
  1997. else
  1998.     echo You still need to unpack the following archives:
  1999.     echo "        " ${MISSING}
  2000. fi
  2001. ##  End of shell archive.
  2002. exit 0
  2003.