字体:  

Auto-updating SpamAssassin Rules

ELM 发表于: 2007-9-08 17:57 来源: 榆树社区

Download rules_du_jour and install the rules_du_jour script
# cd /opt/insight/sbin
# wget http://sandgnat.com/rdj/rules_du_jour
# chmod 755 rules_du_jour

Create the file /opt/insight/etc/rulesdujour

TRUSTED_RULESETS="TRIPWIRE EVILNUMBERS SARE_RANDOM SARE_CODING SARE_HEADER SARE_ADULT SARE_FRAUD";


Configure rules_du_jour by making the following changes to the /opt/insight/sbin/rules_du_jour script:

Find the RDJ_CONFIGFILE definition and add /opt/insight/etc/rulesdujour to the list of configuration files the script reads, Like so:

for i in ${RDJ_CONFIGFILE} /opt/insight/etc/rulesdujour /etc/rulesdujour/config etc...

Find the SA_DIR definition and configure it as follows

CODE:

[ "${SA_DIR}" ] || SA_DIR="/opt/insight/etc/mail/spamassassin"; # Change this to your SA local configFind the SA_LINT and SA_RESTART definition and configure them as follows

CODE:

[ "${SA_LINT}" ] || SA_LINT="/opt/insight/bin/spamassassin --lint"; # Command used to lint the rules
[ "${SA_RESTART}" ] || \
SA_RESTART="/opt/insight/etc/rc/amavisd restart"; # Command used to restart spamd
NOTE: If your network requires the use of a web proxy, you also need to modify the CURL_OPTS lines specifying your proxy server address using the -x parameter as follows:

CODE:

[ "${CURL_OPTS}" ] || CURL_OPTS="-w %{http_code} --compressed -O -R -s
-S -x 192.168.0.253:8080 -z"; # Parameters of the curl program
Run /opt/insight/sbin/rules_du_jour to update your SpamAssassin Rules. If you wish to ensure your SpamAssassin rules are kept updated create a cronjob to run rules_du_jour at a scheduled interval.

From: http://www.bynari.net/esupport/i ... ;kbarticleid=200030