new
This commit is contained in:
parent
38c7eb9bd2
commit
f1007ee0c6
7 changed files with 173 additions and 0 deletions
19
bin/upas/unspam
Executable file
19
bin/upas/unspam
Executable file
|
|
@ -0,0 +1,19 @@
|
|||
#!/usr/local/plan9/bin/rc
|
||||
|
||||
rfork en
|
||||
|
||||
if (~ $#* 0)
|
||||
echo usage: unspam mesg && exit 1
|
||||
|
||||
TMP=/tmp/unspam.$USER.$pid
|
||||
{
|
||||
echo '# hash table'
|
||||
msgcat $1|sed '/^$/,$ s/^From / From /'|upas/msgtok|
|
||||
grep -v '^....................(.*) '|
|
||||
sed 's/$/ 1/'
|
||||
} >$TMP.tok
|
||||
|
||||
cd $home/mail
|
||||
upas/addhash -o _prof.mbox _prof.mbox 1 $TMP.tok 1
|
||||
upas/addhash -o _prof.spam _prof.spam 1 $TMP.tok -1
|
||||
rm -f $TMP.*
|
||||
Loading…
Add table
Add a link
Reference in a new issue