On Sun, 2008-11-23 at 15:46 -0800, bernier wrote: > hi > i am not very technical so please help > > i have a debian server with spammassassin 3.000003. i guess this has never > been updated > > do i just use the cmd > Use cron to do a periodic update. Here's my set-up:
I put a file called sa_update in /etc/cron.weekly. =============== sa_update =================== #!/bin/bash # # Update the Spamassassin rules # sau=/usr/bin/sa-update if [ -x $chkd ] then $sau err=$? case $err in 0) echo "Spamassassin rules update completed."; service spamassassin restart; echo "Spamassassin restarted." ;; 1) echo "No Spamassassin rule updates available.";; 2) echo "Spamassassin rules updates available"; echo "Site pre files lint check failed."; echo "Fix the files and try again.";; *) echo "Spamassassin rules update failed: error=$err" esac else echo "Error: $sau does not exist" exit 0 fi ============================================= This runs once a week, which is often enough since a rules update only appears every few weeks. As you can see, if the rules were updated it restarts the spamassassin service (which runs spamd) with the 'service' command. Otherwise it just reports what happened. In any case, the report is mailed to root. Martin