# announce
echo "$(date +'%d-%m-%Y %T'): Fetching new SA rules..."
-# update SA from normal SA updates + SARE channels
+# update SA
if [ -e /etc/spamassassin/sa-update.channels ]; then
sa-update \
--channelfile /etc/spamassassin/sa-update.channels \
- --gpgkey 856AA88A \
- --gpgkey 24F434CE \
- --gpgkey BDE9DC10 || \
+ --allowplugins \
+ --gpghomedir /etc/spamassassin/sa-update-keys || \
( echo "$(date +'%d-%m-%Y %T'): No new rules. Exiting now."; exit )
fi
# restart of services
echo "$(date +'%d-%m-%Y %T'): Will restart services due to updated rules..."
-if [ -x /usr/sbin/invoke-rc.d ]; then
- [ -x /etc/init.d/spamassassin ] && \
- invoke-rc.d --quiet spamassassin restart
- [ -x /etc/init.d/amavis ] && \
- invoke-rc.d --quiet amavis restart
- [ -x /etc/init.d/postfix ] && \
- invoke-rc.d --quiet postfix restart
-else
- [ -x /etc/init.d/spamassassin ] && \
- /etc/init.d/spamassassin restart
- [ -x /etc/init.d/amavis ] && \
- /etc/init.d/amavis restart
- [ -x /etc/init.d/postfix ] && \
- /etc/init.d/postfix restart
+
+if [ -x /etc/init.d/spamassassin ]; then
+ service spamassassin restart
+fi
+
+if [ -x /etc/init.d/amavis ]; then
+ service amavis restart
+fi
+
+if [ -x /etc/init.d/postfix ]; then
+ service postfix restart
fi