#!/bin/sh

folder +inbox
mark -add -zero -sequence spam
pushd ~/Mail/inbox

# combined probability Mail/inbox/1245 1 0.000000
~/bin/bsfilter [0-9] [0-9][0-9] [0-9][0-9][0-9] [0-9][0-9][0-9][0-9] [0-9][0-9][0-9][0-9][0-9] | while read dummy1 dummy2 file nospam spam ;
do
   rate=`echo $spam | sed 's/\\.//;'`;
   if [ "$rate" -gt 90000 ] ; then
     mark -sequence spam -add $file
     echo add:$file
  else
     echo not spam:$file
  fi
done
popd
scan spam
