# spamassassin cannot do basic arithmetic. (bayes not working)

## tuxophil

OK, I can't find anything on this problem. Sorry if it's a dupe.

Here's a snippet of spamassassin -D -t -L < somespammessage

```
X-Spam-Checker-Version: SpamAssassin 3.0.2-gr1 (2004-11-16) on homer.simpson

X-Spam-Level: *

X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_DOUBLE_IP_LOOSE,

        SARE_RECV_IP_FROMIP1 autolearn=no version=3.0.2-gr1

X-UID:

X-Virus-Status: No

X-Virus-Checker-Version: clamassassin 1.2.1 with ClamAV 0.82/707/Wed Feb 16 23:00:07 2005 signatures 29.707

Status: R

X-Status: NC

X-KMail-EncryptionState:

X-KMail-SignatureState:

X-KMail-MDN-Sent:

l393R377

At Fraction of Retail Prices: Adobe, Dreamweaver, Corel, Windows XP, Office XP,Norton System Works - f549vu51

A must-see - http://care.ekdbekdd.com/?O1kTkziLSTVb4OObackstitch

no more - http://hocus.kldjknai.com/transcontinental?tcvyvetqxy4mLttlaughter

a035ia85

------------=_42151D26.91BF34DC--

Spam detection software, running on the system "homer.simpson", has

identified this incoming email as possible spam.  The original message

has been attached to this so you can view it (if it isn't spam) or label

similar future email.  If you have any questions, see

the administrator of that system for details.

Content preview:  l393R377 At Fraction of Retail Prices: Adobe,

  Dreamweaver, Corel, Windows XP, Office XP, Norton System Works -

  f549vu51 A must-see -

  http://care.ekdbekdd.com/?O1kTkziLSTVb4OObackstitch [...]

Content analysis details:   (5.8 points, 5.0 required)

 pts rule name              description

---- ---------------------- --------------------------------------------------

 0.1 RCVD_BY_IP             Received by mail server with no name

 1.7 SARE_RECV_IP_FROMIP1   Received line is IP address from IP address

 4.1 BAYES_99               BODY: Bayesian spam probability is 99 to 100%

                            [score: 1.0000]

 0.0 RCVD_DOUBLE_IP_LOOSE   Received: by and from look like IP addresses

```

As you can see the header states

```
X-Spam-Status: No, score=1.8 required=5.0 tests=RCVD_DOUBLE_IP_LOOSE,

        SARE_RECV_IP_FROMIP1 autolearn=no version=3.0.2-gr1
```

even though the BAYES_99 alone has 4.9 points. It even states "(5.8 points, 5.0 required)" but in the header it's only 1.8.

This behaviour is driving me crazy. I always have to check for two things in KMail: is X-Spam-Status yes or do we have BAYES_99. Why isn't it counting the BAYES rule? After all it's the single most accurate method.

(BTW this has always been it's behaviour, crazy isn't it?)

----------

## TheRAt

Please post your spamassassin config file.

----------

## tuxophil

 *TheRAt wrote:*   

> Please post your spamassassin config file.

 

/etc/conf.d/spamd:

SPAMD_OPTS="-i -m 1 -c -H -L"

~/.spamassassin/user_prefs:

bayes_min_spam_num      60

bayes_min_ham_num       60

----------

## TheRAt

nothing strange there that I can see.. how about in /etc/spamassassin/local.cf? although I am uncertain if this is even used with the presence of the user configs...

----------

## tuxophil

 *TheRAt wrote:*   

> /etc/spamassassin/local.cf?

 

lock_method flock

Thanks for your quick replies!

----------

## TheRAt

nothing strange there either...

Just read an atricle in the spamassassin mailing list that suggests some off behaviour with -m limit set to 1... But this is specifically with respect to used spamd/spamc etc...

----------

## zinger

Do you got 'berkdb' in your USE-Flags?

If not, add it and recompile perl and spamassassin. 

Perhaps it's possible to emerge dev-perl/DB_File only without reemerging perl and spamassassin. 

dev-per/DB_File is needed by Bayes-Filter to store its data. It's a dependency of spamassassin when emerging with USE=berkdb

I just ran in a similiar problem like you. Above steps fixed mine, hope it will help you too.

----------

## trondert

THX!

Had the same problem, and zingers 'berkdb' fixed it!

----------

