tspam - plan9port - [fork] Plan 9 from user space
HTML git clone git://src.adamsgaard.dk/plan9port
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
tspam (386B)
---
1 #!/usr/local/plan9/bin/rc
2
3 rfork en
4
5 if (~ $#* 0)
6 echo usage: spam mesg && exit 1
7
8 TMP=/tmp/spam.$USER.$pid
9 {
10 echo '# hash table'
11 msgcat $1|sed '/^$/,$ s/^From / From /'|upas/msgtok|
12 grep -v '^....................(.*) '|
13 sed 's/$/ 1/'
14 } >$TMP.tok
15
16 cd $home/mail
17 upas/addhash -o _prof.mbox _prof.mbox 1 $TMP.tok -1
18 upas/addhash -o _prof.spam _prof.spam 1 $TMP.tok 1
19 rm -f $TMP.*