On Fri, May 30, 2003 at 03:16:14PM -0500, Stewart, John wrote: > *check* the database to see if an expiration should be run. Is this expected > behaviour? If so, what the heck is the point to the --force-expire flag if a > new call to SA will cause an expiration check to run anyway?
force-expire ought to do an expire. > The evidence that --force-expire does *not* really do an expiration is that > when I am running with bayes enabled (via amavisd-new), and a cron job every > hour of "sa-learn --rebuild --force-expire", I'm still getting hideous > problems with amavisd-new timing out because all of a sudden the SA > functions it calls are trying to expire. Well, you can do a force-expire with -D, or you can use check_bayes_db and check out the top 7 lines. You would see something like this: pre-force-expire: 0.000 0 0 0 non-token data: db format = on-the-fly probs, expiry, scan-counting 0.000 0 77325 0 non-token data: nspam 0.000 0 19581 0 non-token data: nham 0.000 0 104694 0 non-token data: ntokens 0.000 0 55853 0 non-token data: oldest age 0.000 0 64754 0 non-token data: current scan-count 0.000 0 60295 0 non-token data: last expiry scan-count ... run force-expire ... post-force-expire: 0.000 0 0 0 non-token data: db format = on-the-fly probs, expiry, scan-counting 0.000 0 77325 0 non-token data: nspam 0.000 0 19581 0 non-token data: nham 0.000 0 104694 0 non-token data: ntokens 0.000 0 55853 0 non-token data: oldest age 0.000 0 64754 0 non-token data: current scan-count 0.000 0 64753 0 non-token data: last expiry scan-count So basically that last expiry count would show you that an expire occured. The calculation for whether expiry is due is essentially (there's some other checks, but this is the main one): if (($now - $last > $limit/2 && $now - $oldest > $limit) || ($now < $last)) { So if 'current scan-count' - 'last expiry scan-count' is greater than 2500, and 'current scan-count' - 'oldest age' > 5000, do an expire (so it could do an expire every 2500 tokens ...) Or if 'current scan-count' is less than 'last expiry scan-count' (only happens due to a bug in earlier 2.5x versions). In 2.5x, if you're going to do manual expires, change the expiry_count value to something really large. In 2.6x, just do 'bayes_auto_expire 0'. ;) -- Randomly Generated Tagline: "Suppose you were an idiot. And suppose you were a member of Congress. But I repeat myself." - Mark Twain
pgp00000.pgp
Description: PGP signature