force Bayes DB to expire - SpamAssassin

This is a discussion on force Bayes DB to expire - SpamAssassin ; Hello list, first I'm wondering why I got the following error, because in my local.cf I set 'bayes_auto_expire 1' to prevent SpamAssassin from expire the bayes-db (or did amavis the expire?): Sep 18 13:15:48 server amavis[19655]: (19655-04) (!)SA TIMED OUT, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: force Bayes DB to expire

  1. force Bayes DB to expire

    Hello list,

    first I'm wondering why I got the following error, because in my local.cf I
    set 'bayes_auto_expire 1' to prevent SpamAssassin from expire the bayes-db (or
    did amavis the expire?):

    Sep 18 13:15:48 server amavis[19655]: (19655-04) (!)SA TIMED OUT, backtrace:
    at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/BayesStore/DBM.pm line
    630\n\teval {...} called at /usr/lib/perl5/site_perl/5.8
    .3/Mail/SpamAssassin/BayesStore/DBM.pm
    line630\n\tMail::SpamAssassin::BayesStore:BM::calculate_expire_
    delta('Mail::SpamAssassin::BayesStore:BM=HASH(0xa61ea14)',1221736346,43200,512)
    called at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/BayesStore.pm line
    322\n\tMail::SpamAssassin::BayesStore::expire_old_ tokens_trapped('Mail::SpamAssassin::BayesStore:BM=HASH(0xa61ea14)','undef')
    called at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/BayesStore.pm line
    215\n\teval {...} called at
    /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/BayesStore.pm line
    212\n\tMail::SpamAssassin::BayesStore::expire_old_ tokens('Mail::SpamAssassin::BayesStore:BM=HASH(0xa61ea14)','undef')
    called at /usr/lib/perl5/site_perl/5.8.3/Mail/SpamAssassin/Bayes[...]

    Second, if I run
    # sa-learn --debug --force-expire --dbpath ./ -p ./user_prefs -u vscan
    I get the following:
    [4069] dbg: bayes: expiry check keep size, 0.75 * max: 2250000
    [4069] dbg: bayes: token count: 3425687, final goal reduction size: 1175687
    [4069] dbg: bayes: first pass? current: 1221753006, Last: 1221752575, atime:
    691200, count: 101725, newdelta: 59805, ratio: 11.5575030720079, period: 43200
    [4069] dbg: bayes: can't use estimation method for expiry, unexpected result,
    calculating optimal atime delta (first pass)
    [4069] dbg: bayes: expiry max exponent: 9
    [4069] dbg: bayes: atime token reduction
    [4069] dbg: bayes: ======== ===============
    [4069] dbg: bayes: 43200 2897558
    [4069] dbg: bayes: 86400 2668468
    [4069] dbg: bayes: 172800 2125446
    [4069] dbg: bayes: 345600 1241167
    [4069] dbg: bayes: 691200 4482
    [4069] dbg: bayes: 1382400 0
    [4069] dbg: bayes: 2764800 0
    [4069] dbg: bayes: 5529600 0
    [4069] dbg: bayes: 11059200 0
    [4069] dbg: bayes: 22118400 0
    [4069] dbg: bayes: first pass decided on 691200 for atime delta
    bayes: synced databases from journal in 8 seconds: 11174 unique entries (20637
    total entries)

    And it takes approx. 10 minutes to finish with a 220 MB Bayes-DB. Is that OK?

    Greetings Stefan



    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.9 (GNU/Linux)

    iEUEABECAAYFAkjSe6AACgkQBiHtkFOLX+glowCfaTYuLMSISg YrD1Y26uMNbIuZ
    wNwAmOMCkPhlFnKQrar80x7F0l6vxVA=
    =8lRX
    -----END PGP SIGNATURE-----


  2. Re: force Bayes DB to expire

    > Hello list,
    >
    > first I'm wondering why I got the following error, because in my local.cf I
    > set 'bayes_auto_expire 1' to prevent SpamAssassin from expire the bayes-db (or
    > did amavis the expire?):


    Ah?

    Bayes will auto expire if you set it for 'true' (1). Amavis doesn't do
    anything, with bayes_auto_expire true, spamassassin does the auto-expire
    (amavis calls spamassassin, which is why you get the amavis logs)

    so:
    #1, you want to set bayes_auto_expire 0 in local.cf if you want to run a
    nightly cronjob to run bayes expire (recommended)


    Yes, I guess it could take 10 mins. Best practices says either move to sql
    based bayes, or use db4 with enough ram to cache things better.

    >
    > And it takes approx. 10 minutes to finish with a 220 MB Bayes-DB. Is that OK?
    >
    > Greetings Stefan
    >
    >


    __________________________________________________ _______________________
    This email has been scanned and certified safe by SpammerTrap(r).
    For Information please see http://www.spammertrap.com
    __________________________________________________ _______________________


  3. Re: force Bayes DB to expire

    On Thursday 18 September 2008 18:50, you wrote:
    > > Hello list,
    > >
    > > first I'm wondering why I got the following error, because in my local.cf
    > > I set 'bayes_auto_expire 1' to prevent SpamAssassin from expire the
    > > bayes-db (or did amavis the expire?):

    >
    > Ah?
    >
    > Bayes will auto expire if you set it for 'true' (1). Amavis doesn't do
    > anything, with bayes_auto_expire true, spamassassin does the auto-expire
    > (amavis calls spamassassin, which is why you get the amavis logs)
    >
    > so:
    > #1, you want to set bayes_auto_expire 0 in local.cf if you want to run a
    > nightly cronjob to run bayes expire (recommended)


    Of, course.
    >
    > Yes, I guess it could take 10 mins. Best practices says either move to sql
    > based bayes, or use db4 with enough ram to cache things better.


    I have installed db 4.2.52. sa-learn uses 0.7% of 4 GB ram with a lot more
    free. So ram doesn't seem to be a problem.

    > > And it takes approx. 10 minutes to finish with a 220 MB Bayes-DB. Is that
    > > OK?


    Thanks for helping me out.
    Greetings Stefan

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.5 (GNU/Linux)

    iD8DBQBI1L3xBiHtkFOLX+gRAof4AJsFcyazRS9/Q/5MRJygcznn/V4J9wCbBc/f
    mkWI1yhjZnm/k/GiDxAGmmY=
    =ObDP
    -----END PGP SIGNATURE-----


+ Reply to Thread