#!/bin/sh -u # # We handle the output, from the telnet and e-mail clients, that is to # be mailed to the user. # prog=`basename $0` REPLY_ADDR='archie-group@bunyip.com' usage() { cat - <&2 failure } failure () { echo "${prog}: cleaning up and exiting." 1>&2 rm -f $info $mhead $data $part.* exit 1 } # ----------------- Configure ---------------------- # # The path must include: # # - your mailer ($mailcmd) (e.g. /usr/lib/sendmail) # - cat # - echo # - wc # - grep # - rm PATH=/usr/bin:/usr/ucb:/usr/lib:bin tmp=/tmp # Must use quotes mailcmd="sendmail -t -f$REPLY_ADDR" # --------------- End Configure -------------------- umask 077 trap do_trap 1 2 3 15 if [ -r $2 ] ; then cat $2| $mailcmd $1 fi exit 0