home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / mail / elm / 3183 < prev    next >
Encoding:
Text File  |  1992-11-06  |  2.8 KB  |  74 lines

  1. Newsgroups: comp.mail.elm
  2. Path: sparky!uunet!ukma!darwin.sura.net!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
  3. From: dattier@ddsw1.mcs.com (DWT)
  4. Subject: Re: HELP: Elm filter not working
  5. Message-ID: <Bx9BC7.8Ap@ddsw1.mcs.com>
  6. Date: Thu, 5 Nov 1992 18:57:43 GMT
  7. References: <18390001@hpkslx.mayfield.HP.COM>
  8. Organization: Contributor Account at ddsw1, Chicago, Illinois  60657
  9. Lines: 63
  10.  
  11. lou@hpkslx.mayfield.HP.COM (Lou Kvitek) wrote in
  12. <18390001@hpkslx.mayfield.HP.COM>:
  13.  
  14. | I am trying to use filter to forward a message based on the subject.
  15. | I want to forward it to myself as well as other people, but I must
  16. | change the subject before forwarding in order to prevent filter 
  17. | from looping on the message. 
  18. | Please help with my Elm filter problem:
  19. | # $HOME/.elm/filter-rules
  20. | if (subject = "On This Day") then
  21. |     execute "mailx -s 'Fwd: On This Day' kvitekl"
  22. | filter -r
  23. | filter (kvitekl): Error reading line 8 of rules - field "_kvitekl"" unknown!
  24. | filter (kvitekl): Couldn't get rules!
  25. | Filter can't handle the quote conflicts apparently.
  26.  
  27. You'll still get a loop because the subject search string is included in the
  28. new subject.  filter doesn't go buy regexps and there is no way to anchor a
  29. search string.  I don't know about the quote problem, though.
  30.  
  31. | I also tried:
  32. | # $HOME/.elm/filter-rules
  33. | if (subject = "On This Day") then
  34. |     execute otd.fwd
  35. |     
  36. | # otd.fwd
  37. | | mailx -s 'Fwd: On This Day' kvitekl
  38. | This did not work either, filter does not seem to pass the message
  39. | through as stdin (as documented).
  40.  
  41. It would have solved your quote troubles, but there should be no pipe symbol
  42. there in the script.  It's a shell script, not a .forward file.
  43.  
  44. Moreover, filter daemons do not know the path variable set in your .profile
  45. or .login when you are actually on the system yourself.  They have a bare
  46. minimum default $PATH like /bin/:/usr/bin.  You may need to specify the
  47. entire path to otd.fwd in the execute instruction, or the filter daemon will
  48. never find it and will silently lose the letter.
  49.  
  50. Note that the one and only example of execute in the Filter Guide called
  51. a common utility and left the question of the filter daemons' $PATH
  52. unaddressed.
  53.  
  54. The current versions of filter (2.4 at all patchlevels) support a "forwardc"
  55. instruction that keeps a copy of mail that you forward.  Use it and take your
  56. own name off the mailing list, or change the new subject to something that
  57. doesn't include the search string for that rule.  Alternatively, change the
  58. rule to
  59.  
  60. if subject = "On This Day" and not subject = Fwd then
  61.    execute /full/path/to/otd.fwd
  62.  
  63. And otd.fwd must have execute permission either for world or for you as
  64. its owner.
  65.  
  66. David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
  67. dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
  68.