Koozali.org: home of the SME Server

Bayesian possibly not working and"spamassassin: error, reject disabled" meaning?

Offline Michail Pappas

  • *
  • 339
  • +1/-0
I was having a look today at my qpsmtpd logs (/var/log/qpsmtpd/*). Noticed a couple of issues, notably (a) that the Bayes criteria that apply to a message did not appear in the logs (used to IIRC) and (b) that there have been references for each mail of the form:
Code: [Select]
(data_post) spamassassin: error, reject disabled (Ham, 1.1, learn=no)

Regarding (a) I've been following the recommendations in the wiki ( https://wiki.koozali.org/SME_Server:Documentation:FAQ:Section04#Bayesian_Filtering ) to make sure that spamassassin is working alright. I've reset the bayes stats as per the article and hopefully will have bayesian working soon.

I've started receiving messages but from the looks of it, the /var/spool/spamd/.spamassassin/bayes_* files are not being modified after effecting a reset:
Code: [Select]
ls -laFt /var/spool/spamd/.spamassassin/
total 20
drwxr-s---. 2 spamd spamd    61 Jun  2 11:35 ./
-rw-r-----  1 spamd spamd    10 Jun  2 11:35 bayes.mutex
-rw-r-----  1 spamd spamd 12288 Jun  2 11:35 bayes_toks
-rw-r-----  1 spamd spamd 12288 Jun  2 11:35 bayes_seen

Furthermore, bayes stats indicate that nothing has been learned (could be because a large number of ham/spam must be classified before the stats start indicating something):
Code: [Select]
# sa-learn --dump magic
netset: cannot include 127.0.0.0/8 as it has already been included
0.000          0          3          0  non-token data: bayes db version
0.000          0          0          0  non-token data: nspam
0.000          0          0          0  non-token data: nham
0.000          0          0          0  non-token data: ntokens
0.000          0          0          0  non-token data: oldest atime
0.000          0          0          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

And regarding (b) above: do the "spamassassin: error, reject disabled" log lines indicate a problem with my setup?

Sidenote 1: instructions in the wiki article indicated that a spamd setting, SpamLearning, should be enabled (it was not enabled on my SME 10 configuration). Checking my SME 8-9 old configs, this setting was enabled. What's a bit strangier is that doing a "config show spamd" returned nothing at all, whereas on SME9 it did and also returned a status setting (on SME9 set to enabled).

Does this mean that spamd is not used under SME10? Or perhaps is it always on? Bottomline, in order to have bayesian auto-learning, should I do a "config setprop spamd SpamLearning enabled" or not? Should I also do a "config setprop spamd status enabled"? Something else needed?

Sidenote 2: as a test I've tried setting both spamd settings to enabled, but doing a "config show spamd" produces nothing at all afterwards. Something else I should to get this working?

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Apologies for posting this in this forum instead of "Koozali SME Server 10.x", I'd be obliged if an admin could move it to its right place.

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
spamd auto learn is better left disabled.
why?
because it will learn as spam what it already tag as spam and as ham what it already tag as ham.

this make your life harder to improve your filter by using let’s say smeserver-learn, or even dovecot-extra and sever inside a mail web client.

Offline Michail Pappas

  • *
  • 339
  • +1/-0
Thanks mate.

With regard to the "spamassassin: error, reject disabled" log lines should I take some action, or are they considered normal?


Offline Michail Pappas

  • *
  • 339
  • +1/-0
Not sure what you mean with the reference to the Bayesian learning module. My question was with regard to the specific message logged (ie whether it's normal or not).

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
it is normal if you set not to reject spam.

Offline Michail Pappas

  • *
  • 339
  • +1/-0
I believe that in my configuration I am rejecting spam:
Code: [Select]
# config show spamassassin
spamassassin=service
    DNSAvailable=yes
    MessageRetentionTime=90
    OkLanguages=en el
    OkLocales=en el gr
    RejectLevel=6
    ReportSafe=0
    Sensitivity=custom
    SkipRBLChecks=0
    SortSpam=enabled
    SpamLearning=enabled
    Subject=[SPAM]
    SubjectTag=enabled
    TagLevel=6
    TrustedNetworks=127/8 X.y.z.w/q
    UseAutoWhitelist=0
    UseBayes=1
    UseBayesAutoLearn=1
    status=enabled

Is this an abnormal situation then, as per your last post?

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
it is disabled. 

to enable it, you need TagLevel < RejectLevel.
Read strict inferior

Offline Michail Pappas

  • *
  • 339
  • +1/-0
You're a genious, setting different values for TagLevel / RejectLevel worked like a charm :)

Thank you!

Offline Jean-Philippe Pialasse

  • *
  • 2,762
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
genious genious. just took the time to open and read the template ;)

good to see it works as you expected now.