1
0

gone.fishing 533 B

12345678910111213141516171819
  1. #!/bin/rc
  2. # gone.fishing local!$user /mail/box/$user/mbox - vacation responder
  3. # as pipeto script
  4. # standard library. saves the message on standard input in $TMP.msg and
  5. # parses it into /mail/fs/mbox/1.
  6. . /mail/lib/pipeto.lib $*
  7. {cat $TMP.msg; echo} >>/mail/box/$USER/gone.mail
  8. message=/mail/box/$USER/gone.msg
  9. if (! test -e $message)
  10. message=/mail/lib/gone.msg
  11. MAILTO=`{cat $D/replyto}
  12. grep '^'$"MAILTO'$' /mail/box/$USER/gone.addrs >/dev/null >[2=1] || {
  13. echo $MAILTO >>/mail/box/$USER/gone.addrs
  14. mail $MAILTO <$message
  15. }