[Mimedefang] bayes_path error

Fox, Randy Randy_Fox at csgsystems.com
Mon Jul 21 13:20:08 EDT 2003

-----Original Message-----
From: alan premselaar [mailto:alien at 12inch.com]
Sent: Thursday, July 17, 2003 5:33 PM

>(who i'm running mimedefang as) with the following entry:
>* */4 * * * /usr/sbin/sa-learn --rebuild >& /dev/null
>(this assumes that whatever flavor of unix/linux you're running that it'll
>support the */4 syntax in cron)
>so, every 4 minutes i run sa-learn --rebuild
>it seems to have resolved the issues.
>Although everything appears to be running fine with bayes currently, it
>won't properly auto_learn since it can't write the data to the file, and if
>i'm not mistaken, eventually it'll stop using the bayes scoring until the db
>is rebuilt anyways.

Thanks for the help. I went back and reread the man page on sa-learn.  Because of the way we use spamassassin, there's some settings and features that don't get used/called.  I added the following to /etc/mail/spamassassin/local.cf

bayes_expiry_min_db_size 100000
bayes_expiry_scan_count 5000
required_hits           3
auto_report_threshold   30
use_bayes               1
bayes_path              /var/spool/spamassassin/bayes
bayes_file_mode         0666

I then created a cronjob for defang to force expiration of old entries (which also does a rebuild):

0 21 * * 2 /usr/bin/sa-learn --force-expire >& /dev/null

I think once a week will be adequate, time will tell.  It has stopped the original error message and really shrunk the database size.  I suspect that was the real problem, after the database got too big, it was having issues opening it properly (but I couldn't prove this).  Spamassassin is supposed to take care of the expiration itself but apparently it wasn't.  The two bayes_expiry settings are apparently the defaults but until I added them to the local.cf, I don't think they were used.


More information about the MIMEDefang mailing list