Ease 3.0: High Level Language for Sendmail (Part 1 of 6)

Bruce Barnett barnett at grymoire.crd.ge.com
Sat Feb 23 18:12:35 AEST 1991


#! /bin/sh
# This is a shell archive.  Remove anything before this line, then unpack
# it by saving it into a file and typing "sh file".  To overwrite existing
# files, type "sh file -c".  You can also feed this as standard input via
# unshar, or by typing "sh <file", e.g..  If this archive is complete, you
# will see the following message at the end:
#		"End of archive 1 (of 6)."
# Contents:  CONVERTING Makefile README TESTING TODO cfc/Makefile
#   debug/Makefile debug/debug.in debug/showhow debug/showwhere
#   doc/Makefile doc/ap1 doc/ap2 doc/ap3 doc/ap4 doc/cover
#   doc/ease.man doc/et.man src/ease.sh src/fixstrings.c
#   src/fixstrings.h src/symtab.h test/README test/args
#   test/test.addresses test/test.cf utils/Makefile
#   utils/build-new-aliases utils/cfdiff.csh utils/cfstrip.csh
# Wrapped by barnett at grymoire on Sat Feb 23 01:13:46 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo mkdir cfc bin debug doc src test utils
mkdir cfc bin debug doc src test utils
if test -f CONVERTING -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"CONVERTING\"
else
echo shar: Extracting \"CONVERTING\" \(3448 characters\)
sed "s/^X//" >CONVERTING <<'END_OF_CONVERTING'
X=====================================================================
X	Converting a sendmail file into ease
X
X
XStep 1.  Use cfc to convert the sendmail file into ease.
X	You may want to use "make convert" in the top Makefile
X
X	As a start, use the following arguments to cfc 
X
X	SunOS 4.0, /usr/lib/sendmail.subsidiary.cf
X		=> cfc -s -C V < /usr/lib/sendmail.subsidiary.cf>sendmail.ease
X
X	SunOS 4.0, /usr/lib/sendmail.main.cf
X
X		=> cfc -s < /usr/lib/sendmail.main.cf>sendmail.ease
X
X
X	Ultrix 3.0: 
X
X		=> cfc -d -C SDIZFN </etc/sendmail.cf >sendmail.ease
X
X	IDA sendmail
X
X		=> cfc -i
X
X	4.2 sendmail
X
X		=> cfc -c
X
X	4.3 sendmail
X
X		=> cdc -u
X
X	HP/UX
X		=> cfc -i -CGUS
X
X
XStep 2.  Convert the ease file to cf: 
X
X	% et <sendmail.ease >sendmail.cf
X
X	Look at the errors and warnings.
X
X	Most of these errors can be eliminated by using the right
X	flags on cfc. Make sure that you specify all of the
X	classes (using the -C flag ) that you need, which generate
X	the matching field definitions for any_in_? fields.
X	Then repeat the cf-> ease translation with the necessary
X	-C XYZ flags.
X
X	The remaining errors are either warnings or mistakes
X	in the translation. NOTE: - some configuration files use macros 
X	that are not defined. For instance, Sun's sendmail.main.cf has 
X	an undefined D macro. Ultrix has several undefined macros, that if
X	you define them, cause your sendmail to exhibit change behavior.
X	These are warnings, and are perfectly fine. If you want to
X	you can define the missing rulesets. Don't define the missing
X	macros unless you examine the sendmail rules and see what happens with
X	the change.
X
X	So look at the warnings and errors, and repeat step 1 until you 
X	feel comfortable with the change.
X
X	If you can't get cfc/ease to accept the new syntax, use the
X	asm(" ") construct to work around it and report the bugs.
X
XStep 3. Verify the ease output matches the original sendmail
X
X	You can use  "make test_conversion" it you wish
X
X	At this point, you should verify that the ease output is identical to
X	the original sendmail.cf file. Use the script cfdiff to
X	compare the original sendmail.cf file with the ease output file.
X
X	That is, if your original sendmail file is /etc/sendmail.cf,
X	and the new one is ./sendmail.cf, do a
X
X	 set path = ( $cwd/bin $path );rehash;cfdiff /etc/sendmail.cf ./sendmail.cf
X
X	You will see some differences in lines that have been split into
X	two lines, and the "Ob" option is converted into the more
X	verbose "Obackground" option. If there is any other difference, 
X	please send me a bug report, and see if you can make changes to your
X	ease input file to match the original file. You may need the asm("")
X	command.
X
X	If your diff program has the -w option, you can ignore spaces in the
X	cf files. Occasionally ease inserts some extra spaces. Or the
X	original sendmail file has extra spaces. (e.g. SunOS).
X	See the script cfdiff.
X
XStep 4. Once you have the ease file in good form, put it under sccs
X	control, and put the version number (%W% in the V macro
X	definition, so the "Received-by" header line reflects the revision.)
X
XYou are now ready to debug your sendmail file.
XSee the file TESTING
X============================================================================
X
XIf you find these programs useful, or if you have suggestions or changes,
Xplease drop me a line.
X
X	Bruce Barnett
X	General Electric
X	Corporate Research and Development
X	P. O. Box 8, 1 River Road
X	Schenectady, NY 12302
X
X	barnett at crdgw1.ge.com
END_OF_CONVERTING
if test 3448 -ne `wc -c <CONVERTING`; then
    echo shar: \"CONVERTING\" unpacked with wrong size!
fi
chmod +x CONVERTING
# end of overwriting check
fi
if test -f Makefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"Makefile\"
else
echo shar: Extracting \"Makefile\" \(2373 characters\)
sed "s/^X//" >Makefile <<'END_OF_Makefile'
X# where do you want to place the binaries and scripts?
X# the programs are: et cfc cfdiff cfstrip
XBINDIR=`pwd`/bin
X
X#where is your original sendmail file?
X#ORIGINAL=/etc/sendmail.cf
XORIGINAL=/usr/lib/sendmail.cf
X#ORIGINAL=/usr/lib/sendmail.main.cf
X#ORIGINAL=/usr/lib/sendmail.subsidiary.cf
X
X# What arguments to cfc do you want for cfc (see the file CONVERT)
XCONVERT_FLAGS=-s -CV
X
X#what extenstion do you want for the manual pages?
X#EXT=1
X#EXT=l
XEXT=n
XSHELL=/bin/sh
X
X
Xall:
X	cd cfc; ${MAKE} ${FLAGS}  $@
X	cd src; ${MAKE} ${FLAGS}  $@
X	cd utils; ${MAKE} ${FLAGS}  $@
X	touch all
X	
Xinstall:
X	test -d ${BINDIR} || mkdir ${BINDIR}
X#	cd cf; make $(MFLAGS) $@
X	BD=${BINDIR};cd cfc; ${MAKE} ${MFLAGS} BINDIR=$$BD $@
X	BD=${BINDIR};cd src; ${MAKE} ${MFLAGS} BINDIR=$$BD $@
X	BD=${BINDIR};cd utils; ${MAKE} ${MFLAGS} BINDIR=$$BD $@
X	cd doc; ${MAKE} ${MFLAGS} EXT=${EXT} $@
X
X
X
Xconvert:	${ORIGINAL} all 
X		${BINDIR}/cfc ${CONVERT_FLAGS} < ${ORIGINAL} >sendmail.ease
X
Xtest_conversion:	${ORIGINAL} sendmail.cf
X	PATH=${BINDIR}:$$PATH;export PATH;cfdiff ${ORIGINAL} sendmail.cf
X
Xclean:
X#	cd cf; make $(MFLAGS) $@
X	cd src; ${MAKE} ${MFLAGS} $@
X	cd cfc; ${MAKE} ${MFLAGS} $@
X	cd utils; ${MAKE} ${MFLAGS} $@
X
Xdebug:	all sendmail.ease
X	BD=${BINDIR};cd debug; ${MAKE} ${MFLAGS} BINDIR=$$BD $@
Xsendmail.ease:
X	@ echo where is the sendmail.ease file you want to debug?	
X
Xsendmail.cf: all sendmail.ease
X	${BINDIR}/et <sendmail.ease >sendmail.cf
X
Xhostname.ease: SCCS/s.hostname.ease
X	sccs get hostname.ease
X
Xhostname.cf:	hostname.ease
X	et -C <hostname.ease >hostname.cf
X
Xinstall_hostname: hostname.cf
X	@sccs check
X	/bin/mv ${ORIGINAL} ${ORIGINAL}.old
X	/bin/cp hostname.cf ${ORIGINAL}
X	build-new-aliases
X
Xmail: Part01 Part02 Part03 Part04 Part05 Part06
X	@ WHO=${WHO} && \
X	[ $${WHO:-missing} = missing ] && \
X	echo USAGE:  make mail WHO=address || \
X	(( mail -s "Ease 3.0: Part 1 of 6" $${WHO} <Part01) ;\
X	 ( mail -s "Ease 3.0: Part 2 of 6" $${WHO} <Part02) ;\
X	 ( mail -s "Ease 3.0: Part 3 of 6" $${WHO} <Part03) ;\
X	 ( mail -s "Ease 3.0: Part 4 of 6" $${WHO} <Part04) ;\
X	 ( mail -s "Ease 3.0: Part 5 of 6" $${WHO} <Part05) ;\
X	 ( mail -s "Ease 3.0: Part 6 of 6" $${WHO} <Part06; ))
X
Xdepend lint print:
X	-for dir in *; do [ -f $$dir/[Mm]akefile ] && (cd $$dir; make $(MFLAGS) $@); done
X
Xshar:
X	dirname=`basename $$PWD`; cd ..; shar `find $$dirname -name RCS -prune -o -type f -print` >/tmp/ease.shar
X
END_OF_Makefile
if test 2373 -ne `wc -c <Makefile`; then
    echo shar: \"Makefile\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f README -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"README\"
