2 # Dinko Korunic <kreator@carnet.hr>
4 exec 1>> /var/log/sa-update.log
8 echo "$(date +'%d-%m-%Y %T'): Fetching new SA rules..."
11 if [ -e /etc/spamassassin/sa-update.channels ]; then
13 --channelfile /etc/spamassassin/sa-update.channels \
15 --gpghomedir /etc/spamassassin/sa-update-keys || \
16 ( echo "$(date +'%d-%m-%Y %T'): No new rules. Exiting now."; exit )
20 echo "$(date +'%d-%m-%Y %T'): Will restart services due to updated rules..."
22 if [ -x /etc/init.d/spamassassin ]; then
23 service spamassassin restart
26 if [ -x /etc/init.d/amavis ]; then
27 service amavis restart
30 if [ -x /etc/init.d/postfix ]; then
31 service postfix restart