#! /bin/sh

MBOX=/var/tmp/mbox
TMP=$(mktemp)
spamc -t 60 < $MBOX > $TMP
if diff $TMP $MBOX > /dev/null; then
  /etc/init.d/spamassassin restart
  echo "Spam Assassin a été relancé." | mail roots@crans.org -s "Spam Assassin"
fi

rm -f $TMP
