#!/usr/local/usr/local/bin/bash # JKF This is part of MailScanner. # Call sa-update and sa-compile if you have them both. # If you want to add arguments (such as channel file settings) to sa-update # then do it by editing /etc/sysconfig/MailScanner, *NOT* by editing this # script. SAUPDATE=/usr/local/bin/sa-update SACOMPILE=/usr/local/bin/sa-compile SAUPDATEARGS="" if [ -f /etc/sysconfig/MailScanner ] ; then . /etc/sysconfig/MailScanner fi export SAUPDATE export SACOMPILE export SAUPDATEARGS LOGFILE=/tmp/update_spamassassin.$(date +%m%d) # Update SpamAssassin rules [ -x $SAUPDATE ] || exit 0 $SAUPDATE $SAUPDATEARGS >$LOGFILE 2>&1 # If we have sa-compile and they are using the Rule2XSBody plugin then compile if test -x $SACOMPILE && grep -q '^loadplugin.*Rule2XSBody' /usr/local/usr/local/etc/mail/spamassassin/*pre 2>/dev/null ; then $SACOMPILE >>$LOGFILE 2>&1 fi /usr/local/etc/rc.d/mailscanner reload >>$LOGFILE 2>&1 rm -f $LOGFILE exit 0