Differences between revisions 1 and 2
Revision 1 as of 2006-05-07 19:58:44
Size: 1079
Editor: d226-82-175
Revision 2 as of 2009-09-20 23:16:47
Size: 1083
Editor: localhost
Comment: converted to 1.6 markup
Deletions are marked like this. Additions are marked like this.
Line 23: Line 23:
Thanks to [mailto:rjohnson@dogstar-interactive.com Rich Johnson] for these instructions. (From [http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=334829 Debian bug 334829]) Thanks to [[mailto:rjohnson@dogstar-interactive.com|Rich Johnson]] for these instructions. (From [[http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=334829|Debian bug 334829]])

Setting up a cron job to force Bayes Expiry

By default, SpamAssassin learns to a journal instead of learning directly to the Bayes database. Unfortunately, occasionally SpamAssassin will need to re-sync the database and expire old tokens from the database, and it will do this before processing the message. To get around this, we can force expiry on a different schedule.

  1. Add "bayes_auto_expire 0" to /etc/spamassassin/local.cf to stop SA from trying to expire old tokens.
  2. Stop SpamAssassin and things that depend on it

    •     ....
          /etc/init.d/exim4 stop
          /etc/init.d/spamassassin stop
  3. Run "sa-learn --force-expire". (which takes ~25 secs on my machine)
  4. Restart SpamAssassin and things that depend on it:

    •     /etc/init.d/spamassassin start
          /etc/init.d/exim4 start
  5. Bundle steps 2-4 into a crontab job(s).

Thanks to Rich Johnson for these instructions. (From Debian bug 334829)

BayesForceExpire (last edited 2009-09-20 23:16:47 by localhost)