spam.rc 400 B

123456789101112131415161718
  1. #!/bin/rc
  2. rfork en
  3. TMP=/tmp/spam.$sysname.$pid
  4. sed '/^$/,$ s/^From / From /' >$TMP.msg
  5. upas/fs -f $TMP.msg
  6. {
  7. echo '# hash table'
  8. upas/msgcat $TMP.msg | upas/msgtok |
  9. grep -v '^....................(.*) '|
  10. sed 's/$/ 1/'
  11. } >$TMP.tok
  12. cd /mail/box/$user
  13. #cp $TMP.tok /tmp/_prof.spam
  14. upas/addhash -o _prof.mbox _prof.mbox 1 $TMP.tok -1
  15. upas/addhash -o _prof.spam _prof.spam 1 $TMP.tok 1
  16. rm -f $TMP.*