Connect. Communicate. Collaborate. Securely.

Home » Kerio User Forums » Kerio Connect » bayesian filter reset to 0
  •  
sonofcolin

Messages: 483
Karma: 0
Send a private message to this user
I've just migrated our mailserver onto new hardware. Everything seems to be working except the bayesian filter in spamassasin has reset to 0. I hope this isn't the case! Where are the stats for this kept in the mailserver directory? I want to copy them over from the old server.

I'm also seeing this is the error logs:
SpamPlugin.cpp: Spam Server error(0): Perl_die: bayes: sdbm store returned -1, errno 2, key " RUNNINGEXPIRE" at /usr/local/kerio/mailserver/plugins/spamassassin/site/lib/Mail/SpamAssassin/BayesStore/DBM.pm line 1011.

[Updated on: Mon, 23 March 2009 06:20]

  •  
freakinvibe

Messages: 1540
Karma: 62
Send a private message to this user

Dexion AG - The Blackberry Specialists in Switzerland
https://dexionag.ch
  •  
sonofcolin

Messages: 483
Karma: 0
Send a private message to this user
Thanks for the link.
This is however the same server (same settings) just on a new, shinier box Smile
  •  
Pavel Dobry (Kerio)

Messages: 5245
Karma: 251
Send a private message to this user
sonofcolin wrote on Mon, 23 March 2009 11:23

Thanks for the link.
This is however the same server (same settings) just on a new, shinier box Smile


Which is probably the cause - Bayes database is not compatible between PowerPC and Intel Mac platforms.
  •  
sonofcolin

Messages: 483
Karma: 0
Send a private message to this user
So, no way to get my several years worth of bayes filter data from the old server?
  •  
Pavel Dobry (Kerio)

Messages: 5245
Karma: 251
Send a private message to this user
Sorry, no easy way. There is a way how to migrate the database between platforms but it requires exporting on the old platform and importing on the new one.

BTW: Content of well-trained Bayes filter database knows nothing about several years old messages. The tokens are usually only several weeks old. I would be surprised if there would be tokens older than 4 months. Size of Bayes database is limited to 150000 tokens, so old entries are automatically removed.
  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
Export and import of Bayes databases is yet another reason to give admins access to the SpamAssassin "sa-learn" program on KMS ...
  •  
sonofcolin

Messages: 483
Karma: 0
Send a private message to this user
Kerio_pdobry wrote on Mon, 23 March 2009 07:19

Sorry, no easy way. There is a way how to migrate the database between platforms but it requires exporting on the old platform and importing on the new one.

Ok. To get rid of the SpamPlugin.cpp error, do I need to run the installer again, to replace the bayes database?
  •  
TorW

Messages: 769
Karma: 9
Send a private message to this user
You must replace the bayes database. The error you're seeing is SpamAssassin trying to expire old tokens from the database, but since it can't read the database (ref. Kerio_pdobry's post on compatibility), it throws an error.

Words ("tokens") seen in spams are regularly cleaned out from the bayes db, after a certain amount of time. This is known as "token expiry" and is done to keep the database as fresh and relevant as possible. In a normal SpamAssassin installation you can run "sa-learn --dump magic" to see the token statistics. I don't know how you do it in KMS (if at all possible).
  •  
blackbox

Messages: 82
Karma: 0
Send a private message to this user
Probably the easiest way to fix your issue:

Stop the server
Rename or delete the bayes folder
Start the server

Assuming you have root access via terminal or ssh something similar to the following should work.
SystemStarter stop KerioMailServer
mv /usr/local/kerio/mailserver/store/spamassassin/bayes bayes_old
SystemStarter start KerioMailServer

[Updated on: Tue, 24 March 2009 15:59]

  •  
meistre

Messages: 5
Karma: 0
Send a private message to this user
What if this directory/file doesn't exist?
  •  
d.

Messages: 169
Karma: 0
Send a private message to this user
Is the rest of your Kerio installation in that general area?

Cheers,
D.

  •  
meistre

Messages: 5
Karma: 0
Send a private message to this user
Yes, the mailserver directory is there but with no store directory inside it.
  •  
d.

Messages: 169
Karma: 0
Send a private message to this user
Your real store is probably located somewhere else then Smile

On a second volume?

Cheers,
D.

meistre

Messages: 5
Karma: 0
Send a private message to this user
You're right. Found it on another internal drive. All the directories are locked, do I need to change the permission on them?
Previous Topic: Performance issues with Exchange IMAP in Apple Mail
Next Topic: Message Size
Goto Forum:
  


Disclaimer:
Kerio discussion forums are intended for open communication between forum members and may contain information and material posted by members which may be useful in learning about Kerio products. The discussion forums are not intended to provide technical support for any specific product. Any information implied or expressed in the discussion forums is that of the posting member. Kerio is in no way responsible for the information posted in the forums, or its accuracy. Kerio employees may participate in the discussions, but their postings do not represent an offical position of the company on any issues raised or discussed. Kerio reserves the right to monitor and maintain the forums to promote free and accurate exchange of information.

Current Time: Tue Oct 17 22:21:17 CEST 2017

Total time taken to generate the page: 0.00491 seconds
.:: Contact :: Home ::.
Powered by: FUDforum 3.0.4.