spamassassin/sa-update.cronscript
Warren Togami c40bdd3b5a - Enable SOUGHT ruleset in nightly sa-update
http://wiki.apache.org/spamassassin/SoughtRules You must enable the
    sa-update cron job manually in /etc/cron.d/sa-update
- Custom channels may be specified in these config files:
    /etc/mail/spamassassin/sa-update-channels.txt
    /etc/mail/spamassassin/sa-update-keys.txt
2009-09-25 04:15:56 +00:00

23 lines
895 B
Bash

#!/bin/bash
# *** DO NOT MODIFY THIS FILE ***
# Edit /etc/cron.d/sa-update to enable nightly automatic updates
# /etc/mail/spamassassin/sa-update-channels.txt
# Specify custom channels here
# /etc/mail/spamassassin/sa-update-keys.txt
# Specify trusted GPG keys for custom channels here
# Sleep random amount of time before proceeding to avoid overwhelming the servers
sleep $(expr $RANDOM % 7200)
# sa-update must create keyring
if [ ! -d /etc/mail/spamassassin/sa-update-keys ]; then
sa-update
fi
# Import SOUGHT key
sa-update --import /usr/share/spamassassin/sought-pubkey.txt
# Update rules with sa-update, restart spamd if rules were updated
/usr/bin/sa-update --channelfile /etc/mail/spamassassin/sa-update-channels.txt \
--gpgkeyfile /etc/mail/spamassassin/sa-update-keys.txt && \
/etc/init.d/spamassassin condrestart > /dev/null