[mod.sources] v09i018: ELM Mail System, Part18/19

sources-request@mirror.UUCP (03/12/87)

Submitted by: Dave Taylor <hplabs!taylor>
Mod.sources: Volume 9, Issue 18
Archive-name: elm2/Part18

#! /bin/sh
# This is a shell archive.  Remove anything before this line,
# then unpack it by saving it in a file and typing "sh file".
# If this archive is complete, you will see the message:
#		"End of archive 18 (of 19)."
# Contents:  Configure.sh doc/Users.guide
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo shar: Extracting \"Configure.sh\" \(20314 characters\)
if test -f Configure.sh ; then 
  echo shar: Will not over-write existing file \"Configure.sh\"
else
sed "s/^X//" >Configure.sh <<'END_OF_Configure.sh'
X: Use /bin/sh
X#
X# Configure.sh, a shell script for configuring the Elm mail system for
X# 	your site and desires.  This script uses some ideas ripped out
X#	of the 'rn' install script.  Thanks Larry!
X#
X
Xexport PATH || (sh $0 ; kill $$)
X
XSHELL=/bin/sh
X
XSED1=/tmp/Elm.sed1
XSED2=/tmp/Elm.sed2
X
Xif [ -f /bin/rm ]
Xthen
X  rm=/bin/rm
Xelse
X  rm=rm
Xfi
X
X$rm -f $SED1 $SED2
Xtouch $SED1 $SED2
Xchmod 777 $SED1 $SED2
X
X# first test - is stdin still free for answering questions??
Xif [ ! -t 0 ]
Xthen
X  echo "Please use 'sh Configure.sh' rather than 'sh < Configure.sh'"
X  exit 1
Xfi
X
X# next let's see what sorta echo flag we have here...
X
Xif [ "`echo -n`" = "-n" ]
Xthen
X  nflag=""
X  cflag="\\c" 
Xelse
X  nflag="-n"
X  cflag=""
Xfi
X
X# now the intro blurb
X
Xcat << END_OF_INTRO
X
X       		    Elm Configuration Script, v4
X       
X      
X    This is the configuration script for the Elm mail system.  By using
X    it rather than editing the "hdrs/sysdefs.h" file, it is hoped that
X    the installation process will be considerably easier.
X
X    On all questions, the value in [square brackets] is the default that 
X    will be used if you just press RETURN...
X
X
XEND_OF_INTRO
X
Xecho "Trying to figure out what sort of OS you're on..."
X
X# next interesting part - figure out what OS we're on
X
Xos_name=""
X
X$rm -f .osname
Xtouch .osname
X
Xcat << 'EOF' > .get_osname
X
Xuname
X
Xif [ $? != 0 ] 
Xthen
X  if [ -f /vmunix ]
X  then
X    echo "bsd" > .osname
X  else
X    exit 0
X  fi
Xfi
X
Xif [ "`uname -s`" != "" ]
Xthen
X   uname -s | tr '[A-Z]' '[a-z]' > .osname
Xfi
X
Xexit 0
X 
XEOF
X
Xsh .get_osname > /dev/null 2>&1
X
Xif [ -f .osname ] 
Xthen
X  os_name="`cat .osname`"
X  $rm -f .osname
Xfi
X
X$rm -f .get_osname
X
Xif [ "$os_name" = "" ] 
Xthen
X  cat << THE_END
X
XI cannot figure out what sort of operating system you're running here.  Please
Xtype in the NAME of the OS you're running or the name of the machine you're
XTHE_END
X
X  echo $nflag "running on.  I'll check the name in a minute : " $cflag
X
X  read junk morejunk
X  
X  os_name=`echo $junk | tr '[A-Z]' '[a-z]'`
Xfi
X
XOS_FLAG="HUH??"
X
Xwhile [ "$OS_FLAG" = "HUH??" ]
Xdo
X
X  case $os_name in
X    hp)		NAME="HP-UX"; OS_FLAG=""		;;
X    hp-ux) 	NAME="HP-UX"; OS_FLAG="";   		;;
X    vax)	NAME="BSD"; OS_FLAG="BSD";  	;;
X    vaxen)	NAME="BSD"; OS_FLAG="BSD";  	;;
X    bsd)	NAME="BSD"; OS_FLAG="BSD";  	;;
X    uts)	NAME="UTS"; OS_FLAG="UTS";  	;;
X    sun)	NAME="BSD"; OS_FLAG="";		;;
X    pyramid)	NAME="Pyramid BSD"; OS_FLAG="PYRAMID";	;;
X    amdahl)	NAME="UTS"; OS_FLAG="UTS";  	;;
X    sv_*)	NAME="System V"; OS_FLAG="";		;;
X    svii_*)	NAME="System VII"; OS_FLAG="";		;;
X    v5)		NAME="System V"; OS_FLAG="";		;;
X    v7)		NAME="System VII"; OS_FLAG="";		;;
X    eunice)	NAME="Eunice"; OS_FLAG="";		;;
X    convergent)	NAME="Convergent BSD"; OS_FLAG="BSD";		;;
X    berkeley)	NAME="BSD"; OS_FLAG="BSD";		;;
X    ultrix)	cat << THE_END
X
XI know that this is a breed of Unix, but I don't know what TYPE of OS it
Xis like.  Please enter the NAME of the OS that this is most like (e.g. "BSD")
Xand we'll go from there.
X
XTHE_END
X					;;
X    xenix)	cat << THE_END
X
XYou're outta luck.  Xenix (dumb OS that it is only allows 6 character 
Xidentifier names.  You'll need to go in and LABORIOUSLY translate all the
XVERY LONG identifier names to the right length.   The correct response to 
Xseeing this message is to call your vendor and get ANGRY!!!!
X
XMeanwhile, we might as well just quit here.  Sorry.
XTHE_END
Xexit 1
X					;;
X    *)		cat << THE_END
X
XI don't know what OS you're specifying!  The only one's I know of are;
X
X  HP-UX, BSD, UTS, Eunice, Xenix, Ultrix, V5, and V7
X
XI also know the machines
X
X  HP, Amdahl, Sun, Vaxen, Convergent and Pyramid
X
XIf you're not among this list, you'll need to pick the closest OS name.  
XTHE_END
X
X    echo " "
X    echo $nflag "Please choose again: " $cflag
X    read os_name
X    ;;
X  esac
X
Xdone
X
Xecho " "
Xecho " "
Xecho you\'re on the following version of Unix: $NAME
X
Xecho " "
Xecho "Now we can get down to those questions..."
Xecho " "
X
Xcat << THE_END
X
XFirst off, should the program use "uuname" rather than trying to read 
XTHE_END
X
Xnot_using_lsys_file=0
X
Xanswer="yes"
Xecho $nflag "the L.sys file (y/n) [yes] ? "  $cflag
Xread answer
X
Xif [ "$answer" = "n" -o "$answer" = "no" ]
Xthen
X  not_using_lsys_file=1
X  echo "s/#define USE_UUNAME/\/** #define USE_UUNAME **\//" >> $SED1
Xfi
X
Xcat << THE_END
X
XNext, are you running smail, a "gateway" configuration of sendmail, or some 
Xother program that means the program shouldn't touch any of the addresses 
XTHE_END
X
Xanswer="no"
Xdont_touch_addresses=0
Xecho $nflag "that users type in (y/n) [no] ? " $cflag
Xread answer
X
Xif [ "$answer" = "y" -o "$answer" = "yes" ]
Xthen
X  dont_touch_addresses=1
X  echo \
X"s/\/\*\* #define DONT_TOUCH_ADDRESSES \*\*\//#define DONT_TOUCH_ADDRESSES /" \
X  >> $SED1
X  echo \
X"s/\/\*\* #define DONT_OPTIMIZE_RETURN \*\*\//#define DONT_OPTIMIZE_RETURN /" \
X  >> $SED1
Xfi
X
Xcat << THE_END
X
XDoes your site receive mail with valid "Reply-To:" and "From:" fields in
XTHE_END
X
Xanswer="no"
Xecho $nflag "the headers (y/n) [no] ? " $cflag
Xread answer
X
Xif [ "$answer" != "y" -a "$answer" != "yes" ]
Xthen
X  echo \
X"s/#define USE_EMBEDDED_ADDRESSES/\/** #define USE_EMBEDDED_ADDRESSES **\//" \
X  >> $SED1
Xfi
X
Xcat << THE_END
X
X-------------------------------------------------------------------------------
X
XHow about memory?  If you have a lot, you can enter a fairly large number
Xfor the next few questions...if not, you'll probably want to enter the
Xsuggested small-system values.  (This applies to the speed of the swapping
Xon your system too - if you're on a FAST system, use the big values!)
X
XFirst, how many aliases should be allowed for an individual user? The suggested
Xvalues are 503 for blindly fast systems, 251 for average systems and 127 for
XTHE_END
X
Xmax_ualiases="NONE"
X
Xwhile [ "$max_ualiases" = "NONE" ] 
Xdo 
X
X  echo $nflag "slow systems.  Number of aliases [251] ? " $cflag 
X
X  read junk
X
X  if [ "$junk" = "" ] 
X  then
X    junk=251
X  fi
X
X  if [ $junk -lt 50 -o $junk -gt 1000 ] 
X  then
X    echo \
X"Pretty strange answer!  I think you should reconsider and try this question "\
X    echo "again..."
X    echo " "
X  else
X    max_ualiases=$junk
X    echo "s/>251</$max_ualiases/" >> $SED1
X    case $junk in
X	127) default=223	;;
X	503) default=739	;;
X	*  ) default=503	;;
X    esac
X  fi
Xdone
X
Xmax_saliases="NONE"
X
Xwhile [ "$max_saliases" = "NONE" ] 
Xdo 
X
X  echo $nflag "Max number of system aliases available  [$default] ? " $cflag
X
X  read junk
X
X  if [ "$junk" = "" ] 
X  then
X   junk=$default
X  fi
X
X  if [ $junk -lt 50 -o $junk -gt 1000 ] 
X  then
X    echo "Pretty far out value for this question!  I think you should reconsider"
X    echo "your answer and try this question again..."
X    echo " "
X  else
X    max_saliases=$junk
X    echo "s/>503</$max_saliases/" >> $SED1
X  fi
Xdone
X
Xcat << THE_END
X
XThe next pair of questions have to do with what to do when another program has 
Xlocked a mailbox...
X
XFirst, how many times should the program check for the removal of the lock
XTHE_END
X
Xdefault=6
X
Xmax_attempts="NONE"
X
Xwhile [ "$max_attempts" = "NONE" ] 
Xdo 
X
X  echo $nflag "file before giving up? [6] " $cflag
X
X  read junk
X
X  if [ "$junk" = "" ] 
X  then
X   junk=$default
X  fi
X
X  if [ $junk -lt 3 -o $junk -gt 10 ] 
X  then
X    echo \
X"The recommended range is 3-10   ...Number of times to check lock"
X  else
X    max_attempts=$junk
X    echo "s/>6</$max_attempts/" >> $SED1
X  fi
Xdone
X
Xecho " "
Xanswer="no"
Xecho $nflag "Should it REMOVE the lockfile after $max_attempts checks [no] ?" \
X     $cflag
Xread answer
X
Xif [ "$answer" != "y" -a "$answer" != "yes" ]
Xthen
X  echo \
X"s/#define REMOVE_AT_LAST/\/** #define REMOVE_AT_LAST **\//" \
X  >> $SED1
Xfi
X
Xif [ "$NAME" = "BSD" ]
Xthen 
X  ps="ps -cax"
Xelse
X  ps="ps -ef"
Xfi
X
Xecho " "
Xecho " "
Xecho "poking about a bit.."
X
Xresult="`$ps | grep sendmail | grep -v grep`"
X
Xif [ "$result" = "" ]
Xthen
X  if [ -f /usr/lib/sendmail -a -f /usr/lib/sendmail.cf ]
X  then
X    echo \(sendmail available - assuming you don\'t run it as a daemon\)
X    result="ok"
X  fi
Xfi
X
Xif [ "$result" != "" ]
Xthen
X  echo "You're running sendmail.  Well done, I guess..."
X  echo "s/\/\*\* #define ALLOW_BCC \*\*\//#define ALLOW_BCC/" \
X    >> $SED1
X  echo "s/\/\*\* #define DONT_ADD_FROM \*\*\//#define DONT_ADD_FROM/" \
X    >> $SED1
X    echo \
X "s/#define USE_DOMAIN/\/** #define USE_DOMAIN **\//" \
X    >> $SED1
Xelse
X
X  cat << THE_END
X
XSince you're not running sendmail, should I check local user entered addresses
XTHE_END
X
Xanswer="yes"
Xecho $nflag "against the valid mailboxes on this system [yes] ? " $cflag
Xread answer
X
Xif [ "$answer" != "y" -a "$answer" != "yes" -a "$answer" != "" ]
Xthen
X  echo \
X"s/#define NOCHECK_VALIDNAME/\/** #define NOCHECK_VALIDNAME **\//" \
X  >> $SED1
Xfi
X
Xcat << THE_END
X
XAre you running a machine where you want to have a domain name appended to the
XTHE_END
X
Xanswer="yes"
Xecho $nflag "hostname on outbound mail [no] ? " $cflag
Xread answer
X
Xif [ "$answer" != "y" -a "$answer" != "yes" ]
Xthen
X    echo \
X "s/#define USE_DOMAIN/\/** #define USE_DOMAIN **\//" \
X    >> $SED1
Xelse
X  echo " "
X  echo $nflag "Enter the domain name (include leading '.') : " $cflag
X  read answer
X  echo "s/<enter your domain here>/$answer/" >> $SED1
Xfi
X
Xfi
X
X# next let's see if we can find the vfork command on this system..
X
Xcat << EOF > .test.c
Xmain()
X{
X	(void) vfork();
X}
XEOF
X
Xif [ "$NAME" = "UTS" ]
Xthen
Xcat << EOF > .vfork
Xcc -la .test.c
XEOF
Xelse
Xcat << EOF > .vfork
Xcc .test.c
XEOF
Xfi
X
Xsh .vfork > .log 2>& 1
X
Xif [ "`cat .log | wc -l`" -eq "0" ]
Xthen
X  echo "You have virtual memory system calls available.  Cool..."
Xelse
X  cat << THE_END
X
XYour machine doesn't seem to have the vfork command available.  Should I assume
XTHE_END
X
X  answer="no"
X  echo $nflag "you have it, anyway [no] ? " $cflag
X  read answer
X
Xif [ "$answer" != "y" -a "$answer" != "yes" ]
X  then
X    echo "s/\/\*\* #define NO_VM \*\*\//#define NO_VM/" >> $SED1
X  fi
Xfi
X
X$rm -f a.out .test.c .vfork .log
X
X# next let's see if we have the gethostname() system call...
X
Xcat << EOF > .test.c
Xmain()
X{
X	(void) gethostname();
X}
XEOF
X
Xcat << EOF > .hostname
Xcc .test.c
XEOF
X
Xsh .hostname > .log 2>& 1
X
Xif [ "`cat .log | wc -l`" -eq "0" ]
Xthen
X  echo "You have the 'gethostname()' system call..."
Xelse
X  echo "s/\/\*\* #define NEED_GETHOSTNAME \*\*\//#define NEED_GETHOSTNAME/" \
X  >> $SED1
Xfi
X
X$rm -f a.out .test.c .hostname .log
X
X# next let's see if we have long variable names...
X
Xcat << EOF > .test.c
Xmain()
X{
X	int this_is_a_long_variable=0;
X
X	(void) this_is_a_long_variable_routine_name(this_is_a_long_variable);
X	
X}
Xthis_is_a_long_variable_routine_name() { }
XEOF
X
Xcat << EOF > .varnames
Xcc .test.c
XEOF
X
Xsh .varnames > .log 2>& 1
X
Xif [ "`cat .log | wc -l`" -eq "0" ]
Xthen
X  echo "You have long variable names.  Well done!!!!!"
Xelse
X  echo "How embarassing.  Your C compiler doesn't support long variables..."
X  echo "s/\/\*\* #define SHORTNAMES \*\*\//#define SHORTNAMES/" \
X  >> $SED1
Xfi
X
X$rm -f a.out .test.c .varnames .log
X
Xif [ $dont_touch_addresses = 0 ]
Xthen
Xcat << THE_END
X
XWhen given a machine that you talk to directly, should the 'pathalias' route to
XTHE_END
X
X answer="no"
X echo $nflag "the machine be used instead [no] ? " $cflag
X read answer
X
X if [ "$answer" != "y" -a "$answer" != "yes" ]
X then
X    echo \
X "s/#define LOOK_CLOSE_AFTER_SEARCH/\/** #define LOOK_CLOSE_AFTER_SEARCH **\//"\
X    >> $SED1
X fi
Xfi
X
XanswerX   fi
X fi
Xfi
X
Xuse_dbm=0
X
Xif [ $dont_touch_addresses = 0 ]
Xthen
X  if [ -f $answer.pag -a -f $answer.dir ]
X  then
X    echo "You have pathalias as a DBM file...I'll use that instead."
X    echo "s^/\*\* #define USE_DBM \*\*/^#define USE_DBM^" >> $SED1
X    use_dbm=1
X  fi
Xfi
X
Xcase $OS_FLAG in 
X  BSD) echo "s/>os-define</-DBSD/"    >> $SED2
X       echo "s/>lib2</-lcurses/"      >> $SED2
X       if [ $use_dbm = 1 ]
X       then
X         echo "s/>libs</-ltermcap -ldbm/" >> $SED2
X       else
X         echo "s/>libs</-ltermcap/"       >> $SED2
X       fi
X       ;;
X
X  PYRAMID) echo "s/>os-define</"-DBSD -DNO_VAR_ARGS"/" >> $SED2
X       echo "s/>lib2</-lcurses/"      >> $SED2
X       if [ $use_dbm = 1 ]
X       then
X         echo "s/>libs</-ltermcap -ldbm/"     >> $SED2
X       else
X         echo "s/>libs</-ltermcap/"     >> $SED2
X       fi
X       ;;
X
X  UTS) echo "s/>os-define</-DUTS/"    >> $SED2
X       echo "s/>lib2</-la -lq/"       >> $SED2
X       if [ $use_dbm = 1 ]
X       then
X         echo "s/>libs</-lcurses -ldbm/" >> $SED2
X       else
X         echo "s/>libs</-lcurses/"       >> $SED2
X       fi
X       ;;
X
X  *)   echo "s/>os-define<//"         >> $SED2
X       echo "s/>lib2<//"              >> $SED2
X       if [ $use_dbm = 1 ] 
X       then
X         echo "s/>libs</-ltermcap -ldbm/" >> $SED2
X       else
X         echo "s/>libs</-ltermcap/"       >> $SED2
X       fi
X       ;;
X
Xesac
X
X 
Xif [ $dont_touch_addresses = 0 ]
Xthen
X if [ ! -f /usr/lib/domains ] 
X then
X   echo $nflag "Where does the 'domains' file live ? " $cflag
X   read answer
X
X   if [ "$answer" != "" ]
X   then
X     echo "s^/usr/lib/domains^$answer^" >> $SED1
X   fi
X fi
Xfi
X
Xif [ $not_using_lsys_file = 1 ]
Xthen
X  if [ ! -f /usr/lib/uucp/L.sys ]
X  then
X    echo $nflag "Where does the 'L.sys' file live ? " $cflag
X    read answer
X
X    if [ "$answer" != "" ]
X    then
X      echo "s^/usr/lib/uucp/L.sys^$answer^" >> $SED1
X    fi
X  fi
Xfi
X 
Xif [ ! -d /tmp ]
Xthen 
X  echo $nflag "/tmp isn't a directory!  What should I use?? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/tmp^$answer^" >> $SED1
X  fi
Xfi
X
Xif [ ! -f /usr/ucb/vi -a "$os_name" = "BSD" ]
Xthen
X  echo $nflag "I can't find the 'vi' editor!  Where is it? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/usr/ucb/vi^$answer^" >> $SED1
X  fi
Xelif [ ! -f /usr/bin/vi -a "$os_name" = "" ]
Xthen
X  echo $nflag \
X    "I can't find the 'vi' editor!  Where is it? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/usr/bin/vi^$answer^" >> $SED1
X  fi
Xfi
X
Xif [ ! -d /usr/spool/mail -a "$os_name" = "BSD" ]
Xthen
X  echo $nflag "I can't find your inbound mail directory!  Where is it? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/usr/spool/mail^$answer^" >> $SED1
X  fi
Xelif [ ! -d /usr/mail -a "$os_name" = "" ]
Xthen
X  echo $nflag "I can't find your inbound mail directory!  Where is it? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/usr/mail^$answer^" >> $SED1
X  fi
Xfi
X
Xif [ ! -f /bin/rm ]
Xthen
X  echo $nflag "Where's the 'rm' program? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/bin/rm^$answer^" >> $SED1
X  fi
Xfi
X
Xif [ ! -f /bin/cat ]
Xthen
X  echo $nflag "Where's the 'cat' program? " $cflag
X  read answer
X
X  if [ "$answer" != "" ]
X  then
X    echo "s^/bin/rm^$answer^" >> $SED1
X  fi
Xfi
X 
Xif [ ! -c /dev/rct ]
Xthen
X  if [ ! -c /dev/rmt ]
X  then
X    echo $nflag "What's the name of your remote-tape unit? " $cflag
X    read answer
X
X    if [ "$answer" = "" ]
X    then
X      echo "s^>tapeunit<^unknown-remote-tape-unit^" >> $SED2
X    else
X      if [ ! -c $answer ] 
X      then
X	if [ -c /dev/$answer ]
X	then
X          echo "s^>tapeunit<^/dev/$answer^" >> $SED2
X        else
X          echo \
X           "I can't find either $answer or /dev/$answer.  I'll set it to junk" 
X          echo "s^>tapeunit<^unknown-remote-tape-unit^" >> $SED2
X        fi
X      else
X        echo "s^>tapeunit<^$answer^" >> $SED2
X      fi
X    fi
X  else
X    echo "s^>tapeunit<^/dev/rmt^" >> $SED2
X  fi
Xelse
X  echo "s^>tapeunit<^/dev/rct^" >> $SED2
Xfi
X
Xif [ ! -d /usr/local/bin ]
Xthen
X  echo $nflag "Where do you want the system software installed? " $cflag
X  read answer
X
X  if [ "$answer" = "" ]
X  then
X    echo "s^>dest-dir<^unknown-destination-directory^" >> $SED2
X  else
X    if [ -d $answer ]
X    then
X      echo "s^>dest-dir<^$answer^" >> $SED2
X    else
X      echo "I don't know what you're talking about.  I'll set it to junk" 
X      echo "s^>dest-dir<^unknown-destination-directory^" >> $SED2
X    fi
X  fi
Xelse
X  echo "s^>dest-dir<^/usr/local/bin^" >> $SED2
Xfi
X
Xif [ ! -f /usr/bin/troff ]
Xthen
X  if [ ! -f /usr/local/bin/troff ]
X  then
X    if [ ! -f /usr/contrib/bin/troff ]
X    then
X      if [ ! -f /usr/ucb/troff ]
X      then
X        if [ ! -f /bin/troff ]
X        then
X          echo $nflag "Where does the 'troff' program live? " $cflag
X 	  read answer
X
X	  if [ "$answer" = "" ]
X	  then
X            echo "s/>troff</nroff/" >> $SED2
X	  else
X            if [ -f $answer ]
X	    then
X              echo "s^>troff<^$answer^" >> $SED2
X              troff=$answer
X	    else
X	      echo "Still can't find it.  I'll set it to \"nroff\" instead."
X              echo "s/>troff</nroff/" >> $SED2
X	    fi
X	  fi
X	else
X          echo "s^>troff<^/bin/troff^" >> $SED2
X          troff=/bin/troff
X        fi
X      else
X        echo "s^>troff<^/usr/ucb/troff^" >> $SED2
X        troff=/usr/ucb/troff
X      fi
X    else
X      echo "s^>troff<^/usr/contrib/bin/troff^" >> $SED2
X      troff=/usr/contribbin/troff
X    fi
X  else
X    echo "s^>troff<^/usr/local/bin/troff^" >> $SED2
X    troff=/usr/local/bin/troff
X  fi
Xelse
X  echo "s^>troff<^/usr/bin/troff^" >> $SED2
X  troff=/usr/bin/troff
Xfi
X
X# phew!
X
Xtroffdir=`dirname $troff`
X
Xif [ -f $troffdir/tbl ]
Xthen
X  echo "s^>tbl<^$troffdir/tbl^" >> $SED2
Xelse
X  echo $nflag "Where does the 'tbl' program live? " $cflag
X  read answer
X
X  if [ "$answer" = "" ]
X  then
X    echo "s^>tbl<^cat^" >> $SED2
X  elif [ -f $answer ]
X  then
X    echo "s^>tbl<^$answer^" >> $SED2
X  else
X    echo "I can't find that either.  I'll just set it to junk..."
X    echo "s^>tbl<^cat^" >> $SED2
X  fi
Xfi
X
Xif [ -f /bin/cc ]
Xthen
X  echo "s^>cc<^/bin/cc^" >> $SED2
Xelse
X  echo $nflag "Where does the 'C' compiler live? " $cflag
X  read answer
X
X  if [ "$answer" = "" ]
X  then
X    cat << THE_END
X
XI hope you realize that without a "C" compiler there's no point in doing any
Xof this.  If we can't compile anything then this is just so much disk filler.
X
XIn fact, thinking about it, let's just quit right now.
X
XTHE_END
X
X    exit 1
X  fi
X
X  if [ -f $answer ]
X  then
X    echo "s^>cc<^$answer^" >> $SED2
X  else
X    cat << THE_END
X
XI couldn't find what you specified, pal.  I hope you realize that without a 
X"C" compiler there's no point in doing any of this.  If we can't compile 
Xanything then this system is just so much disk filler.
X
XIn fact, thinking about it, let's just quit right now.
X
XTHE_END
X    exit 1
X  fi
Xfi
X
Xecho "s^>rm<^$rm -f^" >> $SED2
X
Xif [ -f /bin/mv ]
Xthen
X  echo "s^>mv<^/bin/mv -f^" >> $SED2
Xelse
X  echo "s^>mv<^mv -f^" >> $SED2  
Xfi
X
Xif [ -f /bin/cp ]
Xthen
X  echo "s^>cp<^/bin/cp^" >> $SED2
Xelse
X  echo "s^>cp<^cp^" >> $SED2  
Xfi
X
Xcat << END
X
XThat's it.  Just  have to do some patching up and such...hang loose for a 
Xminute or two, please...
X
XEND
X
X# process the four Makefiles accordingly...
X
Xecho "1 - processing the file \"Makefile\"..."
Xcat Makefile.mstr | sed -f $SED2 > Makefile
X
Xecho "2 - processing the file \"src/Makefile\"..."
Xcat src/Makefile.mstr | sed -f $SED2 > src/Makefile
X
Xecho "3 - processing the file \"utils/Makefile\"..."
Xcat utils/Makefile.mstr | sed -f $SED2 > utils/Makefile
X
Xecho "4 - processing the file \"filter/Makefile\"..."
Xcat filter/Makefile.mstr | sed -f $SED2 > filter/Makefile
X
X# then filter the sysdefs file through the sed script we've created!
X
Xecho "Finally, processing the file \"hdrs/sysdefs.h\"..."
X
Xif [ -f hdrs/sysdefs.h ]
Xthen
X  mv hdrs/sysdefs.h hdrs/sysdefs.old
Xfi
X
Xcat hdrs/sysdefs.master | sed -f $SED1 > hdrs/sysdefs.h
X
Xecho Done\!
X
X$rm -f $SED1 $SED2
Xexit 0
END_OF_Configure.sh
if test 20314 -ne `wc -c <Configure.sh`; then
    echo shar: \"Configure.sh\" unpacked with wrong size!?
