Plan 9 from Bell Labs’s /usr/web/sources/contrib/anothy/bin/rc/update.spam

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


#!/bin/rc

rfork en

isnotspam=/mail/box/$user/unspam
isspam=/mail/box/$user/mkspam

upas/fs -n
echo -n 'open '$isspam' isspam' > /mail/fs/ctl
echo -n 'open '$isnotspam' isnotspam' > /mail/fs/ctl

cd /mail/fs/isspam

for (msg in *) @{
	cd $msg
	cat unixheader raw | upas/spam
	cd ..
	rm $msg
}

cd /mail/fs/isnotspam

for (msg in *) @{
	cd $msg
	cat unixheader raw | upas/unspam
	cd ..
	rm $msg
}

unmount /mail/fs

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].