#!/bin/sh # 2006-11-26 # update spamassassin's rules and generate some output for mailing a notification # # 2007-10-19 + improved return code handling # + added channel saupdates.openprotect.com (recommended class-0 rules in the SARE) # # 2012-04-28 + removed channel saupdates.openprotect.com (as SARE isn't updated anymore) # sa-update --gpgkey D1C035168C1EBC08464946DA258CDB3ABDE9DC10 --channel updates.spamassassin.org RET=$? case $RET in 0) # update available & downloaded correctly echo "SpamAssassin rules updated. Reloading..." /etc/init.d/spamd reload ;; 1) # no fresh updates were available ;; 2) # at least one update is available but lint check of the site pre files failed echo "SpamAssassin rule update available, but lint check failed on .pre files!" ;; *) echo "Error [$RET] occured during update." ;; esac exit $RET