home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9432 < prev    next >
Encoding:
Text File  |  1992-07-25  |  2.5 KB  |  57 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!dattier
  3. From: dattier@ddsw1.mcs.com (David W. Tamkin)
  4. Subject: Re: .forward
  5. Message-ID: <1992Jul26.023700.7813@ddsw1.mcs.com>
  6. Organization: Contributor Account at ddsw1, Chicago, Illinois  60657
  7. References: <y9fm+cq.rons@netcom.com> <MJN.92Jul25040836@pseudo.uucp> <1992Jul25.152416.21141@news.eng.convex.com>
  8. Date: Sun, 26 Jul 1992 02:37:00 GMT
  9. X-Disclaimer:  Material posted in this article is the sole responsibility of
  10.                 the poster and does not represent MCSNet or the system owners.
  11. Lines: 44
  12.  
  13. tchrist@convex.COM (Tom Christiansen) wrote in
  14. <1992Jul25.152416.21141@news.eng.convex.com>:
  15.  
  16. TC> From the keyboard of mjn@pseudo.uucp (Murray Nesbitt):
  17.  
  18. MN> rons@netcom.com (Ron Sires) writes:
  19.  
  20. RS> When the .forward file is executed, there isn't a PATH variable defined.
  21. RS> This means that UNIX doesn't know where to look for the "cat" command. 
  22. RS> Try including the full path to cat and, while you're at it, the full path
  23. RS> to tmp, too.
  24.  
  25. One cannot be sure of what the daemon's PATH is nor of its cwd (well, I found
  26. out by having .forward echo $PATH and `pwd` to a file).
  27.  
  28. MN> Unless a .forward file does something *drastically* different from
  29. MN> when I last used one, it simply forwards mail to the account[s]
  30. MN> specified in the file.  Thus an appropriate entry might be:
  31.  
  32. MN>     me@someother.machine
  33.  
  34. TC> A .forward file can be used to direct things into a pipe on many systems.
  35. TC> You just have to remember that you won't have any decent environment 
  36. TC> set up for you, like cwd or envariables.
  37.  
  38. You can set an environment up for yourself.  This my .forward under Dell SVR4
  39. here on ddsw1, and I have one under the System V version running on gagme
  40. that is identical except for the name of my $HOME and except for the PATH,
  41. because there are some differences between the two sites in the names of
  42. directories that hold the executables:
  43.  
  44. "| ( HOME=/user/contrib/dattier TZ=CST6CDT
  45. PATH=/usr/bin:/etc:/usr/ucb:/lbin:/sbin:/usr/sbin:$HOME/scripts:/bin
  46. export HOME TZ PATH
  47. filter -vo $HOME/.elm/filtererrors
  48. date +%T >> $HOME/.elm/filterlog )"
  49.  
  50. I could even have thrown a cd in there if I wanted it.  Note that defining
  51. a PATH absolves me from giving the full paths to filter and date.  It also
  52. relieves me of specifying full paths to the commands in 'execute' instruc-
  53. tions in .elm/filter-rules.
  54.  
  55. David W. Tamkin   Box 59297   Northtown Station, Illinois  60659-0297
  56. dattier@ddsw1.mcs.com    CompuServe: 73720,1570    MCI Mail: 426-1818
  57.