Bayes daily cron job

Glenn Steen glenn.steen at gmail.com
Fri Nov 10 08:37:53 GMT 2006


On 10/11/06, Integrated Technologies <develop at in-tech.us> wrote:
>
>
>
>
> I am running the following:
>
>
>
> CentOS 4.4
>
> MailScanner 4.56.8-1
>
> Spamassassin 3.0.6-1.el4
>
>
>
> I currently have the parameter, "Rebuild Bayes Every = 0" set in my
> MailScanner.conf file and would like to set up a daily cron job to expire
> these old Bayes tokens.
>
> I downloaded and printed the MailScanner Administrators Guide, Version
> 1.0.5. On page 64, it gives an example script for this exact requirement:
>
>
>
> #! /bin/bash
>
> # re-builds the Bayes database daily
>
>    /usr/bin/sa-learn --sync --force-expire \
>
>   -p /etc/MailScanner/spam.assassin.prefs.conf
>
You have whitespace or something like that _after_ the backslash. Don't.

Since quite a few versions back MailScanner should have a link from
/etc/mail/spamassassin/mailscanner.cf pointing at your
spam.assassin.prefs.conf, so you likely don't need specify it
separately. Change the script to
#! /bin/bash
# re-builds the Bayes database daily
/usr/bin/sa-learn --sync --force-expire
# End of script

-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list