home *** CD-ROM | disk | FTP | other *** search
/ Unix System Administration Handbook 1997 October / usah_oct97.iso / news / nn.tar / nn-6.5.1 / contrib / nn-use-mh < prev    next >
Text File  |  1995-04-29  |  835b  |  35 lines

  1. The original idea of using MH (namely, comp) to send mail from nn
  2. came from Jaap Vermeulen, but he wouldn't recognize what I did to
  3. it.  I also used a suggestion from John Romine and Tom McCain.
  4.  
  5. Add
  6.  
  7.     set mail-script nn-use-mh
  8.  
  9. to your init file, where nn-use-mh is the following:
  10.  
  11. #!/bin/sh
  12.  
  13. # Obtain value of $WORK and $RECORD
  14. . ${HOME}/.nn/.param
  15.  
  16. # Append Fcc: +folder to headers.  The folder is specified in
  17. # mail-record.
  18. if [ "$RECORD" != "" ]; then
  19.     awk '
  20.     {
  21.         if ($0 == "" && !done) {
  22.             print "Fcc: +'$RECORD'";
  23.             done = 1;
  24.         }
  25.         print;
  26.     }' $WORK > /tmp/aux.$$ && mv /tmp/aux.$$ $WORK
  27. fi
  28.  
  29. # Compose and send the mail
  30. comp -form $WORK
  31.  
  32. In addition, you can contact Ray Davis <rdavis@convex.com> for some
  33. scripts that sort of turn nn into a MH front end by providing macros
  34. to save, delete and refile articles in MH folders.
  35.