On 8/20/2012 2:47 PM, Ben Johnson wrote:
> I was able to resolve the issue by adding the --username switch to the
> 'sa-learn' executable:
> 
> # sa-learn --username=amavis --spam
> /var/vmail/example.com/trainer/Maildir/.INBOX.Spam/cur
> 
> Thanks for all of the hints, folks!

So, I've been training SpamAssassin like a mad-man for a couple of days.

I don't have over 200 spams and 200 hams, so I don't expect Bayes to be
used yet (and it's not), but the following output is puzzling
(particularly, "only 0 spam(s) in bayes DB < 200"):

---8<----------
# su amavis -c "spamassassin -D -t <
/usr/share/doc/spamassassin/examples/sample-spam.txt 2>&1 | egrep
'(bayes:|whitelist:|AWL)'"

Aug 21 13:08:33.717 [23714] dbg: bayes: learner_new
self=Mail::SpamAssassin::Plugin::Bayes=HASH(0x213613f8),
bayes_store_module=Mail::SpamAssassin::BayesStore::DBM
Aug 21 13:08:33.728 [23714] dbg: bayes: learner_new: got
store=Mail::SpamAssassin::BayesStore::DBM=HASH(0x2153b400)
Aug 21 13:08:33.729 [23714] dbg: bayes: tie-ing to DB file R/O
/var/lib/amavis/.spamassassin/bayes_toks
Aug 21 13:08:33.729 [23714] dbg: bayes: tie-ing to DB file R/O
/var/lib/amavis/.spamassassin/bayes_seen
Aug 21 13:08:33.730 [23714] dbg: bayes: found bayes db version 3
Aug 21 13:08:33.730 [23714] dbg: bayes: DB journal sync: last sync: 0
Aug 21 13:08:33.730 [23714] dbg: bayes: not available for scanning, only
0 spam(s) in bayes DB < 200
Aug 21 13:08:33.730 [23714] dbg: bayes: untie-ing
Aug 21 13:08:33.732 [23714] dbg: bayes: tie-ing to DB file R/O
/var/lib/amavis/.spamassassin/bayes_toks
Aug 21 13:08:33.732 [23714] dbg: bayes: tie-ing to DB file R/O
/var/lib/amavis/.spamassassin/bayes_seen
Aug 21 13:08:33.733 [23714] dbg: bayes: found bayes db version 3
Aug 21 13:08:33.733 [23714] dbg: bayes: DB journal sync: last sync: 0
Aug 21 13:08:33.733 [23714] dbg: bayes: not available for scanning, only
0 spam(s) in bayes DB < 200
Aug 21 13:08:33.733 [23714] dbg: bayes: untie-ing
---8<----------

Restarting Amavis does not change the output above.

And the output below seems to contradict the above (300 spams and 95 hams):

---8<----------
# sa-learn --username=amavis --dump magic

0.000          0          3          0  non-token data: bayes db version
0.000          0         95          0  non-token data: nspam
0.000          0        300          0  non-token data: nham
0.000          0      59420          0  non-token data: ntokens
0.000          0 1345469997          0  non-token data: oldest atime
0.000          0 1345577900          0  non-token data: newest atime
0.000          0          0          0  non-token data: last journal
sync atime
0.000          0          0          0  non-token data: last expiry atime
0.000          0          0          0  non-token data: last expire
atime delta
0.000          0          0          0  non-token data: last expire
reduction count
---8<----------

Am I doing something silly?

Thanks for any help,

-Ben

Reply via email to