Nice! It should be said that this script contains a restart function that
ONLY works with SA 2.60 and up! :) 

--Chris

> -----Original Message-----
> From: Smart,Dan [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 05, 2003 4:21 PM
> To: [EMAIL PROTECTED]
> Subject: RE: [SAtalk] bigevil.cf + rsync?
> 
> 
> Thanks for the script Gary/Peter.  I've cleaned things up and 
> here is what I
> put together:
> 
> 
> #!/bin/sh
> ## This file updates the big evil policy file for spam assassin
> DATE=`date +"%Y%m%d-%H%M"`
> 
> [ -f /tmp/bigevil.cf ] && rm -f /tmp/bigevil.cf
> wget -N http://www.merchantsoverseas.com/wwwroot/gorilla/bigevil.cf \
>      -O /tmp/bigevil.cf \
>      2>&1 | grep -q 'saved'
> if [ $? = 0 ] ; then
>    cmp -s /tmp/bigevil.cf /etc/mail/spamassassin/bigevil.cf || {
>      # do the mv's and emails here
>      [ -f /etc/mail/spamassassin/bigevil.cf ] && mv -f
> /etc/mail/spamassassin/bigevil.cf 
> /etc/mail/spamassassin/bigevil.cf.$DATE
>      [ -f /tmp/bigevil.cf ] && mv -f /tmp/bigevil.cf
> /etc/mail/spamassassin/bigevil.cf
>      echo "BIG EVIL has changed on `hostname`.  The new evil is \
>         `head -n 1 /etc/mail/spamassassin/bigevil.cf`" \
>         | mutt [EMAIL PROTECTED] -s "The big evil policy has 
> been updated"
> \
>         -a /etc/mail/spamassassin/bigevil.cf
>      postfix stop > /dev/null 2>&1 /dev/null
>      sleep 15
>      /etc/rc.d/init.d/spamassassin restart > /dev/null 2>&1 /dev/null
>      postfix start > /dev/null 2>&1 /dev/null
>    }
> Fi
> ## EOF
> 
> <<Dan>>
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign 
> up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell 
> to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Spamassassin-talk mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/spamassassin-talk
> 


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to