home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / windows / openloo / 4469 < prev    next >
Encoding:
Text File  |  1992-11-12  |  1.8 KB  |  70 lines

  1. Newsgroups: comp.windows.open-look
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!malgudi.oar.net!chemabs!lwv26
  3. From: lwv26@cas.org (Larry W. Virden)
  4. Subject: Re: MailTool3 and .signature files
  5. Message-ID: <1992Nov12.130627.4118@cas.org>
  6. Followup-To: comp.windows.open-look
  7. Sender: usenet@cas.org
  8. Reply-To: lvirden@cas.org (Larry W. Virden)
  9. Organization: Nedriv Software and Shoe Shiners, Uninc.
  10. References: <BxGqMH.2DA@brunel.ac.uk> <BxIKz2.JsF@ccu.umanitoba.ca> <1992Nov11.210739.21362@sq.sq.com>
  11. Date: Thu, 12 Nov 1992 13:04:37 GMT
  12. Lines: 56
  13.  
  14. Sorry, but there is one faster way to add .signatures which we have discussed
  15. here many times.
  16.  
  17. 1. Copy /bin/fmt_mail to $HOME/bin/my_fmt_mail.
  18. 2. Modify the code similar to that attached beload
  19. 3. Edit $HOME/.mailrc to add the following line at the top:
  20. set sendmail=/u99b/lwv26/bin/my_fmt_mail
  21. 4. Quit mailtool and start it again.
  22.  
  23. Code:
  24.  
  25. #! /bin/sh
  26. #
  27. # @(#)fmt_mail 1.5 89/03/17 SMI
  28. # modified to add signatures - Bruce Barnett
  29. #
  30.  
  31. if    [ ! -d /home/lwv26 ] ; then
  32.     cat - | /usr/lib/sendmail "$@"
  33.     exit 0
  34. fi
  35.  
  36. JUSTIFY="/usr/ucb/fmt -s -72"
  37. JUSTIFY="/home/lwv26/bin/wrap.pl -wrap"
  38. echo "$@" | fgrep -s -e '@'
  39. if    [ $? = 0 ] ; then
  40.     echo > /tmp/s$$
  41.     echo "-- " >> /tmp/s$$
  42.     sig="$HOME/.signature /tmp/s$$"
  43.     sig="/tmp/s$$ $HOME/.signature"
  44. else
  45.     sig=""
  46. fi
  47. # echo "$@" x"$sig"x >> /tmp/mfm.log 
  48. (IFS_save=$IFS
  49. #solves problem of read line discarding leading blanks which are necessary
  50. #for correct interpretation of continuation lines in mail headers
  51. IFS=
  52. while read line
  53. do
  54.         echo "$line"
  55.         case $line in
  56.         "") break ;;
  57.         esac
  58. done
  59. IFS=$IFS_save
  60. $JUSTIFY ) | cat - $sig | /usr/lib/sendmail "$@"
  61.  
  62. if    [ -n "$sig" ] ; then
  63. rm -f /tmp/s$$
  64. fi
  65. exit 0
  66. -- 
  67. Larry W. Virden                 UUCP: osu-cis!chemabs!lvirden
  68. Same Mbox: BITNET: lvirden@cas  INET: lvirden@cas.org
  69. Personal: 674 Falls Place,   Reynoldsburg, OH 43068-1614
  70.