#!/bin/bash

LEFT=`/usr/bin/dspam_stats -H | /bin/grep TL | /bin/awk -F " " '{print $4}'`
ACTION=`/sbin/e-smith/config getprop dspam action`

if [ $LEFT -eq 0 ] && [ $ACTION == "train" ]; then
echo "DSPAM Training complete - switching to tagging mode.."
/sbin/e-smith/config setprop dspam action tag
/sbin/e-smith/signal-event email-update
fi

