Plan 9 from Bell Labs’s /usr/web/sources/plan9/mail/lib/unspam.rc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/bin/rc

rfork en
TMP=/tmp/spam.$sysname.$pid
sed '/^$/,$ s/^From / From /' >$TMP.msg
upas/fs -f $TMP.msg
{
	echo '# hash table'
upas/msgcat $TMP.msg | upas/msgtok |
	grep -v '^....................(.*)	'|
		sed 's/$/	1/'
} >$TMP.tok
cd /mail/box/$user
#cp $TMP.tok /tmp/_prof.mbox
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.*


Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].