Michael Monnerie wrote: > Hi, I've setup a new server, and made > # sudo -H -u vscan sa-learn --ham --progress --no-sync > --mbox /tmp/ham.txt > 3.59 msgs/sec 31m43s DONE > Learned tokens from 6842 message(s) (6842 message(s) examined) >
I don't know why it's not working, but the FIRST thing to check is what files are being updated, if any, when this command runs. Check both: /home/vscan/.spamassassin/bayes_db_toks /root/.spamassassin/bayes_db_toks (Note:, you changed the bayes path to cause this slightly abnormal naming. Normally the file would be bayes_toks. I'm really not sure why you over-rode bayes_path with such a subtle change from the default, but that is the result.) > And the same for SPAM, and then I have this: > > # sudo -H -u vscan sa-learn --dump > 0.000 0 0 0 non-token data: nspam > 0.000 0 0 0 non-token data: nham > > But when I do > # su -l vscan > [EMAIL PROTECTED]:~> sa-learn --ham --progress --no-sync > --mbox /tmp/ham.txt > 6.32 msgs/sec 18m03s DONE > Learned tokens from 6842 message(s) (6842 message(s) examined) > > I have: > # sudo -H -u vscan sa-learn --dump > 0.000 0 6726 0 non-token data: nspam > 0.000 0 7023 0 non-token data: nham > > Now why is there a diff between sudo as a user or directly logging in as > the user? My local.cf has this entries: > loadplugin Mail::SpamAssassin::Plugin::AutoLearnThreshold > Do NOT put loadplugin statements in your local.cf. These belong in init.pre. > bayes_path ~/.spamassassin/bayes_db > bayes_expiry_max_db_size 20000000 > bayes_file_mode 0777 > Note: you don't need the 0777 normally unless you're forcing bayes path to a non-home-directory-relative path that multiple users share. ie: /var/spamassassin/bayes > bayes_auto_expire 0 > Note: I hope you have a cron job that kicks of sa-learn --force-expire. With bayes_auto_expire disabled there's nothing else to keep the bayes DB from growing without bound. > bayes_auto_learn_threshold_spam 8.00 > bayes_auto_learn_threshold_nonspam 0.1 > > mfg zmi >