fi
chmod +x Configure.sh
# end of overwriting check
fi
echo shar: Extracting \"doc/Users.guide\" \(31420 characters\)
if test -f doc/Users.guide ; then 
  echo shar: Will not over-write existing file \"doc/Users.guide\"
else
sed "s/^X//" >doc/Users.guide <<'END_OF_doc/Users.guide'
X.PH ""
X.tm I trust we've run this through tbl first...
X\"
X\"  Users guide to the ELM mail system.
X\"  format with 'tbl Users.guide | troff -mm > Users.fmtd
X\"  or something similar.
X\"
X\"  (C) Copyright 1986 Dave Taylor
X\"
X\"  Last update: January 19th, 1987
X\"
X.PF ""
X\"  Define the big box macro for troff
X.de eb
X.sp -1	
X.nf
X\h'-.5n'\L'|\\nau-1'\l'\\n(.lu+1n\(ul'\L'-|\\nau+1'\l'|0u-.5n\(ul'
X.fi
X..
X.ds HF 3  3 
X.ds HP 12 12
X.SA 1
X.nr Hy 1
X.nr Pt 1
X.nr Pi 8
X.lg 1
X.HM 1 1
X.rs
X.sp 5
X.ce 99
X.ps 20
X\fBElm Users Guide\fR
X.sp 2
X.ps 12
X\fIA painless introduction to electronic mail 
Xusing the \fBElm\fP mailer\fR
X.sp 5
XDave Taylor
X.sp 
XHewlett-Packard Laboratories
X1501 Page Mill Road
XPalo Alto CA
X94304
X.sp
Xemail: taylor\s10@\s12hplabs.HP.COM or hplabs!taylor
X.ps 10
X.sp 7
X\fBABSTRACT\fR
X.ce 0
X.sp
X.DS CB F
XWhile various parts of the Unix system have been
Xupdated into the `CRT' age (rather than the `teletype')
Xelectronic mail systems haven't.  This document 
Xpresents \fIElm\fR, a sophisticated
Xfull-screen mail system for interactive use.
X\fIElm\fR offers all the features of
X\fI/bin/mail\fR, \fIBerkeley Mail\fR, \fIuumail\fR, \fINMail\fR and
Xthe AT&T Mail family of Unix mailers (namely \fIPMX/TERM\fR) in a
Xunified and intuitive fashion.
X.DE
X.sp 5
X.ce
X.ps 18
X\fB\(co\fR\s12 Copyright 1986, 1987 by Dave Taylor
X.ps 10
X.SK
X.ce 99
X.ps 14
X\fBElm Users Guide\fR
X.ps 10
X.sp
X(version 1.5)
X.sp 2
XDave Taylor
XHewlett-Packard Laboratories
X1501 Page Mill Road
XPalo Alto CA
X94304
X.sp
Xemail: taylor@hplabs.HP.COM or hplabs!taylor
X.sp 2
X\*(DT
X.ce 0
X.nr P 1
X.PH "'Elm Users Guide''Version 1.5'"
X.PF "''Page \\\\nP''"
X.sp 3
X.H 1 "Introduction"
X.P 1
XThe Unix\v'-.3'\s5TM\s10\v'.3' operating system was originally 
Xwritten on a small PDP machine
Xto work with teletypewriters.  Consequently, all the original software for
Xthe operating system was written with a `tty' in mind - they were all 
Xline oriented, rather than screen oriented.
X.P
XGradually this began to change, and, with the addition of the Berkeley
X.I vi
Xvisual shell to the 
X.I ed
Xline editor, the trend began to be brought to the attention of 
XUnix systems designers.  
X.FS " "
XHistorical note: shrewd users will recognize this as being based on 
Xthe old Unix mailer
X.lg 0
X\fIMsg.\fR
X.lg 1
XThe name was changed to avoid a conflict with an old DEC-20
Xmailer, and because the new name stands for \fBEL\fRectronic \fBM\fRail,
Xwhich I think works out better!
X.FE
X.P
XUnfortunately, however, this transition was far too subtle for most software 
Xdesigners, and today there are precious few programs distributed with the
XUnix system, either from Berkeley, AT&T or variations thereof,
Xthat are full screen oriented.
X.P
XConsequently, after becoming more and more disenchanted
Xwith the existing electronic mail facilities (\fImail\fR
Xand \fIBerkeley Mail\fR, both of which are line-oriented) 
XI decided to write my own!  Once the ball was rolling it
Xbecame hard not to enhance it to death, especially as I
Xbecame more and more familiar with various different mail
Xsystems, but the result, I hope, is a solid, unified interface
Xto electronic mail suitable for almost any environment.
X.P
XThe 
X.B Elm
Xmail system comes with five documents, entitled;
X\fIThe Elm Users Guide\fR, which you're holding,
X\fIThe Elm Reference Guide\fR, \fIThe Elm Alias Users Guide\fR,
X\fIThe Elm Forms Mode Guide\fR, and \fIThe Elm Configuration 
XGuide\fR.  The names of each indicate
Xwhat they discuss (not unreasonably).
X.P
XThis particular document contains;
Xthis introduction, a tutorial session with the mailer, a
Xdiscussion of non-interactive uses of \fBElm\fR,
Xa brief foray into the \fBElm\fR utilities,
Xand finally, credits and references.
X.P
XThe \fIElm Reference Guide\fR contains;
Xa discussion of the \fI.elmrc\fR file,
Xstarting options of 
X.B Elm,
Xoutgoing mail processing,
Xresponses of various commands,
Xthe mail archive file,
Xthe Limit command,
Xthe Alias system,
Xsystem aliases etc,
Xmore on the utilities,
Xand a section for expert users and debugging.
X.P
XThe \fIElm Alias Users Guide\fR contains;
Xa further discussion of \fIuser aliases\fR
Xand \fIgroup aliases\fR,  System aliases,
Xhow to edit and install new aliases,
Xthe hostname routing database,
Xthe domain routing database,
Xand so on.
X.P
XThe \fIElm Forms Mode Guide\fR is a tutorial
Xfor those interested in sending AT&T Mail-style
Xforms to each other.
X.P
XThe \fIElm Configuration Guide\fR discusses how
Xto install and custom configure the mail system to 
Xyour local machine.  This is probably only of 
Xinterest to system adminstrators or those interested
Xin modifying the source code, which should be freely
Xavailable.  It is recommended that the \fIconfigure.sh\fR
Xscript be used for most standard installations.
X.sp
X.P
XAny comments or problems with any of the documentation or the program
Xitself are welcome: all installed systems should have an alias
Xthat will ensure that I receive any mail sent to `elm'.
X.sp 2
X.H 1 "The Main System"
X.P 1
XUpon entry to the program, the main screen will be 
Xdisplayed as below;
X\" display start, constant width, remember loc for BOX
X.DS CB
X.mk a
X.mk a
X.ce
XMailbox is '/usr/mail/mymail' with 15 messages.  [Elm 1.5]
X
X.TS
Xr c r l l l l.
X ->		1	Apr 3	rob	(24)	Doing anything tonight?
X		2	Apr 5	Joe	(154)	bug in gammon game
X		3	Apr 5	root	(13)
X		4	Apr 6	root	(7)	(continuation of previous message)
X	U	5	Apr 8	decvax!mouse	(68)	Re: net.music article decvax:495
X		6	Apr 13	John Jacobs	(194)	How can you hate RUSH?
X		7	Apr 15	kevin	(27)	More software requests
X	N	8	Apr 18	games	(26)	Hi there
X	N	9	Apr 18	Don Knuth	(354)	Your version of TeX...
X	N	10	Apr 23	Carl Smith	(53)	(More silly stuff
X	N	11	Apr 24	jad@hpcnoe	(84)	Chico?  Why go there?
X	N	12	Apr 24	Larry Fenske	(49)	hi there...
X.TE
X.sp
X.ce 3
XYou can use any of the following commands by pressing the first character;
XD)elete mail,  M)ail a message,  R)eply to mail,  U)ndelete, or Q)uit
XTo read a message, press <return>.  j = move arrow down, k = move arrow up
X
XCommand : @
X.sp 2
X\" draw box, proportional Roman font back, display end
X.eb
X.DE
X.P 0
XThere are a number of things to notice about this screen;
X.BL 4
X.LI
XFirst off, it's quite possible that on your screen the current message will
Xbe indicated by an inverse bar rather than an arrow. 
XDon't worry about it - it's just harder to have an inverse
Xbar in a document than an arrow!
X.LI
XThe top line always displays the current mail file, 
Xthe number of messages in the file, and the current 
X.B Elm
Xversion number.
X.LI
XThe arrow (``->'') (or bar) always points to the current message.  
X.LI
XThe first few characters on each line can indicate the following:
X.VL 6 5
X.LI "U"
X-  an \fIU\fRrgent message
X.LI "N"
X-  a \fIN\fRew message since you last read mail
X.LI "E"
X-  an \fIE\fRxpired message (not yet implemented)
X.LI "A"
X-  an \fIA\fRction is associated with the message
X.LI "D"
X-  the message is marked for \fID\fReletion
X.LI "+"
X-  the message is \fITagged\fR.
X.LE
X.LI
XContinuing from left to right, the next field is the message
Xnumber.  For the most part you can ignore these unless you want
Xto quickly move to a specific message (as we'll see later)
X.LI
XThe date associated with each message is the date the person
X.I sent 
Xthe message.  
X.LI 
XThe next field displayed indicates who the message is from.  
X\fBElm\fR will try to display the \fIname\fR of the person who 
Xsent the message, rather than the their return address/login.  
XSome systems don't generate the correct headers, though, hence 
Xmessages like number 11, where it's
Xthe return address of the sender...
X.LI
XThe number in parentheses is the total number of lines in the message.
X.LI
XThe final field is the subject of the message.  Notice
Xthat message 3 has no subject.
X.LI
XA maximum of twelve messages are displayed at one time \*F.
X.FS
XOn terminals with greater than 25 lines, more messages will be 
Xdisplayed automatically.  Further, if you choose to turn off
Xthe Menu display, you can have more too.
X.FE
XFurther into
Xthe document we'll learn how to change 'pages' in the mailbox. 
X.LI
XThe three line Menu display will always 
Xindicate the relevant commands.  There are actually two possible 
Xmenus that can be displayed, based
Xon the \fIuser level\fR as set from either the O)ptions screen or
Xthe \fI.elmrc\fR file.  The second menu, for more advanced users, 
Xlists more options;
X.sp
X.ce 3
X|=pipe, !=shell, ?=help, <n>=set current to n, /=search pattern
XA)lias, C)hange mailbox, D)elete, E)dit, F)orward, G)roup reply, M)ail, 
XN)ext, O)ptions, P)rint, R)eply, S)ave, T)ag, Q)uit, U)ndelete, or eX)it
X.sp 
X.LI
XFinally, the '@' character indicates where the cursor would be, awaiting
Xyour input.
X.LE
X.P 0
XThe typical action at this point is to use the 
X.I <return>
Xkey to read the current message.  This particular option actually isn't
Xnoted in the Menu display, but choosing the '?=help' option will
Xinform you of a number of choices other than those in the 
Xbasic menu!
X.P 0
XPressing this key will clear the screen and display the 
Xmessage using the local pager 
X(see \fIpager\fR in the \fI.elmrc\fR file).
X.P 0
XWhile reading is perhaps the most fundamental function that the
X.B Elm
Xprogram performs, there are a number of other options available,
Xnamely;
X\" ensure we get a reasonable chunk of this table on the page...
X.ne 10
X.sp
X.VL 25 0 1
X.LI "Command"
XAction
X.LE
X.sp
X.VL 22 3 1
X.LI "|"
XPipe current message or tagged messages to specified system command.
X.LI "!"
XShell escape.
X.LI "?"
XHelp mode - any key pressed will be explained.
X.LI "+, <space>,"
X.LI "  or <NEXT>"
XNext page of headers
X.LI "-, or <PREV>"
XPrevious page of headers
X.LI "=, or <HOME>"
XSet current message to 1
X.LI "*, or "
X.LI " <SHIFT>-<HOME>"
XSet current to last message.
X.LI "<n>"
XSet current message to number n.
X.LI "/"
XSearch for pattern in subject/from lines.
X.LI "//"
XSearch for pattern in entire mailbox.
X.LI "<"
XScan message for calendar entries\*F
X.FS 
XSome sites might opt not to have this feature
Xavailable.
X.FE
X.LI ">"
XA synonym for `s' - \fIsave\fR message or messages.
X.sp
X.LI "a"
XAlias, change to 'alias' mode 
X.LI "b"
XBounce - remail message**
X.LI "c"
XChange to new mail file
X.LI "d"
XDelete current message
X.LI "<control>-D"
XDelete all messages matching specified pattern
X.LI "e"
XEdit mailbox file, resyncing upon reentry.
X.LI "f"
XForward message to specified user\*F
X.FS
XThe difference between \fIForward\fR and \fIBounce\fR is rather 
Xsubtle -- a forwarded message is ``from'' you, with the
Xoriginal message included, whereas a bounced message
Xis still from the original sender.  
X.FE
X.LI "g" 
XGroup reply - reply to everyone who received the current message
X.LI "h"
XDisplay message + headers
X.LI "j"
XIncrement current message by one
X.LI "k"
XDecrement current message by one
X.LI "l"
XLimit displayed messages based on the specified criteria.  
X.LI "m"
XMail to arbitrary user(s)
X.LI "n or <return>"
XNext message (Read current, then increment)
X.LI "o"
XAlter current system options.
X.LI "p"
XPrint current message or tagged messages.
X.LI "q"
XQuit - mail deleted, saved in mbox or left.
X.LI "r"
XReply to the author of current message
X.LI "s"
XSave current message or tagged messages to file
X.LI "t"
XTag current message.
X.LI "<control>-T"
XTag all messages matching specified pattern.
X.LI "u"
XUndelete current message
X.LI "<control>-U"
XUndelete all messages matching specified pattern.
X.LI "x"
XExit - don't record as read, don't save...
X.sp
X.LI "^L"
XRewrite screen.
X.LI "^M (<return>)"
XRead current message
X.LI "^Q, DEL"
XExit - don't record as read, don't save...
X.LE
X.sp
X.P 0
XThat are all the commands available at the main level of the
X.B Elm
Xprogram!  Easy to remember, right?
X.sp 2
X\" again, make sure we start on a new page please
X.ne 10
X.P 0
XAs an example, let's enter a series of commands and indicate
Xwhat the display would be after each one;
X.sp
X.P 0
XFirst off, let's go to the next page of mail with `\fI<space>fR';
X.DS CB
X.mk a
X.ce
XMailbox is '/usr/mail/mymail' with 15 messages.  [Elm 1.5]
X
X.TS
Xr c r l l l l.
X ->	N	13	Apr 3	Jack	(17)	Wanna buy some albums cheap?
X	N	14	Apr 5	Jack	(8)	Cancel the previous offer!
X	N	15	Apr 5	sdcsvax!dx	(420)	Moving day (long) 
X.TE
X     
X  
X     
X     
X  
X  
X  
X  
X  
X
X.ce 3
XYou can use any of the following commands by pressing the first character;
XD)elete mail,  M)ail a message,  R)eply to mail,  U)ndelete, or Q)uit
XTo read a message, press <return>.  j = move arrow down, k = move arrow up
X
XCommand : @
X.sp 2
X.eb
X.DE
X.P 0
XLet's read the new current message, 13, by typing <\fIreturn\fR>.
X.DS CB
X.mk a
X.tl 'Message #13 from Jack''Mailed April 3, 1985 at 8:45 pm'
X
XI just found my old Lawrence Welk Platinum Hits series of albums and recall you 
Xsaying that you really enjoy listening to that sort of drivel...
X
XSo, do you want to buy them off of me before I make ashtrays out of them (or frisbees...)?
X
X                                                  Humourously,
X                                                                  Jack 
X
X
X
X
X
X
XPress <return> to return to Elm: @
X
X.eb
X.DE
X.P 0
XNeedless to say, we can't let this message go by without replying!
XSo let's press <\fIreturn\fR>, then use the
X.I "reply"
Xcommand to respond.
X.P 0
XAfter pressing the `\fIr\fR' key, the program asks if a copy of the 
Xmessage is desired (the character under the cursor indicates the
Xdefault if <return> is pressed.  In this case, the default is 'no');
X.sp
X.nf
X    copy message? (y/n) @
X.fi
X.P 0
XWe choose to answer no, so press the `\fIn\fR' key.  Next 
X.B Elm
Xdisplays whom the message will be sent to\*F and 
X.FS
XThe default action of the mailer is to display just the name
Xof the person or persons the message will be sent to.  If the actual
Xaddress is also desired, then the user needs to include "names=OFF" in
Xtheir \fI.elmrc\fR file.  See the \fIElm Reference Guide\fR for
Xmore information on this.
X.FE
Xverifies that the subject is okay;
X.sp
X.tl '    Command: Reply''To: Jack    '
X.tl '    Subject of Message: Re: Wanna buy some albums cheap?@'
X.sp
XTyping anything other than <return> will allow us
Xto change the subject to something more appropriate.
XWe decide, however, to leave it be and press <\fIreturn\fR> again.
X.P 0
XThe program then puts us
Xin the (default)
X.I vi
Xeditor with a newly created file
X.P 0
XAfter having entered a suitable reply, and left the editor,
Xthe 
X.B Elm
Xsystem then verifies that we really want to send the message with;
X.sp
X    Are you sure you want to send this message? (y/n) @
X.sp
XTo which our response is `\fIy\fR' for 'yes'.  It then sends the message off
Xto Jack, who will receive it hopefully quite soon (or at least
Xbefore he makes ashtrays out of the albums!)  
X.sp
X.P 0
XMessage 13 is still the current message,
Xso, now let's save it and the one after it from Jack, message 14,
Xby \fItagging\fR them both.  We press `\fIt\fR' for \fItag\fR, which 
Xputs the '+' tag indicator on this message, move to the next
Xmessage with the `\fIj\fR' key, then press `\fIs\fR' for \fIsave\fR
X.sp
XThis prompts for the file to save to;
X.nf
X
X   Save messages to: @
X
X.fi
Xto which we answer \fI=jack\fR.  The two messages are then saved to
Xthe specified file, marked for deletion, and the \fItags\fR are
Xremoved from them.
X.P 0
XThe screen is now;
X.DS CB
X.mk a
X.ce
XMailbox is '/usr/mail/mymail' with 15 messages.  [Elm 1.5]
X.nf
X
X.TS
Xr c r l l l l.
X ->	\ D	13	Apr 3	Jack	(17)	Wanna buy some albums cheap?
X	\ D	14	Apr 5	Jack	(8)	Cancel the previous offer!
X	N	15	Apr 5	sdcsvax!dx	(420)	Moving day (long) 
X.TE
X.sp 10    
X.ce 3
XYou can use any of the following commands by pressing the first character;
XD)elete mail,  M)ail a message,  R)eply to mail,  U)ndelete, or Q)uit
XTo read a message, press <return>.  j = move arrow down, k = move arrow up
X
XCommand : @
X.sp 2
X.eb
X.DE
X.P 0
XNow lets go back to the first page of messages by typing '\fI=\fR';
X.DS CB
X.mk a
X.ce
XMailbox is '/usr/mail/mymail' with 15 messages.  [Elm 1.5]
X.nf
X
X.TS
Xr c r l l l l.
X ->		1	Apr 3	rob	(24)	Doing anything tonight?
X		2	Apr 5	Joe	(154)	bug in gammon game
X		3	Apr 5	root	(13)
X		4	Apr 6	root	(7)	(continuation of previous message)
X	U	5	Apr 8	decvax!mouse	(68)	Re: net.music article decvax:495
X		6	Apr 13	John Jacobs	(194)	How can you hate RUSH?
X		7	Apr 15	kevin	(27)	More software requests
X	N	8	Apr 18	games	(26)	Hi there
X	N	9	Apr 18	Don Knuth	(354)	Your version of TeX...
X	N	10	Apr 23	Carl Smith	(53)	(More silly stuff
X	N	11	Apr 24	jad@hpcnoe	(84)	Chico?  Why go there?
X	N	12	Apr 24	Larry Fenske	(49)	hi there...
X.TE
X.sp
X.ce 3
XYou can use any of the following commands by pressing the first character;
XD)elete mail,  M)ail a message,  R)eply to mail,  U)ndelete, or Q)uit
XTo read a message, press <return>.  j = move arrow down, k = move arrow up
X
XCommand : @
X.sp 2
X.eb
X.DE
X.P 0
XNote five not only looks mildly interesting but it's an 
X\fBU\fRrgent message too!  So 
Xlet's read it by typing \fI5<return>\fR
Xto make that the current message, and press <\fIreturn\fR> again
Xto read it.  After reading
Xthe message we decide that it's utterly worthless, not even worth
Xreplying to, let alone saving, so we'll mark it
Xfor future deletion with the `d' \fIdelete\fR key.
X.P 0
XA `D' is put next to the message now...
X.P 0
XBefore we finish up, we suddenly remember that one of the 
Xmessages was supposed to be about how to write decent 
Xdocumentation for Unix software, so let's try to find it...
X.P 0
XFirst off, we'll move back to message one with the `\fI=\fR'
Xkey and then use the `/' \fIpattern matching\fR command:
X.nf
X
X    Command : Pattern               	/ = match anywhere in messages
X    Match pattern: @
X
X.fi
Xwe'll type in \fIdocument\fR (it's case insensitive) and see if the system 
Xcan find it.  After a brief second or two it returns 'pattern not found.'
XHmm...maybe it's not either the from or the subject of
Xany of the messages...In case that's true, let's try using 
Xthe \fImatch anywhere in message\fR command;
X.P 0
XWe again type `/' for \fIpattern matching\fR;
X.nf
X
X    Command : Pattern              		/ = match anywhere in messages
X    Match pattern: @
X
X.fi
XAnd now we'll use `/' again to get the match anywhere in file
Xoption.  Now the bottom of the screen looks like;
X.nf
X
X    Command : Pattern             		/ = match anywhere in messages
X    Match pattern (in entire mailbox): @
X
X.fi
Xto which we respond \fIdocument\fR again.  
X.P 0
XThe mailer then searches through each line of all the messages in 
Xthe file and moves the current message pointer to message 
Xnumber 7.  A quick check reveals that this message indeed
Xcontains the word `document', but it's not the one we want,
Xso we're going to just get outta here!
X.P 0
XWe've had enough mail for today, so lets quit, leaving
Xall the mail in the incoming mailbox, except those few we've
Xmarked for deletion;
X.sp
X.I Quit
Xprompts;
X.sp
X.nf
X   Delete messages? (y/n) @
X.fi
X.sp
Xto which we answer `\fIy\fR' for yes.  The next prompt is then;
X.sp
X.nf
X   Keep mail in incoming mailbox? (y/n) @
X.fi
X.sp
Xto which we also answer yes...the program then quickly saves
Xthe files, removing message 5, 13 and 14 as it goes along, and exits.
X.sp 2
X.P 0
XAs you can see, the program is pretty easy to use!  In fact, it was
Xdesigned to be used without this documentation at all, so you 
Xcould toss this right now (but don't - think of the tree that 
Xsacrificed its precious life to allow this printout!)
X.sp 2
X.H 1 "Non-Interactive Uses of Elm"
X.P 1
XBefore we discuss the \fBElm\fR utilities, it's worth noting that 
Xthere are a couple of other ways to use the main mail
Xsystem, namely to 'send only' and to send files (batchmail).
X.P
XTo send a message to someone without any of the associated 
Xoverhead of the main system being loaded, you can invoke the
Xmailer with the name(s) of the people to send to.  The 
Xmailer will then prompt for Subject, Copies, and then drop
Xyou in your editor (defined in the \fI.elmrc\fR file) to compose
Xthe message.   When composition is complete, the program 
Xverifies transmission then terminates.  For example;
X.nf
X
X  $ \fBelm dave_taylor\fR
X  To: taylor@hplabs.HP.COM
X  Subject: \fBthis is a test\fR
X  Copies To: \fB<return>\fR
X
X  <invokes editor, message composed, then>
X
X  Are you sure you want to send this? (y/n) \fBy\fR
X
X  mail sent.
X
X  $
X
X.fi
XNote that the user input is in \fBbold\fR face, so you can see that
Xthe mailer verified the alias expansion too!
X.sp
X.P
XThe mailer also supports batch type mailing, of files and so on,
Xby using the following command;
X.nf
X
X  $ \fBelm dave_taylor < help.c\fR
X
X.fi
Xwhich will read in the file and transmit it to the specified user.
XA subject may be specified with ``-s \fIsubject\fR'' as an option
Xto the program, as in;
X.nf
X
X  $ \fBelm -s "File help.c, as promised" dave_taylor < help.c\fR
X
X.fi
X.sp 
X.H 1 "The Elm Utilities"
X.sp
X.P
XThe \fBElm\fR mail system is really much more than a single
Xprogram for reading and writing mail.  It's a unified 
Xenvironment for intelligently dealing with electronic
Xcorrespondence.  As a consequence, it contains a number of other
Xprograms to aid in the easy processing of `email', 
Xincluding the following;
X.VL 14 2
X.LI "answer"
XAn answering-machine transcription program.  Please see the
X`man'ual entry for more information on how to use this program.
X.LI "autoreply"
XThis program, in conjunction with the ``arepdaemon'', enables users
Xto automatically reply to incoming mail when they're not directly
Xavailable...
X.LI "checkalias"
XA script for checking aliases simply.
X.LI "messages"
XA script that lists the number of messages in the specified 
Xmailbox.  Suitable for login scripts and such.
X.LI "newalias"
XThis program installs new aliases - please see the 
X\fIElm Alias Users Guide\fR for more information.
X.LI "newmail"
XThis program is designed to be put into `background' and then
Xmonitors your incoming mailbox for new mail.  Whenever you
Xreceive new mail, the program will asynchronously write to the
Xscreen a notification, including whom the new mail is from and 
Xwhat the subjects of the messages are.  The output looks like;
X.DS
X>> New mail from Jimmy Carter - Urgent matters of state
X>> New mail from joe@ucbvax.arpa - Did I hear someone say PARTY??
X.DE
XThis is quite helpful for deciding in `real time' whether it's
Xnecessary to read the mail immediately or not.
X.LI "wnewmail"
XThis is extremely similar to \fInewmail\fR but is 
Xslightly modified to run in a windowing environment.
XThe differences are that it stays in `foreground' (thereby
Xtaking over a window entirely), and outputs for new 
Xmail in a slightly more succint format;
X.DS
XMail from Jimmy Carter -- Urgent matters of state
XMail From joe@ucbvax.arpa -- Did I hear someone say PARTY??
X.DE
X.LI "readmsg"
XThis handy little program can be used in two ways...first off,
Xit can be used to easily read a specific message in the
Xincoming mailbox, specified by ordinal number, by a string that
Xthe message contains, by the metacharacter `$' which 
Xrepresents the last message in the mailbox, or `*' which matches 
Xall the messages in the folder or mailbox.
X.P 0
XFor example;
X.DS
X$ \fBreadmsg 4 5 9 | lpr\fR
X.DE 
Xwould generate a printout, \fIsans\fR superfluous headers, of the fourth,
Xfifth and ninth messages in your mailbox.
X.DS
X$ \fBreadmsg Carter | page\fR
X.DE
Xwould be a fast way to read what `ole Jimmy has to say...
Xand
X.DS
X$ \fBreadmsg -h hear someone say\fR
X.DE
Xwould list, including all the message headers, the message
Xcontaining the string ``hear someone say''.
X.LI "from"
XSimilar to the Berkeley \fIfrom\fR command, this will
Xgive you a ``table of contents'' of either the current
Xmailbox or a mailbox of your choice.   It's useful to
Xsee what mail is pending, or what's in a mailbox.
XIf used with the `-n' option, it will number each message
Xin a way compatible with the arguments \fIreadmsg\fR
Xexpects to get, too!
X.LI "printmail"
XThis is a formatting routine that knows that mailboxes look
Xlike and inserts either formfeeds or dashed lines between
Xmessages.  It can be used in either of two ways - either 
Xa mailbox file can be \fIpiped\fR to it or it can be given
Xa list of mailbox file names to format.  The only option
Xon the program is `-d' which indicates that you want to have
Xa dashed line separating messages rather than a formfeed.
X.P 0
XFor example;
X.DS
X$ \fBprintmail -d | lpr\fR
X.DE
Xwill print out your current incoming mailbox, separating the messages
Xby a dashed line.
X.DS
X$ \fBreadmsg 3 4 10 | printmail | lpr\fR
X.DE
Xwill print messages 3, 4, and 10 from your incoming mailbox,
Xseparated by formfeeds (that is, each message will start on it's
Xown page).
X.P 0
XFinally,
X.DS
X$ \fBprintmail ~/mbox ~/Mail/mail.sent | lpr\fR
X.DE
Xwill print all the messages saved in \fImbox\fR and in your \fImail.sent\fR
Xfiles.  The second file will be started on a new page regardless of
Xthe presence or absence of the `-d' dashed line option.
X.sp
XIt should be noted that \fIprintmail\fR is almost competely superseded by
Xthe \fIreadmsg\fR command.  For example, the second example above could be
Xmore easily and quickly written as;
X.DS
X$ \fBreadmsg -p 3 4 10 | lpr\fR
X.DE
XIt is expected in future releases that this program will not be included.
X.LI "newalias"
XThis is used to install new user/group aliases.  Please see the
X\fIElm Alias Users Guide\fR for further information on this!
X.LI "fastmail"
XSometimes you want to have a batchmailing system that works as
Xquickly as possible, not bothering with aliases or any of the
Xother ``deluxe'' features of \fBElm\fR.  An example of this would
Xbe if you have a large mailing list for a newsletter, say.
XThis command, \fIfastmail\fR, is designed just for that purpose.
XIt avoids the lengthy startup time of \fBElm\fR while still
Xgenerating valid \fIRFC-822\fR\*F mail.
X.FS
XIf you don't know what RFC-822 is, don't worry about it!
X.FE
XPlease see the `man' entry for more information on this
Xcommand (use \fBman fastmail\fR after installation).
X.LI "trim-headers"
XA script to remove extraneous headers from archived (saved)
Xmail in folders.
X.LE
X.sp 3
X.H 1 "Credits and So on"
X.P
XThis mailer has been evolving over the past few years with
Xinvaluable comments on the interface and general mail 
Xissues from the following people;
XWalter Underwood, Larry Fenske, Rob Sartin,
XJohn Dilley (who got the Spectrum version checked out, too!) and Carl Dierschow.
X.sp
XFor the Berkeley implementation, lots of help came from
XJohn Lebovitz and Ken Stone.
X.sp
XFor the Amdahl/UTS implementation, thanks to Scott McGregor and
XStan Isaacs.
X.sp
XFor the Sun problems, Dave England in Lancaster (UK) turned out to be
X``bloody useful'', as he would no doubt say.
X.sp
XThe Pyramid version is due to the work of Steve Malone
Xof the University of Washington.
X.sp
XA number of other people have been amazingly disciplined at reporting 
Xproblems and (usually, much to my relief) indicating the fixes needed,
Xespecially Guy Hillyer, Bruce Townsend and Eric Negaard.
X.sp
XThere have been many, many others, too numerous to mention, that
Xhave inspired me with questions like "Why can't Elm..." or 
X"Why does it ..." or "Can we make it..." too.  A loud round of
Xapplause and an enthusiastic THANK YOU to you all!!
X.sp
XAlso helpful was the ability to have my `own' machine to 
Xclose up the many many iterative loops that this software
Xhas gone through - since being on a big multi-user machine
Xtends to slow it down to a standstill...
XFor that, I thank Hewlett-Packard Colorado Networks Division for their 
Xinitial support, and now HP Laboratories for the wonderful working 
Xenvironment that I have here (more than any one person is safe having, 
Xmost likely!)
X.sp 
XMailers that have influenced the design and implementation of \fBElm\fR, 
Xfor better or worse, include the following;
X.VL 12 1
X.LI "\fI/bin/mail\fR  "
XThe most basic of mailers, this one was simply the example of how \fInot\fR
Xto force the user to interact with a program.
X.LI "\fIBerkeley Mail\fR  "
XA suprisingly sophisticated mailer, especially the version with 4.3 BSD,
X\fIBerkeley Mail\fR still suffers from the tendency to force the user to
Xknow too much about the system, and also lacks a friendly, non-cryptic
Xinterface for the large subset of the population that use Unix but aren't
Xinterested in becoming a ``hacker''.
X.LI "\fIMH\fR  "
XThis is another nifty mailer.  The main difference between this and the
Xother mailers about is that it is a discrete set of programs rather than
Xa single unified interface.  This is quite useful for those people that
Xreceive \fIlots\fR of mail and are willing to spend some time learning
Xthe intricacies of the program.  It's quite powerful, but again, misses some
Xof the basic friendly features the majority of users are interested in.
X.LI "\fIdmail\fR  "
XA sort of mutated cross between \fIMH\fR and \fIBerkeley Mail\fR, it was
Xthis program that convinced me to implement the \fILimit\fR functions.
X.LI "\fINMail\fR  "
X(a part of the HP AI Workstation Software Environment).  This program hints
Xat the power that mailers could be given to help deal with mail in a quick
Xand intelligent fashion.  Most of what it can do, and a lot more, are 
Xtherefore part of \fBElm\fR.  Indubitably.  And quite faster too!
X.LI "\fIPMX/TERM\fR  "
XPart of the AT&T Mail package, a single glance at this interface convinced
Xme that a PC interface, with almost half of the screen taken up by a silly
Xfunction key mapping, is most certainly \fInot\fR the way to do things!!
XOn the other hand, it also shows that the \fIForms\fR mode can be quite
Xnicely integrated into a more sophisticated mailer.
X.LI "\fIfmail\fR  "
XA nickel addition to the \fI/bin/mail\fR program to add some rudimentary
Xscreen interface stuff, this nonetheless interesting mailer is part of 
Xthe AT&T Toolchest.
X.LI "\fILaurel\fR  "
XA program only available within Xerox PARC, this was an interesting
Xearly attempt at a graphics based full-screen mail program.  The one,
Xperhaps trivial, part of the interface I really like was the fact that
Xit would \fIcross out\fR a message that was marked for deletion.  One
Xday when we get real graphics and the ability to use them indicated in
Xa facility (not too) like \fItermcap\fR, perhaps \fBElm\fR will do 
Xthis too! 
X.LI "\fIMailtool\fR  "
XPart of the Sun distribution package, this program is a really nice
Xexample of what can be done by putting a smart shell on top of a dumb
Xprogram - it uses \fI/bin/mail\fR for all the `dirty work'.  Other than
Xthat, it's not a particularly interesting interface or mailer, and it
Xcertainly doesn't add much functionality!
X.LI "\fIFrankenmail\fR  "
XThis program is another \fIBerkeley Mail\fR style of interface, for 
Xthe most part.  This means that it
Xis still just as difficult to use for the 
Xneophyte Unix user.  The interface is more interesting when used on a 
XSun Microsystems machine, but \fIFrankenmail\fR isn't a step forward in 
Xmail technologies or interfaces.
X.LI "\fIMetamail\fR  "
XWhat can I say?  This isn't even a real mailer, but is just what I dream
Xof as an interface to mail in the future.  A program that works sort of
Xlike \fBHAL\fR did in \fI2001: A Space Odyssey\fR - where it interrupts
Xme as appropriate for important mail, and can answer inane and other
Xqueries itself according to what I teach it.  Maybe \fBElm\fR, by some sort
Xof groupmind metamorphosis, will change into that someday.  Maybe not.  Maybe
Xno-one bothers to read this far into the document!!
X.LE
X.sp
XFinally, it's also been a very useful experience overall,
Xconfirming my beliefs that iterative software design and
Xkeeping a close watch on users (not to mention an open
Xmind and mailbox!) improves a product manyfold.  Comments,
Xfeedback and bug reports (and fixes!) are, of course, always welcome!
END_OF_doc/Users.guide
if test 31420 -ne `wc -c <doc/Users.guide`; then
    echo shar: \"doc/Users.guide\" unpacked with wrong size!?
fi
# end of overwriting check
fi
echo shar: End of archive 18 \(of 19\).
cp /dev/null ark18isdone
DONE=true
for I in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 ; do
    if test ! -f ark${I}isdone ; then
	echo shar: You still need to run archive ${I}.
	DONE=false
    fi
done
if test "$DONE" = "true" ; then
	echo You have unpacked all 19 archives.
	echo "See the Instructions file"
	rm -f ark[1-9]isdone ark[1-9][0-9]isdone
fi
##  End of shell archive.
exit 0