#!/bin/sh # Once a night, report on the filtered spam and save it away, # and reclassify the day's spam that got through the filter. PATH=$HOME/bin:$PATH; export PATH umask 002 cd $HOME/misc || exit 1 #grep '^From ' caughtspam | egrep -v MAILER-DAEMON | nl -w2 -s: #grep '^From ' caughtspam | nl -w2 -s: checkspam caughtspam dir=old/caughtspam test -d $dir || mkdir $dir date=`date +%Y%m%d` target=$dir/$date mv caughtspam $target bzip2 $target chmod 444 $target.bz2 touch caughtspam chmod 644 caughtspam cd $HOME/mail || exit 1 if test -s spam; then kspam --SPAM