Brian Wong wrote: > I just recently implemented bayes at our site and was wondering how > token expiration works. I thought that since I left the > 'bayes_expiry_max_db_size' and 'bayes_auto_expire' to the default > value of 1, that it would automatically expire the tokens. I run > SpamAssassin through amavisd, and found that over the weekend I had > accumulated over 1 million tokens through autolearn. Does auto-expire > only work with the spamd daemon? How would I regularly purge the > database? Cron job with `sa-learn --force-expire`? Thanks. >
Since amavis calls SA directly at the perl API, it does have some ability to change SA's settings to suit it's needs. I don't know if amavis does over-ride this, but forcing auto-expiry to be disabled would be within amavis's power. One thing I *do* know that amavis does is it enforces a timeout on SA calls. Thus, if SA does try to perform an expire, amavis may timeout unless your timeout is really large (5 mins). This would effectively disable expiry by killing off SA every time it tries. A noticable byproduct of this would be the presece of bayes_toks.expire<pid> files alongside your bayes DB.