home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.windows.open-look
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!chemabs!lwv26
- From: lwv26@cas.org (Larry W. Virden)
- Subject: Re: MailTool3 and .signature files
- Message-ID: <1992Nov12.130627.4118@cas.org>
- Followup-To: comp.windows.open-look
- Sender: usenet@cas.org
- Reply-To: lvirden@cas.org (Larry W. Virden)
- Organization: Nedriv Software and Shoe Shiners, Uninc.
- References: <BxGqMH.2DA@brunel.ac.uk> <BxIKz2.JsF@ccu.umanitoba.ca> <1992Nov11.210739.21362@sq.sq.com>
- Date: Thu, 12 Nov 1992 13:04:37 GMT
- Lines: 56
-
- Sorry, but there is one faster way to add .signatures which we have discussed
- here many times.
-
- 1. Copy /bin/fmt_mail to $HOME/bin/my_fmt_mail.
- 2. Modify the code similar to that attached beload
- 3. Edit $HOME/.mailrc to add the following line at the top:
- set sendmail=/u99b/lwv26/bin/my_fmt_mail
- 4. Quit mailtool and start it again.
-
- Code:
-
- #! /bin/sh
- #
- # @(#)fmt_mail 1.5 89/03/17 SMI
- # modified to add signatures - Bruce Barnett
- #
-
- if [ ! -d /home/lwv26 ] ; then
- cat - | /usr/lib/sendmail "$@"
- exit 0
- fi
-
- JUSTIFY="/usr/ucb/fmt -s -72"
- JUSTIFY="/home/lwv26/bin/wrap.pl -wrap"
- echo "$@" | fgrep -s -e '@'
- if [ $? = 0 ] ; then
- echo > /tmp/s$$
- echo "-- " >> /tmp/s$$
- sig="$HOME/.signature /tmp/s$$"
- sig="/tmp/s$$ $HOME/.signature"
- else
- sig=""
- fi
- # echo "$@" x"$sig"x >> /tmp/mfm.log
- (IFS_save=$IFS
- #solves problem of read line discarding leading blanks which are necessary
- #for correct interpretation of continuation lines in mail headers
- IFS=
- while read line
- do
- echo "$line"
- case $line in
- "") break ;;
- esac
- done
- IFS=$IFS_save
- $JUSTIFY ) | cat - $sig | /usr/lib/sendmail "$@"
-
- if [ -n "$sig" ] ; then
- rm -f /tmp/s$$
- fi
- exit 0
- --
- Larry W. Virden UUCP: osu-cis!chemabs!lvirden
- Same Mbox: BITNET: lvirden@cas INET: lvirden@cas.org
- Personal: 674 Falls Place, Reynoldsburg, OH 43068-1614
-