home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / mail / mh / 1270 < prev    next >
Encoding:
Text File  |  1992-11-09  |  2.7 KB  |  80 lines

  1. Newsgroups: comp.mail.mh
  2. Path: sparky!uunet!munnari.oz.au!uniwa!bilby.cs.uwa.oz.au!dunnart!janet
  3. From: janet@cs.uwa.oz.au (Janet Jackson)
  4. Subject: Re: Incorporating new mail into different folders?
  5. Message-ID: <janet.721370289@dunnart>
  6. Sender: usenet@bilby.cs.uwa.edu.au
  7. Nntp-Posting-Host: dunnart
  8. Organization: Dept. Computer Science, University of Western Australia.
  9. References: <BxAqrv.603@shakti.ncst.ernet.in>
  10. Date: Tue, 10 Nov 1992 04:38:09 GMT
  11. Lines: 67
  12.  
  13. In <BxAqrv.603@shakti.ncst.ernet.in> shobhana@shakti.ncst.ernet.in (Shobhana) writes:
  14.  
  15. > is there any way to
  16. > incorporate different messages in my maildrop into different folders.
  17.  
  18. I do it using MH's pick(1) command.
  19.  
  20. I don't use inbox at all.  I have a folder In-<kind> for each kind of mail,
  21. and In-misc for the leftovers.  (You could use inbox instead of In-misc,
  22. but using In-misc keeps all the In- folders together on my xmh display.)
  23.  
  24. I have a replacement inc script.  It calls MH's inc(1) to incorporate mail
  25. into In-misc, then refile(1) it into the other In- folders.
  26. It then tells me how many messages are in each In- folder.
  27.  
  28. By calling it "inc" and putting it before MH's inc in your path, you can
  29. get xmh to use it instead of MH's inc.
  30.  
  31. Here's a shar (I've taken out most "refile" lines, leaving two examples).
  32.  
  33. Janet Jackson
  34. <janet@cs.uwa.edu.au>
  35. Department of Computer Science
  36. The University of Western Australia
  37.  
  38. --->cut here<---
  39. #! /bin/sh
  40. # This is a shell archive, meaning:
  41. # 1. Remove everything above the #! /bin/sh line.
  42. # 2. Save the resulting text in a file.
  43. # 3. Execute the file with /bin/sh (not csh) to create the files:
  44. #    inc
  45. # This archive created: Tue Nov 10 12:43:37 1992
  46. export PATH; PATH=/bin:$PATH
  47. echo shar: extracting "'inc'" '(648 characters)'
  48. if test -f 'inc'
  49. then
  50.     echo shar: will not over-write existing file "'inc'"
  51. else
  52. sed 's/^X//' << \SHAR_EOF > 'inc'
  53. X#!/bin/sh
  54. X#
  55. X# inc - Janet's personal inc to replace mh's standard inc
  56. X#
  57. X# Janet Jackson 1992-1-22
  58. X#
  59. X# This splits mail into various "In-" folders so I can look at each sort of
  60. X# mail in one go
  61. X
  62. XPATH=/usr/local/mh:/usr/bin:/bin:/usr/ucb:/usr/local/bin
  63. Xexport PATH
  64. X
  65. Xif inc +In-misc -silent; then        # if there was any new mail
  66. X    folder +In-misc >/dev/null 2>&1    # make sure we're in right folder
  67. X    refile +In-isoc `pick -to isoc-dist -o -cc isoc-dist -o -to isoc-interest -o -cc isoc-interest 2>/dev/null` >/dev/null 2>&1
  68. X    refile +In-softmanagers `pick -to soft-managers -o -cc soft-managers 2>/dev/null` >/dev/null 2>&1
  69. X    folders | egrep '^[     ]*In'
  70. Xfi
  71. SHAR_EOF
  72. if test 648 -ne "`wc -c < 'inc'`"
  73. then
  74.     echo shar: error transmitting "'inc'" '(should have been 648 characters)'
  75. fi
  76. chmod +x 'inc'
  77. fi # end of overwriting check
  78. #    End of shell archive
  79. exit 0
  80.