spamassassin-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Funk <dbf...@engineering.uiowa.edu>
Subject Re: no BAYES checking
Date Thu, 26 Feb 2015 03:03:00 GMT
On Wed, 25 Feb 2015, James wrote:

> I don't think I have the Bayesian filter working.
>
> This is some spam that wasn't marked as spam, shouldn't one of the tests be BAYES_00?
>
> X-Spam-Status: No, score=4.5 required=5.0 tests=FREEMAIL_FROM,FREEMAIL_REPLYTO,
> 	FSL_MY_NAME_IS,HTML_MESSAGE,RDNS_DYNAMIC,T_OBFU_JPG_ATTACH autolearn=no
> 	version=3.3.2
>
> $ sudo sa-learn --username=debian-spamd --dump magic
> 0.000          0          3          0  non-token data: bayes db version
> 0.000          0       5902          0  non-token data: nspam
> 0.000          0       4985          0  non-token data: nham
> 0.000          0     422427          0  non-token data: ntokens
> 0.000          0 1159486049          0  non-token data: oldest atime
> 0.000          0 1424827990          0  non-token data: newest atime
> 0.000          0 1424843976          0  non-token data: last journal sync atime
> 0.000          0 1424830068          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
>
> Doesn't that show I have 5902 spam and 2462 ham messages?
>
> /etc/spamassassin/local.cf
> use_bayes 1
> bayes_auto_learn 1
>
> $ sudo -u debian-spamd spamassassin -D --lint 2>t
> $ less t
> $ grep bayes t
> Feb 25 21:07:47.606 [27839] dbg: config: fixed relative path: /var/lib/spamassassin/3.003002/updates_spamassassin_org/23_bayes.cf
> Feb 25 21:07:47.607 [27839] dbg: config: using "/var/lib/spamassassin/3.003002/updates_spamassassin_org/23_bayes.cf"
for included file
> Feb 25 21:07:47.607 [27839] dbg: config: read file /var/lib/spamassassin/3.003002/updates_spamassassin_org/23_bayes.cf
> Feb 25 21:07:55.270 [27839] dbg: bayes: learner_new self=Mail::SpamAssassin::Plugin::Bayes=HASH(0x1de4868),
bayes_store_module=Mail::SpamAssassin::BayesStore::DBM
> Feb 25 21:07:55.353 [27839] dbg: bayes: learner_new: got store=Mail::SpamAssassin::BayesStore::DBM=HASH(0x230eb58)
> Feb 25 21:07:55.356 [27839] dbg: bayes: tie-ing to DB file R/O /var/lib/spamassassin/.spamassassin/bayes_toks
> Feb 25 21:07:55.359 [27839] dbg: bayes: tie-ing to DB file R/O /var/lib/spamassassin/.spamassassin/bayes_seen
> Feb 25 21:07:55.363 [27839] dbg: bayes: found bayes db version 3
> Feb 25 21:07:55.365 [27839] dbg: bayes: DB journal sync: last sync: 0
> Feb 25 21:07:55.366 [27839] dbg: bayes: not available for scanning, only 0 ham(s) in
bayes DB < 200
> Feb 25 21:07:55.367 [27839] dbg: bayes: untie-ing
> Feb 25 21:07:55.379 [27839] dbg: bayes: tie-ing to DB file R/O /var/lib/spamassassin/.spamassassin/bayes_toks
> Feb 25 21:07:55.382 [27839] dbg: bayes: tie-ing to DB file R/O /var/lib/spamassassin/.spamassassin/bayes_seen
> Feb 25 21:07:55.385 [27839] dbg: bayes: found bayes db version 3
> Feb 25 21:07:55.386 [27839] dbg: bayes: DB journal sync: last sync: 0
> Feb 25 21:07:55.388 [27839] dbg: bayes: not available for scanning, only 0 ham(s) in
bayes DB < 200
> Feb 25 21:07:55.388 [27839] dbg: bayes: untie-ing
>
> Why does it say not enough ham?

It looks like you either have a permissions problem or a confusion problem.
Your run of 'sa-learn --dump magic' is looking at some Bayes which has
enough ham/spam but what ever your spamassasin is looking at doesn't.

Your 'sudo' isn't running that sa-learn --dump magic as UID 'debian-spamd'
It's running it as root but telling sa-learn to emulate user 'debian-spamd'
so there could be a permissions problem.
Try running sa-learn in the same way that you're running spamassasin:

  $ sudo -u debian-spamd sa-learn --dump magic
and see what you get.

Other possibility is that sa-learn is looking at a different bayes
database. Try running that "sa-learn --dump magic" with the "-D" option
to see what bayes database it's looking at.



-- 
Dave Funk                                  University of Iowa
<dbfunk (at) engineering.uiowa.edu>        College of Engineering
319/335-5751   FAX: 319/384-0549           1256 Seamans Center
Sys_admin/Postmaster/cell_admin            Iowa City, IA 52242-1527
#include <std_disclaimer.h>
Better is not better, 'standard' is better. B{

Mime
View raw message