else
echo shar: Extracting \"README\" \(7378 characters\)
sed "s/^X//" >README <<'END_OF_README'
XREADME - Tue May  1 14:46:33 PDT 1990
X
XThis is release 3.0 of the CFC and Ease programs.
X
XEase is a compiler for sendmail configuration files.  It reads a high-level
Xmail configuration language and produces a sendmail.cf file.  If you've ever
Xstared at a sendmail.cf, you know why this is valuable.
X
XCfc is performs the inverse operation: it converts sendmail.cf files into
Xsource for ease.  It gives you hope for working with your existing sendmail.cf
Xfiles.
X
XThis is a fresh posting of the entire source for 'ease' and "cfc'.
XIt incorporates all of the previous netwide posting (version 2.0),
Xplus some additional support for new and undocumented sendmail features.
X
XEase was written by
X    James S. Schoner, Purdue University Computing Center,
X		      West Lafayette, Indiana  47907
Xand is copyright (c) 1985 by Purdue Research Foundation.
X
XEase has been enhanced and maintained by various persons, most notably
X    Arnold D. Robbins (arnold at unix.cc.emory.edu),
X    Bruce Barnett (barnett at crdgw1ge.com,  uunet!crdgw1!barnett)
X    Stephen Schaefer of Bowling Green State University,
X    Raymond A. Schnitzler of Bellcore,
X    Andrew Partan of the Corporation for Open Systems,
X    Rich Salz of Bolt Beranak, and Newman.
X
XCfc was written by Arnold D. Robbins, and has been enhanced by Bruce Barnett
X(see below).
X
XNotable changes to cfc since release 2.0 are described in the note
Xfrom Bruce Barnett below.
X
X
X	-----------------------------------------------------------
X
X		Ease 3.0 and cfc Release Notes:
X		Bruce Barnett barnett at crdgw1.ge.com
X		February 1991
X
XThis document describes Ease 3.0. This version was originally a
Xmodified version of the last official release of ease 2.1. I called it
X2.1 Beta and sent it to several dozen people. I sent the patches to the authors
Xof ease and cfc, but an updated version was never posted to the net.
XThe authors have decided to let me post the changes, so I guess I have
Xthe baton now.
X
XSince this is a major release, I decided to call it Ease 3.0
X
XThe main feature of Ease/Cfc 3.0:
X
X
X	I subjected the Cfc/Ease programs to a test suite
X	that converted *.cf files to ease files, and back again.
X	I compared the input of cfc  (The original .cf file)
X	to the output of ease. The goal was twofold:
X
X		1. To automatically produce an Ease file than can
X		   be used to generate a .cf file identical to the original
X		2. To produce an Ease file that can be used without
X			editing. You will see warnings, and possible errors 
X			that came from the vendor's supplied sendmail.cf
X			file. But in a few minutes time, you should have a 
X			working, and error free, ease version of your 
X			sendmail.cf file.
X
X	In other words, you can start using ease as a high level
Xlangauge and feel confident that you won't break anything.
X	
X
XCurrent status of Ease 3.0
X	It will handle 100% of the standard Ultrix, SunOS, HP, and Berkeley
X	versions of sendmail (I hope). It handles 99% of the IDA
X	enhancement package. See the TODO file for problems.
X
X	I don't plan to do any major work maintaining this package,
Xbut I will gladly accept bug fixes and enhancements.
X
XNew features of the Ease grammar at a glance:
X
XAdded asm("") command. This can be used to insert something strange into
X	the sendmail file. Or something Ease or cfc is too stupid to
X	translate properly. This is the work-around for the new/fancy
X	stuff.
X
XExample:
X	asm("Dq$?x$!x <$g>$|$g$.");
X
XAdded eval()	[$&]
X
XSunOS 4.0 support:
X	Added m_domain
X	Added o_maxempty
X	Added o_maxhops	
X	Added o_nfs	
X	Added o_aliasfile
X	Added ypmap()	[${   $} on RHS]
X
X	Added default definitions of
X		any_in_etc_hosts
X		any_in_mydomainname
X		any_in_myhostname
X
XUltrix 3.0 support:
X	Added f_mail11
X	Added ypalias()  [${ on LHS]
X	Added yppasswd() [$" on LHS]
X
XHP/UX support:
X	added o_nameserver	OI
X	added program()		$<
X
XIDA support:
X	Added f_relativize
X	Added m_uucpname
X	Added o_envelope
X	Added f_bsmtp
X	Support for Header/Envelope re-write rulesets (S=20/21)
X	alias()			$(@	in RHS
X	quote()			$!	in headers
X
X	resolved():
X	# 	if (resolved( one_or_more ))	/* found one, return it */
X	# 		resolve (mailer ($1));
X	R$#$+	$#$1
X
X	nested rulesets:
X	# 	if ( one_or_more @. one_or_more ? one_or_more )	/* relativize & return */
X	# 		resolve (mailer (TCP),
X	# 				host ($3 ),
X	# 				user (retry (RULESET_28($1 at .$2))));
X	R$+ at .$+?$+	$#TCP$@$3$:$>28 $1 at .$2
X				user (retry (RULESET_28($1 at .$2))));
X
X	canon with default value:
X	# 	if ( one_or_more @ exactly_one )	/* host: try name server */
X	# 		return ( $1@ canon ( $2 default (  $2."UUCP ")));
X	R$+@$-	$@$1@$[$2$:$2.UUCP $]
X
X
XNot everything in IDA is supported. (Remember to use the asm() command!)
X
X----------------
XGeneral Improvements to the Ease Program:
X	Improved reporting of syntax errors
X	Built in use of /lib/cpp
X		if et is given a CPP flag, it will call it.
X	If a macro is a single upper case letter, and has not been defined
X	the letter assigned to it will be the same as the macro name.
X	This allows the original input file to be compared to the ease
X	output.
X
X	There have been some substantial changes to the grammar handling.
X	Several improvements have been made to the error reporting.
X	In addition, ease supports the -d flag, which is used to debug
X	the parser.  (See the makefile if you are interested in this.)
X
X	Several bugs were fixed, including a lot of problems with the ifset()
X	construct. It's still not perfect. See the manual page for cfc(local)
X
X----------------------------
XChanges to CFC (Sendmail.cf to ease translator):
X
X	Added new flags to cfc:
X	-s => SunOS
X	-i => IDA sendmail
X	-d => Ultrix
X	-C [..] => add predefined classes 
X		e.g. -C ADG => added classes A, B, and G
X
XSee the file CONVERTING on tips to convert your sendmail file into ease.
XI have included some scritps that can compare the original sendmail
Xfile to the output of ease. If the rules are identical, then you can
Xfeel comfortable using ease instead of raw cf.
X
X
X--------------
XI have also included the document TESTING, along with some
Xshellscripts that I use to perform regression testing of sendmail.
XWhen I make a major change to my sendmail rules, I run a series of
Xaddresses through sendmail and look at the differences. This way I can
Xcheck for address rewrite errors before I install a new version.
X
XI have also include a document called INTRO, that gives a simple
Xintroduction to sendmail. You may want to look at the file
X	debug/Makefile
Xas this gives you an example how I do it.
X
XThis package also includes two more goodies:
X
X	build-new-aliases - this is a shell script I use to 
X		kill sendmail, rebuild the aliases, and restart
X		sendmail. The problem is sometimes a kill -15 won't
X		immediately stop sendmail from running. This gives
X		the daemons a change to clean up first.
X
XAlso - see the directory test. This includes a shell script to test
Xsendmail files, written by Simon Kenyon. You have two ways to debug
Xsendmail files now!
X
X============================================================================
X
XIf you find these programs useful, or if you have suggestions or changes,
Xplease drop me a line. I would really appreciate any patches to this
Xpackage, as I don't plan any major upgrade to support all of the IDA
Xextensions. I will merge any patches and release new versions, as they
Xare sent to me. 
X
X	Bruce Barnett
X	General Electric
X	Corporate Research and Development
X	P. O. Box 8, 1 River Road
X	Schenectady, NY 12301
X
X	barnett at crdgw1.ge.com
X
X
END_OF_README
if test 7378 -ne `wc -c <README`; then
    echo shar: \"README\" unpacked with wrong size!
fi
chmod +x README
# end of overwriting check
fi
if test -f TESTING -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"TESTING\"
else
echo shar: Extracting \"TESTING\" \(2010 characters\)
sed "s/^X//" >TESTING <<'END_OF_TESTING'
X	Testing Sendmail Configuration files
X
XI have written some shell scripts called "showhow" and "showwhere"
Xthat can be used to test your sendmail configuration file.
X
XYou create an input file with a set of addresses to test.  You run the
Xscript and it generates an output file, showing the results of each
Xaddress. When I make a major change to a sendmail file, I run the test
Xsuite on it, comparing the results with the last time I tested the
Xaddress. I can use this to see in any of the 400 addresses in my test
Xsuite will behave differently with the new configuration file. My
Xaddresses won't help you, so you have to be creative and add your own.
XHere are some guidelines.
X
XThe format or the input file debug.in is:
X		rulesets	address
X	or
X		rulesets		address comment
X
XUse the second if ruleset does not start with a '0'. I'll explain this later.
X
X	Example:
X
X		0	user at some.do.main
X		0	site!user%site2 at site3.com
X		22,4	user at localsite	Sender_via_UUCP
X
Xwhere 22 is a mailer rewrite ruleset for a mailer (i.e. UUCP).
X
XRuleset 0 must be avoided when testing the re-write rules for
Xmailers because ruleset 0 outputs a triple (user, host, mailer), 
Xand only one part (user) passed to the mailers.
X
XThe makefile generates a file in tbl(1) format that 
Xlists the following:
X
X	ruleset		address	  mailer hostname user
X
XShowing the resolved triplet for each address
X
XI think the scripts I have will work on IDA, SunOS 4.0, and Ultrix 3.0
Xsendmail executables. The problem is that older sendmails output debug
Xinfo using ^V, etc. instead of $#.  The script is set up to work with
XUltrix 3.0.  The sendmail with SunOS used a different set of
Xcharacters to indicate the results of a rule (^W instead of ^V).
X
XI have set up a makefile in the debug directory that you can use
X	
X	make	 - tests your sendmail file against a known good file
X		good.out. Once you have a working set of rules, copy
X		debug.out to good.out
X
X	make report 	will print a table of all of the addresses				resolved to the address, mailer, and hostname
X
END_OF_TESTING
if test 2010 -ne `wc -c <TESTING`; then
    echo shar: \"TESTING\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f TODO -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"TODO\"
else
echo shar: Extracting \"TODO\" \(670 characters\)
sed "s/^X//" >TODO <<'END_OF_TODO'
XThings to do for Ease 3.?
X	Support More IDA extensions
X		dbm()			$(x	in RHS
X		Keyed databases		OKP/usr/lib/aliases
X		Ignore case when checking for mailer names existance
X			(local vs. LOCAL)
X
X	Eliminate the concat() construct.
X
X	check for if (exactly_one) next($2); type error.
X	check for matching < and > in rulesets
X	Check for mailers "local" and "prog" 
X
XCFC improvements
X	Make it a real two-pass parser. This way, it can
X	properly specify the rulesets, macros, and classes it
X	needs.
X
XError Detections
X	Eliminate syntax errors that just report "syntax error"	
X
X--
XBruce G. Barnett        <barnett at crdgw1.ge.com>  a.k.a.
X<barnett@[192.35.44.4]>  uunet!crdgw1!barnett
END_OF_TODO
if test 670 -ne `wc -c <TODO`; then
    echo shar: \"TODO\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f cfc/Makefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"cfc/Makefile\"
else
echo shar: Extracting \"cfc/Makefile\" \(934 characters\)
sed "s/^X//" >cfc/Makefile <<'END_OF_cfc/Makefile'
XCC	      =	cc
XCFLAGS	      = -g 
XBINDIR		= ../bin
XEXTHDRS	      = /usr/include/ctype.h \
X		/usr/include/stdio.h
XHDRS	      =
XLDFLAGS	      =
XLIBS	      =
XLINKER	      = $(CC)
XMAKEFILE      = Makefile
XOBJS	      = cfc.o
XPRINT	      = pr
XPROGRAM	      = cfc
XSRCS	      = cfc.c
X#INSTALL	      = install -s
XINSTALL	      = cp
Xall:		$(PROGRAM)
X
X$(PROGRAM):     $(OBJS) $(LIBS)
X		@echo -n "Loading $(PROGRAM) ... "
X		@$(LINKER) $(LDFLAGS) $(OBJS) $(LIBS) -o $(PROGRAM)
X		@echo "done"
X
Xlint:
X		lint cfc.c
Xclean:;		@rm -f $(OBJS) $(PROGRAM) core
X
Xdepend:;	@mkmf -f $(MAKEFILE) "CFLAGS=$(CFLAGS)" PROGRAM=$(PROGRAM) BINDIR=$(BINDIR)
X
Xindex:;		@ctags -wx $(HDRS) $(SRCS)
X
Xinstall:	$(PROGRAM)
X		@echo Installing $(PROGRAM) in $(BINDIR)
X		${INSTALL} $(PROGRAM) $(BINDIR)
X
Xprint:;		@$(PRINT) $(HDRS) $(SRCS)
X
Xprogram:        $(PROGRAM)
X
Xtags:           $(HDRS) $(SRCS); @ctags $(HDRS) $(SRCS)
X
X###
Xcfc.o: /usr/include/stdio.h /usr/include/ctype.h
END_OF_cfc/Makefile
if test 934 -ne `wc -c <cfc/Makefile`; then
    echo shar: \"cfc/Makefile\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f debug/Makefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"debug/Makefile\"
else
echo shar: Extracting \"debug/Makefile\" \(988 characters\)
sed "s/^X//" >debug/Makefile <<'END_OF_debug/Makefile'
X# makefile for doing regression tests on sendmail files
XBINDIR=../bin
X
Xall: debug
Xdebug:	good.out debug.out sendmail.cf
X	diff debug.out good.out 
X
Xsendmail.ease: ../sendmail.ease
X	@echo getting your ease file from the top directory
X	cp ../sendmail.ease .
Xsendmail.cf:	sendmail.ease
X	${BINDIR}/et -C sendmail.ease >sendmail.cf
Xdebug.out:	debug.in sendmail.cf
X	showwhere < debug.in	>debug.out
Xdebug.tbl:	debug.out
X	echo ".TS"	>debug.tbl
X	echo "l l l l l"	>>debug.tbl
X	echo "l l l l l." >>debug.tbl
X	echo "Ruleset	Input	Mailer	hostname	User" >>debug.tbl
X	cat debug.out >>debug.tbl
X	echo ".TE" >>debug.tbl
Xreport:	debug.tbl
X	tbl debug.tbl | ptroff
X	
Xgood.out: 
X	@ echo you have to create this yourself by typing
X	@ echo "	cp debug.out good.out"
X	@ echo do this once you feel your sendmail test suite
X	@ echo has results that you feel are correct
X	@ echo 
X	@ echo do this everytime you feel you want to update
X	@ echo your test suite
X	@ cp good.out /dev/null
X
X
Xclean:
X	rm debug.out debug.tbl 
END_OF_debug/Makefile
if test 988 -ne `wc -c <debug/Makefile`; then
    echo shar: \"debug/Makefile\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f debug/debug.in -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"debug/debug.in\"
else
echo shar: Extracting \"debug/debug.in\" \(396 characters\)
sed "s/^X//" >debug/debug.in <<'END_OF_debug/debug.in'
X0	user
X0	user at localhost
X0	user%localhost at localhost
X0	barnett at crdgw1.ge.com
X0	crdgw1.uucp!barnett
X0	barnett at crdgw1.uucp
X0       user at some.do.main
X0       site!user%site2 at site3.com
X0	site1!site2!site3!user
X0	site1!site2!site3!user at localhost
X0	site1!site2!site3!user at machine.edu
X0	site1!crd.ge.com!barnett
X0	site1!crd.ge.com!barnett at crd.ge.com
X0	user at bogus
X22,4    user at crdgw1.UUCP  Sender_via_UUCP
END_OF_debug/debug.in
if test 396 -ne `wc -c <debug/debug.in`; then
    echo shar: \"debug/debug.in\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f debug/showhow -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"debug/showhow\"
else
echo shar: Extracting \"debug/showhow\" \(1262 characters\)
sed "s/^X//" >debug/showhow <<'END_OF_debug/showhow'
X#!/bin/sh  
X# written by Bruce Barnett <barnett at crdgw1.ge.com>
X# Inspired from
X#	Dan Long
X# 	CSNET Technical Staff
X# 	long at sh.cs.net
X#
X#	This script converts the sendmail debug output into something 
X#	easier to parse.
X#	Some sendmail programs output ^V, ^W, ^X
X#	This script converts ^V to $#, ^X to $:, and ^W to $@
X#	This matches Ultrix 3.1. SunOS 3.5 is different
X#	Other sendmail versions output in the $:, $@, $# format
X#	So this script just ignores those characters, 
X#	as they are already correct.
X#
X#define your sendmail program compiled for debug
XSENDMAIL=/usr/lib/sendmail
Xif [ $# -lt 2 ]
Xthen
X	echo 'Usage: showhow rulesets address [mailer]' 1>&2;exit 2;
Xfi
X#FLAGS='-d21.12'
XFLAGS=''
Xcase $1 in
X0*)
X	echo "$1 $2" | ${SENDMAIL} -bt -Csendmail.cf $FLAGS  |\
X	egrep '\$\#|\^V' |\
X	tail -1 |tr -d '"' |\
X	sed \
X		-e 's/\^V/$#/' \
X		-e 's/\^X/$:/' \
X		-e 's/\^W/$@/' \
X		-e 's/^[a-zA-Z ][:a-zA-Z0-9 ]*//' \
X		-e 's/local \$:/local $@ local $:/' \
X		-e 's/\$# //' \
X		-e 's/ \$@ /	/' \
X		-e 's/ \$: /	/' \
X		-e 's/ //g' 
X	;;
X*)	# else a rewrite rule for a mailer
X	if [ X$3 = X ]
X	then
X		mailer='-';
X	else
X		mailer=$3;
X	fi
X	echo "$1 $2" | ${SENDMAIL} -bt -Csendmail.cf $FLAGS |\
X	egrep "^rewrite:"|tail -1 |tr -d '" '|\
X	sed "s/^.*:/$mailer	/"
X	;;
Xesac
X
X
X
X
END_OF_debug/showhow
if test 1262 -ne `wc -c <debug/showhow`; then
    echo shar: \"debug/showhow\" unpacked with wrong size!
fi
chmod +x debug/showhow
# end of overwriting check
fi
if test -f debug/showwhere -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"debug/showwhere\"
else
echo shar: Extracting \"debug/showwhere\" \(207 characters\)
sed "s/^X//" >debug/showwhere <<'END_OF_debug/showwhere'
X#!/bin/sh 
X# Written By Bruce Barnett
Xwhile :
Xdo
X	read username
X#	echo i just read in  $username
X	if [ $? -eq 0 ]
X	then
X		x="`./showhow $username`"
X			echo $username  $x | tr ' ' '	'
X	else
X		exit 0
X	fi
Xdone
END_OF_debug/showwhere
if test 207 -ne `wc -c <debug/showwhere`; then
    echo shar: \"debug/showwhere\" unpacked with wrong size!
fi
chmod +x debug/showwhere
# end of overwriting check
fi
if test -f doc/Makefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/Makefile\"
else
echo shar: Extracting \"doc/Makefile\" \(869 characters\)
sed "s/^X//" >doc/Makefile <<'END_OF_doc/Makefile'
X#! /bin/make -f
X#
X# $Header: Makefile,v 1.2 87/12/23 11:30:27 root Locked $
X#
X# $Log:	Makefile,v $
X# Revision 1.2  87/12/23  11:30:27  root
X# Added new appendix. ADR.
X# 
X# Revision 1.1  87/12/23  10:40:45  root
X# Initial revision
X# 
X#
X#
X#	Makefile for Ease document.
X#
X#	James S. Schoner
X#	Purdue University Computing Center
X#
X
XEXT=l
XMANDEST = /usr/man/man${EXT}
XROFF=ptroff
X
Xall:	cover mainbody apen1 apen2 apen3 apen4
X	
Xcover: FRC
X	${ROFF} -ms cover
X
Xmainbody:
X	tbl ease.paper | ${ROFF} -ms
X
Xapen1:
X	tbl ap1 | ${ROFF} -ms
X
Xapen2:
X	tbl ap2 | ${ROFF} -ms
X
Xapen3:
X	tbl ap3 | ${ROFF} -ms
X
Xapen4:
X	tbl ap4 | ${ROFF} -ms
X
X
Xinstall:
X	install -c ease.man $(MANDEST)/ease.${EXT}
X	install -c et.man $(MANDEST)/et.${EXT}
X	install -c cfc.man $(MANDEST)/cdc.${EXT}
X
Xprintman: ease.man et.man cfc.man
X	${ROFF} -man ease.man
X	${ROFF} -man et.man
X	${ROFF} -man cfc.man
X
XFRC:
X
Xclean:
END_OF_doc/Makefile
if test 869 -ne `wc -c <doc/Makefile`; then
    echo shar: \"doc/Makefile\" unpacked with wrong size!
fi
chmod +x doc/Makefile
# end of overwriting check
fi
if test -f doc/ap1 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/ap1\"
else
echo shar: Extracting \"doc/ap1\" \(1490 characters\)
sed "s/^X//" >doc/ap1 <<'END_OF_doc/ap1'
X.DS C
X\s+5\fBAppendix A\fR
X
X
X\fBPre-Declared Macros\fR\s-5
X.DE
X.sp 5
X.TS 
Xcenter box;
Xc|c|c
Xl|l|l.
X\fBEase\fR Macro	Raw Equivalent	Meaning*
X=
X\fIm_odate\fR	a	The origination date in Arpanet format
X\fIm_adate\fR	b	The current date in Arpanet format
X\fIm_hops\fR	c	The hop count
X\fIm_udate\fR	d	The date in UNIX (ctime) format
X\fIm_smtp\fR	e	The SMTP entry message
X\fIm_saddr\fR	f	The sender (from) address
X\fIm_sreladdr\fR	g	The sender address relative to the recipient
X\fIm_rhost\fR	h	The recipient host
X\fIm_qid\fR	i	The queue id
X\fIm_oname\fR	j	The official domain name for this site
X\fIm_ufrom\fR	l	The format of the UNIX from line
X\fIm_daemon\fR	n	The name of the daemon (for error messages)
X\fIm_addrops\fR	o	The set of "operators" in addresses
X\fIm_pid\fR	p	Sendmail's pid
X\fIm_defaddr\fR	q	The default format of sender address
X\fIm_protocol\fR	r	Protocol used
X\fIm_shostname\fR	s	Sender's host name
X\fIm_ctime\fR	t	A numeric representation of the current time
X\fIm_ruser\fR	u	The recipient user
X\fIm_version\fR	v	The version number of sendmail
X\fIm_sitename\fR	w	The hostname of this site
X\fIm_sname\fR	x	The full name of the sender
X\fIm_stty\fR	y	The id of the sender's tty
X\fIm_rhdir\fR	z	The home directory of the recipient
X\fIm_domain\fR	m	The domain of the host (SunOS)
X\fIm_uucpname\fR	k	The official UUCP name (IDA)
X.TE
X.FS
X*  Taken from pages 19 and 20 of the Sendmail Installation and Operation Guide
X(SMM:7 in the 4.3 BSD UNIX System Manager's Manual), by Eric Allman.
X.FE
END_OF_doc/ap1
if test 1490 -ne `wc -c <doc/ap1`; then
    echo shar: \"doc/ap1\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f doc/ap2 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/ap2\"
else
echo shar: Extracting \"doc/ap2\" \(2944 characters\)
sed "s/^X//" >doc/ap2 <<'END_OF_doc/ap2'
X...
X... $Header: /home/kreskin/u0/barnett/Src/ease/doc/RCS/ap2,v 2.1 1990/01/30 12:57:42 jeff Exp barnett $
X... 
X... $Log: ap2,v $
X... Revision 2.1  1990/01/30  12:57:42  jeff
X... Made changes corresponding to Ease release 2.1Alpha.
X... se.
X...
X... Version 2.0  90/01/30  12:50:12  jeff
X... Baseline version, corresponding to netwide release 2.0.
X... 
X... Revision 1.5  88/06/15  10:11:53  root
X... Added undocumented/unimplemented options. Fixed so it would troff well. ADR.
X... 
X... Revision 1.4  88/01/21  17:10:33  root
X... Added new option; change location of Sendmail doc to 4.3 SMM. ADR.
X... 
X... Revision 1.3  87/09/04  14:55:36  root
X... Fixed typo in new options. ADR.
X... 
X... Revision 1.2  87/03/03  17:05:41  root
X... Changes for 4.3 version of sendmail. ADR.
X... 
X... Revision 1.1  87/03/03  17:01:24  root
X... Initial revision
X... 
X...
X.DS C
X\s+5\fBAppendix B\fR
X
X\fBSendmail Options\fR\s-5
X.DE
X.PP
XFor a complete description of Sendmail's options and their values, refer to 
XAppendix B of the Sendmail Installation and Operation Guide (SMM:7 in the
X4.3 BSD UNIX System Manager's Manual), by Eric Allman.
X.sp
X.TS 
Xcenter box;
Xc|c
Xl|l.
XSendmail Option (\fBEase\fR)	Sendmail Option (Raw)	Special Values
X=
X\fIo_alias\fR	A	
X\fIo_ewait\fR	a	
X\fIo_bsub\fR	B	
X\fIo_checkpoint\fR	C *
X\fIo_qwait\fR	c	
X\fIo_delivery\fR  (special values below)	d  (special values below)
X     \fId_interactive\fR	     i 
X     \fId_background\fR	    b 
X     \fId_queue\fR	    q
X\fIo_rebuild\fR	D
X\fIo_handling\fR  (special values below)	e  (special values below)
X     \fIh_print\fR	     p 
X     \fIh_exit\fR	     q
X     \fIh_mail\fR	     m
X     \fIh_write\fR	     w
X     \fIh_mailz\fR	     e
X\fIo_tmode\fR	F	
X\fIo_usave\fR	f	
X\fIo_gid\fR	g	
X\fIo_fsmtp\fR	H	
X\fIo_skipd\fR	i	
X\fIo_nameserver\fR	I (HP/UX)
X\fIo_slog\fR	L	
X\fIo_rsend\fR	m	
X\fIo_dnet\fR	N (Ultrix)
X\fIo_validate\fR	n \(dg
X\fIo_hformat\fR	o	
X\fIo_pmaster\fR	P \(bu
X\fIo_qdir\fR	Q	
X\fIo_qfactor\fR	q
X\fIo_tread\fR	r	
X\fIo_flog\fR	S	
X\fIo_safe\fR	s	
X\fIo_qtimeout\fR	T	
X\fIo_timezone\fR	t	
X\fIo_dmuid\fR	u	
X\fIo_verbose\fR	v	
X\fIo_wizpass\fR	W	
X\fIo_loadq\fR	x	
X\fIo_loadnc\fR	X	
X\fIo_recipfactor\fR	y
X\fIo_newproc\fR	Y
X\fIo_prifactor\fR	z
X\fIo_waitfactor\fR	Z
X\fIo_maxempty\fR	b (SunOS)
X\fIo_maxhops\fR	h (SunOS)
X\fIo_remote\fR	R (SunOS)
X\fIo_aliasfile\fR	Y (SunOS)
X\fIo_envelope\fR	/ (IDA)
X
X
X
X.TE
X.PP
X* This option is undocumented and unimplemented in 4.3BSD. It is
Xfor checkpointing mail after \fIN\fR failed connections. \fBEase\fR supports
Xit in anticipation of future developments.
XUltrix uses this flag in Ultrix 3.0. I assume it means the same thing.
X.PP
X\(dg This option is undocumented in 4.3BSD. It specifies that the right hand
Xside of an alias definition should be checked for validity as an address
Xwhen the alias database is being rebuilt.
X.PP
X\(bu This option is undocumented in 4.3BSD.
XIt specifies the address of a Postmaster who should be carbon-copied on
Xall returned bad mail.
END_OF_doc/ap2
if test 2944 -ne `wc -c <doc/ap2`; then
    echo shar: \"doc/ap2\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f doc/ap3 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/ap3\"
else
echo shar: Extracting \"doc/ap3\" \(1721 characters\)
sed "s/^X//" >doc/ap3 <<'END_OF_doc/ap3'
X...
X... $Header: /isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v 2.1 90/01/30 12:57:45 jeff Exp $
X... 
X... $Log:	/isis/usr2/share/src/local/tc/ease/doc/RCS/ap3,v $
X... Version 2.1  90/01/30  12:57:45  jeff
X... Made changes corresponding to Ease release 2.1Alpha.
X... se.
X... 
X... Version 2.0  90/01/30  12:50:38  jeff
X... Baseline version, corresponding to netwide release 2.0.
X... 
X... Revision 1.4  88/06/15  10:12:22  root
X... Added undocumented and unimplemented mailer flag.
X... 
X... Revision 1.3  88/01/21  17:10:57  root
X... Changed location of Sendmail doc to 4.3 SMM. ADR.
X... 
X... Revision 1.2  87/03/03  17:05:53  root
X... Changes for 4.3 version of sendmail. ADR.
X... 
X... Revision 1.1  87/03/03  17:04:52  root
X... Initial revision
X... 
X...
X.DS C
X\s+5\fBAppendix C\fR
X
X
X\fBMailer Flags\fR\s-5
X.DE
X.sp 5
X.PP
XFor a complete description of mailer flags, refer to 
XAppendix C of the Sendmail Installation and Operation Guide (SMM:7 in the
X4.3 BSD UNIX System Manager's Manual), by Eric Allman.
X.sp 5
X.TS 
Xcenter box;
Xc|c
Xl|l.
XMailer Flag (\fBEase\fR)	Mailer Flag (Raw)
X=
X\fIf_ffrom\fR	f
X\fIf_rfrom\fR	r
X\fIf_noreset\fR	S
X\fIf_noufrom\fR	n
X\fIf_locm\fR	l
X\fIf_strip\fR	s 
X\fIf_mult\fR	m
X\fIf_from\fR	F
X\fIf_date\fR	D
X\fIf_mesg\fR	M
X\fIf_full\fR	x	
X\fIf_return\fR	P	
X\fIf_upperu\fR	u	
X\fIf_upperh\fR	h	
X\fIf_arpa\fR	A	
X\fIf_ufrom\fR	U	
X\fIf_expensive\fR	e	
X\fIf_dot\fR	X	
X\fIf_llimit\fR	L	
X\fIf_retsmtp\fR	p	
X\fIf_smtp\fR	I	
X\fIf_addrw\fR	C	
X\fIf_escape\fR	E
X\fIf_rport\fR	R *
X\fIf_mail11\fR	H	Ultrix 3.0
X\fIf_relativize\fR	V	IDA
X.TE
X.FS
X*  This flag specifies the use of a reserved TCP port. In 4.3BSD it is
Xboth undocumented and unimplemented. \fBEase\fR supports it in anticipation
Xof future developments.
X.FE
END_OF_doc/ap3
if test 1721 -ne `wc -c <doc/ap3`; then
    echo shar: \"doc/ap3\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f doc/ap4 -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/ap4\"
else
echo shar: Extracting \"doc/ap4\" \(273 characters\)
sed "s/^X//" >doc/ap4 <<'END_OF_doc/ap4'
X.DS C
X\s+5\fBAppendix D\fR
X
X
X\fBPre-Defined Classes\fR\s-5
X.DE
X.sp 5
X.TS 
Xcenter box;
Xc|c|c
Xl|l|l.
X\fBEase\fR Class	Raw Equivalent	Meaning
X=
X\fIc_myname\fR	w	The list of names by which this host is known
X\fIc_mydomain\fR	m	The list of names by which this host is known
X.TE
END_OF_doc/ap4
if test 273 -ne `wc -c <doc/ap4`; then
    echo shar: \"doc/ap4\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f doc/cover -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/cover\"
else
echo shar: Extracting \"doc/cover\" \(891 characters\)
sed "s/^X//" >doc/cover <<'END_OF_doc/cover'
X...
X... $Header: /home/kreskin/u0/barnett/Src/Ease/ease/doc/RCS/cover,v 2.0 1990/01/30 12:50:41 jeff Exp barnett $
X...
X... $Log: cover,v $
X... Revision 2.0  1990/01/30  12:50:41  jeff
X... Baseline version, corresponding to netwide release 2.0.
X...
X... Revision 1.2  87/12/23  11:30:36  root
X... Updated list of authors. ADR.
X... 
X... Revision 1.1  87/12/23  10:16:35  root
X... Initial revision
X... 
X...
X.DA
X.sp 15
X.nr PS 14
X.ps 14
X.DS C
X 
X.DE
X.sp 10
X.nr PS 36
X.ps 36
X.DS C
X\fBEase:\fR
X.DE
X.sp 5
X.nr PS 22
X.ps 22
X.DS C
XA Configuration Language
X  
Xfor Sendmail
X.DE
X.sp 8
X.nr PS 14
X.ps 14
X.DS C
Xby
X
X\fIJames S. Schoner\fR
X\fIPurdue University Computing Center\fR
X
XAmended by
X
X\fIJeff P. Stearns\fR
X\fIJohn Fluke Manufacturing Company\fR
X
X\fIArnold D. Robbins\fR
X\fIEmory University Computing Center\fR
X
X\fIBruce G. Barnett\fR
X\fIGeneral Electric\fR
X\fICorporate Research and Development\fR
X.DE
END_OF_doc/cover
if test 891 -ne `wc -c <doc/cover`; then
    echo shar: \"doc/cover\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f doc/ease.man -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/ease.man\"
else
echo shar: Extracting \"doc/ease.man\" \(668 characters\)
sed "s/^X//" >doc/ease.man <<'END_OF_doc/ease.man'
X.\"	@(#)ease.l	(FLUKE) 25-feb-87
X.\"
X.TH EASE LOCAL "Feb 13, 1991"
X.UC 4
X.SH NAME
Xease \- precompiler for sendmail configuration files
X.SH SYNOPSIS
X.B ease
X[
X.B \-D
X\fIname\fP[=\fIvalue\fP] ...
X]
Xfile ...
X.br
X.SH DESCRIPTION
X.I Ease
Xcompiles a high-level language into a form understood by
X.I /usr/lib/sendmail.
XIt is fully documented in the files which reside in the source directory.
X.PP
X.I Ease
Xis actually a shell script which passes the source file through
X.I cpp
Xand thence into the actual ease translator
X.I et.
XOutput is printed to the standard output.
X.SH "SEE ALSO"
Xcpp(1), et(local), sendmail(8), cfc(local)
X.SH BUGS
X.SH BROUGHT TO YOU BY
Xjeff at tc.fluke.COM
END_OF_doc/ease.man
if test 668 -ne `wc -c <doc/ease.man`; then
    echo shar: \"doc/ease.man\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f doc/et.man -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"doc/et.man\"
else
echo shar: Extracting \"doc/et.man\" \(1305 characters\)
sed "s/^X//" >doc/et.man <<'END_OF_doc/et.man'
X.\"	@(#)et.man
X.\"
X.TH ET LOCAL "Feb 13, 1991"
X.UC 4
X.SH NAME
Xet \- translator for sendmail configuration files
X.SH SYNOPSIS
X.B Et
X[
X.B \-d
X]
X[
X.B \-q
X]
X[
X.B \-D
X\fIname\fP[=\fIvalue\fP] ...
X]
X[inputfile [outputfile]]
X.br
X.SH DESCRIPTION
X.I Et
Xcompiles a high-level language into a form understood by
X.I /usr/lib/sendmail.
XIt is fully documented by the documentation provided with the program source.
X.PP
X.I Et
Xoptionally passes the source file through
X.I cpp
Xbefore parsing it.  This allows all the power of
X.I cpp
Xto be applied to the input file.
X.PP
XIf no inputfile is specified, STDIN is used.
XIf no outputfile is specified, STDOUT is used.
XThe distinguished name "-" is synonymous with STDIN or STDOUT, as appropriate.
X.PP
XBy default,
X.I Et
Xpasses input lines along into the output stream as comments.
X.SH OPTIONS
X.IP -d
Xturns on the yydebug flag for the curious or desperate.
X.IP -q
Xturns off the feature which passes input lines along into the output
Xstream as comments.
X.PP
X.I Et
Xaccepts the options of
X.B cpp,
Xand passes them along to the C pre-processor when it is invoked.
X.B N.B 
XIf no such options are specified,
X.B cpp
Xis not invoked.
X.SH "SEE ALSO"
Xcpp(1), ease(local), sendmail(8), cfc(local)
X.SH BUGS
X.SH THIS MANUAL PAGE WRITTEN BY
Xjeff at tc.fluke.com, from inspection of the source code.
END_OF_doc/et.man
if test 1305 -ne `wc -c <doc/et.man`; then
    echo shar: \"doc/et.man\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f src/ease.sh -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"src/ease.sh\"
else
echo shar: Extracting \"src/ease.sh\" \(3614 characters\)
sed "s/^X//" >src/ease.sh <<'END_OF_src/ease.sh'
X#! /bin/sh
X#
X#  ease - front end for the ease translator (et).
X#
X#  This sh script simplifies the task of calling "et" with the proper flags.
X#
X#  It also defines a VERSION macro, known to cpp when preprocessing the
X#  input to et.  This allows you to automatically embed the RCS version
X#  number of your config file into the generated sendmail.cf. 
X#
X#  For example, if your ease input file contains the RCS version string
X#	$Revision: 1.6 $
X#  and the lines
X#	define ("Received:",
X#	    "by ${m_oname} (${VERSION})"
X#	    ifset (m_shostname, " from ${m_shostname} ") "for ${m_ruser}"
X#  then your sendmail.cf will define the "Received:" header line so that
X#  it contains the RCS version number of the ease input file.  This version
X#  number will ultimately be stamped into the header of every message which
X#  flows though this sendmail, thus allowing you to see at a glance whether
X#  some problem was due to an out-of-date sendmail.cf.
X#
X#  At our site, the "Received:" header lines thus have the following form:
X#
X#	Received: by isis.tc.fluke.COM (version 2.46)
X#	    from argv.tc.fluke.COM for jeff
X#	    id AA10285; Wed, 21 Feb 90 17:28:43 PST
X#	Received: by argv.tc.fluke.COM (version 2.46)
X#	    for jeff at isis
X#	    id AA06739; Wed, 21 Feb 90 17:28:39 PST
X#
X#  This makes it a little easier to track down problems in networks comprising
X#  dozens or hundreds of machines.
X#
X# $Source: /isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v $
X# $Locker:  $
X#
X# $Revision: 1.6 $
X# Check-in $Date: 90/05/07 11:15:04 $
X# $State: Exp $
X#
X# $Author: jeff $
X#
X# $Log:	/isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v $
X# Version 1.6  90/05/07  11:15:04  jeff
X# Add support for the "-q" flag added to ease.
X# 
X# Version 1.5  90/02/22  15:51:12  jeff
X# Improved the comments in preparation for netwide release.
X# 
X# Version 1.4  88/11/18  11:24:12  jeff
X# RCS mangled the previous change; try it again.  (It saw something that
X# looked like a keyword to it, so it expanded the token.  Yuck.)
X# 
X# Version 1.3  88/11/18  11:20:52  jeff
X# Change the VERSION macro from the date to the RCS revision of the
X# config.ease file.
X# 
X# Version 1.2  87/04/13  16:56:29  jeff
X# Change argument parsing to accomodate the new -C flag.
X# 
X# Version 1.1  87/04/08  12:20:58  jeff
X# Initial version
X# 
X#
X# @(#)FLUKE source file: $Header: /isis/usr2/share/src/local/tc/ease/src/RCS/ease.sh,v 1.6 90/05/07 11:15:04 jeff Exp $
X
XPATH=/bin:/usr/bin:/usr/ucb:/usr/local export PATH
X
Xecho    "#"
Xecho    "#   Compiled via: $0 $*"
Xecho	"# From directory: `pwd`"
Xecho    "#           Date: `date`"
Xecho    "#"
Xecho    "# This file was produced by the \"ease\" translator."
Xecho    "# You probably shouldn't edit it, since changes will be lost"
Xecho	"# the next time that ease is run.  Instead, edit the source file"
Xecho	"# located in the directory named above."
Xecho    "#"
X
Xcppflags= etflags='-q'
X
Xfor i in ${1+"$@"} ;do
X    case "$1" in
X	'')	break;;
X	-C)	etflags="${etflags-} $1";;
X	-D*)	cppflags="$cppflags $1";;
X	*)	file="$1";;
X    esac
X    shift
Xdone
X
X#
X#  Extract the RCS "Revision" string from the ease input file, and
X#  use it to define the VERSION symbol to cpp.
X#
X#  If you maintain your ease input file with SCCS, the appropriate change
X#  should be simple.
X#
XRev=`fgrep 'Revision:' $file | sed -e 's/^.*Revision:[	 ]*\([^	 ]*\).*/\1/'`
X
X# The sed commands delete empty comment lines and those preprocessor output
X# lines which indicate the linenumber and filename.
X/lib/cpp -DVERSION=\"version\ $Rev\" $cppflags $file |
X    et $etflags |
X    sed -e '/^# *$/d' \
X	-e '/^#[ 	]*[0123456789][0123456789]*[ 	]*".*"[	 ]*$/d'
END_OF_src/ease.sh
if test 3614 -ne `wc -c <src/ease.sh`; then
    echo shar: \"src/ease.sh\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f src/fixstrings.c -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"src/fixstrings.c\"
else
echo shar: Extracting \"src/fixstrings.c\" \(1812 characters\)
sed "s/^X//" >src/fixstrings.c <<'END_OF_src/fixstrings.c'
X/*
X * $Revision: 2.1 $
X * Check-in $Date: 90/01/30 14:25:14 $
X *
X * $Author: jeff $
X *
X * $Log:	/isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.c,v $
X * Version 2.1  90/01/30  14:25:14  jeff
X * Comment changes only.
X * 
X * Revision 2.0  88/06/15  14:41:19  root
X * Baseline release for net posting. ADR.
X * 
X * Version 1.2  87/02/25  16:55:13  jeff
X * Add RCS header lines.  No code changes.
X * 
X */
X#ifdef FLUKE
X# ifndef LINT
X    static char RCSid[] = "@(#)FLUKE  $Header: /isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.c,v 2.1 90/01/30 14:25:14 jeff Exp $";
X# endif LINT
X#endif FLUKE
X
X/*  FLUKE jps 16-apr-86 - special hacks for NULL pointers.
X *
X *  The author of ease used a *lot* of NULL pointers.  This isn't much
X *  of a problem on a vax, where NULL pointers look like "".  Not so on a Sun.
X *
X *  We hack around the problem by defining a set of wrappers for the
X *  standard string functions, making it appear as though they accept NULL
X *  pointers.  In the other C files, cpp macros are used to revector the
X *  standard string functions to this file.
X */
X#include <strings.h>
X#define fix(s) ((s) ? (s) : "")
X
Xchar *Xstrcat (s1, s2)
Xchar *s1, *s2; 
X{
X	return (strcat (s1, fix (s2)));
X}
X
Xchar *Xstrncat (s1, s2, n)
Xchar *s1, *s2; 
X{
X	return (strncat (s1, fix (s2), n));
X}
X
XXstrcmp (s1, s2)
Xchar *s1, *s2; 
X{
X	return (strcmp (fix (s1), fix (s2)));
X}
X
XXstrncmp (s1, s2, n)
Xchar *s1, *s2; 
X{
X	return (strncmp (fix (s1), fix (s2), n));
X}
X
Xchar *Xstrcpy (s1, s2)
Xchar *s1, *s2; 
X{
X	return (strcpy (s1, fix (s2)));
X}
X
Xchar *Xstrncpy (s1, s2, n)
Xchar *s1, *s2; 
X{
X	return (strncpy (s1, fix (s2), n));
X}
X
XXstrlen (s)
Xchar *s; 
X{
X	return (strlen (fix (s)));
X}
X
Xchar *Xindex (s, c)
Xchar *s, c; 
X{
X	return (index (fix (s), c));
X}
X
Xchar *Xrindex (s, c)
Xchar *s, c; 
X{
X	return (rindex (fix (s), c));
X}
END_OF_src/fixstrings.c
if test 1812 -ne `wc -c <src/fixstrings.c`; then
    echo shar: \"src/fixstrings.c\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f src/fixstrings.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"src/fixstrings.h\"
else
echo shar: Extracting \"src/fixstrings.h\" \(712 characters\)
sed "s/^X//" >src/fixstrings.h <<'END_OF_src/fixstrings.h'
X/*
X * $Revision: 2.1 $
X * Check-in $Date: 90/01/30 14:28:33 $
X * $State: Exp $
X *
X * $Author: jeff $
X *
X * $Log:	/isis/usr2/share/src/local/tc/ease/src/RCS/fixstrings.h,v $
X * Version 2.1  90/01/30  14:28:33  jeff
X * Bring RCS version number in line with netwide version 2.1.  No code
X * changes.
X * 
X * Revision 2.0  88/06/15  14:41:57  root
X * Baseline release for net posting. ADR.
X */
X
X/* FLUKE jps 16-apr-86 - revector the string routines to custom-coded ones
X *  which handle NULL pointers.
X */
X#define strcat	Xstrcat
X#define strncat	Xstrncat
X#define strcmp	Xstrcmp
X#define strncmp	Xstrncmp
X#define strcpy	Xstrcpy
X#define strncpy	Xstrncpy
X#define strlen	Xstrlen
X#define index	Xindex
X#define rindex	Xrindex
END_OF_src/fixstrings.h
if test 712 -ne `wc -c <src/fixstrings.h`; then
    echo shar: \"src/fixstrings.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f src/symtab.h -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"src/symtab.h\"
else
echo shar: Extracting \"src/symtab.h\" \(2671 characters\)
sed "s/^X//" >src/symtab.h <<'END_OF_src/symtab.h'
X/*
X *	symtab.h    -- Definitions related to the "et" symbol table. 
X *
X *	author	    -- James S. Schoner, Purdue University Computing Center,
X *					 West Lafayette, Indiana  47907
X *
X *	date	    -- July 1, 1985
X *
X *	Copyright (c) 1985 by Purdue Research Foundation
X *
X *	All rights reserved.
X *
X * $Log: symtab.h,v $
X * Revision 3.0  1991/02/22  18:50:27  barnett
X * Added support for HP/UX and IDA sendmail.
X *
X * Revision 2.1  1990/01/30  15:58:35  jeff
X * Added SunOS/Ultrix/IDA extensions  Jan 24, 1989 Bruce Barnett
X *
X * Revision 2.0  88/06/15  14:43:08  root
X * Baseline release for net posting. ADR.
X */
X
X#define TRUE      1
X#define FALSE     0
X#define SST       101		/* size of hash table (symbol table) 	     */
X#define RSNMAX    5		/* size of a ruleset number character buffer */
X#define VALRSNMAX 9999		/* max value of ruleset number		     */
X
X
X/* identifier types */
X#define ID_UNTYPED 0
X#define ID_MACRO   01
X#define ID_CLASS   02
X#define ID_RULESET 04
X#define ID_FIELD   010
X#define ID_PREC	   020
X#define ID_MAILER  040
X
X/* identifier type macros */
X#define ISTYPED(x) (x|ID_UNTYPED)
X#define ISMACRO(x) (x&ID_MACRO)
X#define ISCLASS(x) (x&ID_CLASS)
X#define ISRULESET(x) (x&ID_RULESET)
X#define ISFIELD(x) (x&ID_FIELD)
X#define ISPREC(x) (x&ID_PREC)
X#define ISMAILER(x) (x&ID_MAILER)
X
X/* block definition types */
Xenum bdefs {def_macro, def_class, def_option, def_prec, def_trusted, 
X	    def_header, def_mailer, def_ruleset};
X
X/* option types */
Xenum opts {opt_A, opt_a, opt_B, opt_C, opt_c, opt_D, opt_d, opt_e, opt_F,
X	   opt_f, opt_g, opt_H, opt_i, opt_L, opt_m, opt_N, opt_n, opt_o,
X	   opt_P, opt_Q, opt_q, opt_r, opt_S, opt_s, opt_T, opt_t, opt_u,
X	   opt_v, opt_W, opt_x, opt_X, opt_Y, opt_y, opt_Z, opt_z,
X	   opt_b, opt_R, opt_SL, opt_h, opt_I,
X	   d_opt_i, d_opt_b, d_opt_q,
X	   e_opt_p, e_opt_e, e_opt_m, e_opt_w, e_opt_z};
X
X/* flag types */
Xenum flgs {flg_f, flg_r, flg_S, flg_n, flg_l, flg_s, flg_m, flg_F, flg_D,
X	   flg_M, flg_x, flg_P, flg_u, flg_h, flg_A, flg_U, flg_e, flg_X,
X	   flg_H, flg_V, flg_B,
X	   flg_L, flg_p, flg_I, flg_C, flg_E, flg_R};
X
X/* mailer parameters */
Xenum mats {mat_path, mat_flags, mat_sender, mat_recipient, mat_argv, 
X	   mat_eol, mat_maxsize};
X
Xstruct he {	/* hash entry structure for symbol table node 	*/
X	unsigned   idtype;	/* identifier type 		*/
X	unsigned   idd;	  	/* identifier definition flag 	*/
X	char      *psb;		/* identifier string buffer 	*/
X	union {
X		char rsn[RSNMAX]; 	/* ruleset number   	      */
X		int prec;	  	/* precedence value 	      */
X		char idc;		/* one char id representation */
X		char *fstring;    	/* field string     	      */
X	} idval;
X	struct he *phe;		/* next hash entry 		*/
X};
END_OF_src/symtab.h
if test 2671 -ne `wc -c <src/symtab.h`; then
    echo shar: \"src/symtab.h\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f test/README -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"test/README\"
else
echo shar: Extracting \"test/README\" \(1583 characters\)
sed "s/^X//" >test/README <<'END_OF_test/README'
XThis is my little package to work out what is going on inside sendmail.
XIt consists of a sendmail configuration file and a shell script. The sendmail
Xconfiguration file was created with ease (see previous messages in net.mail
Xabout ease - i think it's due in mod.sources). The ease source is included.
X
XWhat this is all about:
X
X	I was having difficulty creating a sendmail.cf. So, I wrote a
Xsendmail.cf whose sole function was to tag an address as it went through the
Xruleset. I coupled this with a little shell script, called args, which snarfs
Xit's arguments (and stdin) and write them to a log file (/tmp/log is what I
Xhave used - you can alter it to taste, bearing in mind that it will probably
Xhave to suid to write to your directory :-()
X
XWhat do you do:
X
X	Unpack all this junk. You should have test.mc, test.cf, args and
XREADME. Put args in your search path. Create a dummy mail message. It helps
Xto know how you mailer calls sendmail. I used args to find out. (I briefly
Xreplaced /usr/lib/sendmail with args and sent some mail). Call sendmail with
Xthe dummy mail item as stdin. ie:
X
X	/usr/lib/sendmail -Ctest.cf foobar <<eof
X	To: foobar
X	Subject: test
X
X	test mail
X	eof
X
Xthen have a look at what is in /tmp/log
X
XThats all there is folks. I also use args with real configuration files, so
Xthat I can test them without disrupting the mail service through my machine.
XIf you have any problems with this stuff, mail me and I'll try and help.
X
X	Simon Kenyon
X	The National Software Centre,
X	28 Enterprise Centre,
X	Pearse Street,
X	Dublin 2
X	IRELAND
X	+353 1 716255
X	simon at einode.UUCP
END_OF_test/README
if test 1583 -ne `wc -c <test/README`; then
    echo shar: \"test/README\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f test/args -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"test/args\"
else
echo shar: Extracting \"test/args\" \(507 characters\)
sed "s/^X//" >test/args <<'END_OF_test/args'
X#!/bin/sh
X#
X# little shell script to snarf it's arguments and stdin and put them
X# in a log file. this way you can see what is being given to the various
X# mailers and also what is being done to addresses.
X# it's a real hack, but it works for me
X#
X#			Simon Kenyon, The NSC, Dublin, IRELAND. 24th Nov 86
X#
Xecho '-------------'`date`'------------------' >>/tmp/log
Xecho -n "Command line: " >>/tmp/log
Xfor i in "$@"
Xdo
Xecho -n "$i " >>/tmp/log
Xdone
Xecho >>/tmp/log
Xwhile read foo
Xdo
Xecho $foo >>/tmp/log
Xdone
END_OF_test/args
if test 507 -ne `wc -c <test/args`; then
    echo shar: \"test/args\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f test/test.addresses -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"test/test.addresses\"
else
echo shar: Extracting \"test/test.addresses\" \(210 characters\)
sed "s/^X//" >test/test.addresses <<'END_OF_test/test.addresses'
X#! /bin/sh
X
X/usr/lib/sendmail -bt -Csun.cf	\
X| awk				\
X    '/^> >/ {printf "\n\n"};
X	    {print}
X    '				\
X| sed 				\
X    -e 's/ \$# / mailer = /'	\
X    -e 's/ \$: / user = /'	\
X    -e 's/ \$@ / host = /'	
X
END_OF_test/test.addresses
if test 210 -ne `wc -c <test/test.addresses`; then
    echo shar: \"test/test.addresses\" unpacked with wrong size!
fi
chmod +x test/test.addresses
# end of overwriting check
fi
if test -f test/test.cf -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"test/test.cf\"
else
echo shar: Extracting \"test/test.cf\" \(2437 characters\)
sed "s/^X//" >test/test.cf <<'END_OF_test/test.cf'
X###################################################
X##                                               ##
X##  WARNING: THIS FILE IS TO BE MODIFIED BY      ##
X##           THE EASE TRANSLATOR (ET) ONLY.      ##
X##                                               ##
X##           ALL OTHER MODIFICATIONS WILL        ##
X##           DISAPPEAR THE NEXT TIME ET IS RUN.  ##
X##                                               ##
X##           MAKE MODIFICATIONS TO THE EASE      ##
X##           SOURCE ONLY.                        ##
X##                                               ##
X###################################################
XDAmy_domain
XDBruleset tester V1.0
XDwwhatever
XDj$w.$A
XDnMAILER-DAEMON
XDlFrom $g  $d
XDo.:%@!^=/[]{}
XDq$?x$x	<$g>$|$g$.
XDe$j Sendmail $v/$B ready at $b
XOA/usr/lib/aliases
XOdb
XOu1
XOS/usr/lib/sendmail.st
XOH/usr/lib/sendmail.hf
XOg1
XOo
XOQ/usr/spool/mqueue
XOT3d
XOs
XOL9
XOtWET
XOF0644
XOrr2h
XOW*
XPfirst-class=0
XPspecial-delivery=100
XPjunk=-100
XTroot daemon uucp network
XTsimon 
XHa: The origination date in Arpanet format = $a
XHb: The current date in Arpanet format = $b
XHc: The hop count = $c
XHd: The date in UNIX (ctime) format = $d
XHe: The SMTP entry message = $e
XHf: The sender (from) address = $f
XHg: The sender address relative to the recipient = $g
XHh: The recipient host = $h
XHi: The queue id = $i
XHj: The official domain name for this site = $j
XHl: The format of the UNIX from line = $l
XHn: The name of the daemon (for error messages) = $n
XHo: The set of operators in addresses = $o
XHp: Sendmail's pid = $p
XHq: The default format of sender address = $q
XHr: Protocol used = $r
XHs: Sender's host name = $s
XHt: A numeric representation of the current time = $t
XHu: The recipient user = $u
XHv: The version number of sendmail = $v
XHw: The hostname of this site = $w
XHx: The full name of the sender = $x
XHy: The id of the sender's tty = $y
XHz: The home directory of the recipient = $z
XS3
XR$+	$:{3}$1
XS0
XR$+@$+	$#uucp$@{0_uucp}$2$:{0_uucp}$1
XR$+!$+	$#uucp$@{0_uucp}$1$:{0_uucp}$2
XR$+	$#local$:{0_local}$1
XS1
XR$+	$@{1}$1
XS2
XR$+	$@{2}$1
XS4
XR$+	$@{4}$1
XS10
XR$+	$@{S_local}$1
XS20
XR$+	$@{R_local}$1
XS11
XR$+	$@{S_uucp}$1
XS21
XR$+	$@{R_uucp}$1
XMlocal, P=/usr/src/local/EUnet/ease/test/args, F=DFlMmnrs, S=10, R=20, A=args mail -d $u
XMprog, P=/usr/src/local/EUnet/ease/test/args, F=DeFlMns, S=10, R=20, A=args sh -c $u
XMuucp, 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
END_OF_test/test.cf
if test 2437 -ne `wc -c <test/test.cf`; then
    echo shar: \"test/test.cf\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f utils/Makefile -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"utils/Makefile\"
else
echo shar: Extracting \"utils/Makefile\" \(206 characters\)
sed "s/^X//" >utils/Makefile <<'END_OF_utils/Makefile'
X
XBINDIR=../bin
X#INSTALL=install -m 755 
XINSTALL=cp
X
Xall:	
Xclean:
X
Xinstall:
X	${INSTALL} cfdiff.csh  ${BINDIR}/cfdiff
X	${INSTALL} cfstrip.csh ${BINDIR}/cfstrip
X	chmod 755 ${BINDIR}/cfstrip  ${BINDIR}/cfdiff
X
END_OF_utils/Makefile
if test 206 -ne `wc -c <utils/Makefile`; then
    echo shar: \"utils/Makefile\" unpacked with wrong size!
fi
# end of overwriting check
fi
if test -f utils/build-new-aliases -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"utils/build-new-aliases\"
else
echo shar: Extracting \"utils/build-new-aliases\" \(1226 characters\)
sed "s/^X//" >utils/build-new-aliases <<'END_OF_utils/build-new-aliases'
X#!/bin/csh -f
X# build-new-aliases
X# Bruce Barnett
X#
X# this script makes a new alias file
X#
X# first it has to shutdown sendmail
X# But do it nicely, using kill -15 at first.
X
X# how many sendmail processes are running?
Xset j = (`ps ax |grep sendmail|grep -v grep`);
X
Xset loopcount = 0
Xif ( $#j > 0 ) then
X
Xloop:
X@	loopcount++
X	# wait 30 * 30 seconds for all of the sendmail processes to quit
X	if ( $loopcount > 30 ) then
X		echo ERROR - can not kill sendmail
X		goto problem
X	endif
X	kill -15 $j[1]
X	sleep 30
X	set j = (`ps ax |grep sendmail|grep -v grep`);		
X	if ( $#j > 0 ) then
X		goto loop
X	endif
Xendif
Xgoto good
Xproblem:
X# could not kill sendmail - try something drastic
X	echo `date` kill sendmail >>/usr/spool/adm/build-new-aliases.log
X	kill -9 $j[1]
Xgood:
Xset frozen = 0
Xif ( -f /etc/sendmail.fc )  then
X	set frozen = 1
X	/bin/cp /dev/null /etc/sendmail.fc
Xendif
X# clean up any lock files
Xtouch /usr/spool/mqueue/lf0
X/bin/rm -f /usr/spool/mqueue/lf*
X
X# see the documentation about the 'a' option of sendmail
X# or the "D" option
X#/usr/lib/newaliases
X# rebuild aliases
X/usr/lib/sendmail -bi
X
Xif ( $frozen > 0 ) then
X	/usr/lib/sendmail -bz
Xendif
X
X# restart the daemon with 30 minutes between cycles
X/usr/lib/sendmail -bd -q30m -om
END_OF_utils/build-new-aliases
if test 1226 -ne `wc -c <utils/build-new-aliases`; then
    echo shar: \"utils/build-new-aliases\" unpacked with wrong size!
fi
chmod +x utils/build-new-aliases
# end of overwriting check
fi
if test -f utils/cfdiff.csh -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"utils/cfdiff.csh\"
else
echo shar: Extracting \"utils/cfdiff.csh\" \(576 characters\)
sed "s/^X//" >utils/cfdiff.csh <<'END_OF_utils/cfdiff.csh'
X#!/bin/csh -f
X# Bruce Barnett
X# usage:
X# cfdiff file1.cf file2.cf
X# this removes all comments from the cf file
Xif ( $#argv != 2 ) then
X	echo usage cfdiff file1 file2
X	exit 1
Xendif
Xonintr bomb
X# if SunOS, use the -b -w option
Xset DIFF = "diff -b"
Xif ( -f /bin/arch ) then
X	if ( `/bin/arch` =~ sun* ) then
X		set DIFF = "diff -b -w"
X	endif
Xendif
Xif ( ! -f $1 ) then
X	echo file $1 does not exist
X	exit 1
Xendif
Xif ( ! -f $2 ) then
X	echo file $2 does not exist
X	exit 1
Xendif
Xcfstrip <$1>/tmp/$1:t
Xcfstrip <$2>/tmp/$2:t
X
Xcd /tmp
X${DIFF} $1:t $2:t
X
Xbomb:
X	/bin/rm /tmp/$1:t /tmp/$2:t
END_OF_utils/cfdiff.csh
if test 576 -ne `wc -c <utils/cfdiff.csh`; then
    echo shar: \"utils/cfdiff.csh\" unpacked with wrong size!
fi
chmod +x utils/cfdiff.csh
# end of overwriting check
fi
if test -f utils/cfstrip.csh -a "${1}" != "-c" ; then 
  echo shar: Will not over-write existing file \"utils/cfstrip.csh\"
else
echo shar: Extracting \"utils/cfstrip.csh\" \(594 characters\)
sed "s/^X//" >utils/cfstrip.csh <<'END_OF_utils/cfstrip.csh'
X#!/bin/csh -f
X# usage:
X#	cfstrip <infile >outfile
X# Bruce Barnett
X#
X# this file strips out all comments from a sendmail.cf file
X# it also converts 
X#	<tab>[whitespace] 	to 	<tab>
X#	<space>[whitespace]	to	<space>
X#	<space>$		to	$
X#	<space><		to	<
X#	<space>@		to	@
Xif ( $#argv != 0 ) then
X	echo no arguments are allowed
X	exit 1
Xendif
Xsed -e 's/^#.*//' \
X	-e 's/^\(R[^	]*[	][	]*[^	]*\)[	]*.*$/\1/' \
X	-e 's/^\(R[^	]*[	][	]*[^	]*\)[	]*$/\1/' \
X	-e 's/^\(R[^	]*[	][	]*[^	]*\)$/\1/' \
X	-e 's/	[	 ]*/	/g' \
X	-e 's/ [	 ]*/ /g' \
X	-e 's/ \$/$/g' \
X	-e 's/ </</g' \
X	-e 's/ @/@/g' \
X	 |grep -v '^[ 	]*$'
END_OF_utils/cfstrip.csh
if test 594 -ne `wc -c <utils/cfstrip.csh`; then
    echo shar: \"utils/cfstrip.csh\" unpacked with wrong size!
fi
chmod +x utils/cfstrip.csh
# end of overwriting check
fi
echo shar: End of archive 1 \(of 6\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 3 4 5 6 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked all 6 archives.
    rm -f ark[1-9]isdone
else
    echo You still need to unpack the following archives:
    echo "        " ${MISSING}
fi
##  End of shell archive.
exit 0
--
Bruce G. Barnett	barnett at crd.ge.com	uunet!crdgw1!barnett



More information about the Alt.sources mailing list