Re: bayes: no dbs present, cannot tie DB R/O

2017-01-29 Thread RW
On Sun, 29 Jan 2017 20:05:29 +0100
gladst...@posteo.de wrote:

> Hello,
> 
> I use SpamAssassin version 3.4.1 with amavisd-new-2.10.1.
> I reset my bayes db via "sa-learn --clear". After that spamassassin 
> seems to be unable to create a new empty database. When I run
> "sa-learn --dump" I get the following error: `[1547] dbg: bayes: no
> dbs present, cannot tie DB
> R/O: /var/lib/amavis/.spamassassin/bayes_toks` Since I am pretty sure
> that this cannot really be a permission issue, I set bayes_path to
> tmp where permissions are 777, tried again and got the very same
> error: `[1565] dbg: bayes: no dbs present, cannot tie DB
> R/O: /tmp/bayes_toks `
> 
> So the problem seems to lie somewhere else. What else can I try to
> fix this?

The problem is that you are trying to read from a non-existent
database rather than write to it. 

$ sa-learn --backup > /tmp/bayes

$ sa-learn --clear

$ sa-learn --dump magic
ERROR: Bayes dump returned an error, please re-run with -D for more
information

$ printf "\n\nHello World\n" |  sa-learn --ham
Learned tokens from 1 message(s) (1 message(s) examined)

$ sa-learn --dump magic
0.000  0  3  0  non-token data: bayes db version
0.000  0  0  0  non-token data: nspam
0.000  0  1  0  non-token data: nham
...


bayes: no dbs present, cannot tie DB R/O

2017-01-29 Thread gladston3

Hello,

I use SpamAssassin version 3.4.1 with amavisd-new-2.10.1.
I reset my bayes db via "sa-learn --clear". After that spamassassin 
seems to be unable to create a new empty database. When I run "sa-learn 
--dump" I get the following error: `[1547] dbg: bayes: no dbs present, 
cannot tie DB R/O: /var/lib/amavis/.spamassassin/bayes_toks`
Since I am pretty sure that this cannot really be a permission issue, I 
set bayes_path to tmp where permissions are 777, tried again and got the 
very same error:

`[1565] dbg: bayes: no dbs present, cannot tie DB R/O: /tmp/bayes_toks `

So the problem seems to lie somewhere else. What else can I try to fix 
this?


Thank you very much in advance


Re: bayes: no dbs present, cannot tie DB R/O - Amavis-new

2013-09-28 Thread Benny Pedersen

Axb skrev den 2013-09-27 16:43:


bayes_path = /var/lib/amavis/.spamassassin/bayes

think the path to Bayes was = /var/lib/amavis/.spamassassin/bayes,

Good to hear it worked.


put this in user_prefs for amavis not global will be better, then its 
still possible to have seperate user_prefs with diff bayes path and 
users


global is imho to gready


bayes: no dbs present, cannot tie DB R/O - Amavis-new

2013-09-27 Thread Peter Smith
Hi all,

We've just migrated from an old server running SA 3.2.5 and
amavisd-new-2.6.1 to a new machine with SA 3.3.2 and amavisd-new-2.7.1
(both Debian). I copied over the bayes-related files, but Amavis isn't
loading them:

bayes: no dbs present, cannot tie DB R/O: =
/var/lib/amavis/.spamassassin/bayes_toks

I've seen this problem in the past, and have always been able to solve
it ... this time I'm stumped.

I have bayes_toks in the following places:

/var/lib/amavis/.spamassassin/bayes_toks
/var/lib/amavis/= /var/lib/amavis/.spamassassin/bayes_toks
/var/lib/amavis/tmp/= /var/lib/amavis/.spamassassin/bayes_toks

This matches our old setup. bayes_seen is also present in those
directories. Files and directories are owned by the amavis user (I've
checked, amavis-new is definitely running as this user), and
permissions are 744. I've also used 'sa-learn --dump magic
-db-path=...' to confirm that the files aren't corrupt.

In the spamasssin config files I have:

bayes_path = /var/lib/amavis/.spamassassin/bayes

All seems ok, yes? I

Thanks,
Peter Smith





Re: bayes: no dbs present, cannot tie DB R/O - Amavis-new

2013-09-27 Thread Axb

make sure you have this in local.cf:

bayes_path /var/lib/amavis/.spamassassin/bayes/bayes

and that path /var/lib/amavis/.spamassassin/bayes/ exists

h2h

On 09/27/2013 09:54 AM, Peter Smith wrote:

Hi all,

We've just migrated from an old server running SA 3.2.5 and
amavisd-new-2.6.1 to a new machine with SA 3.3.2 and amavisd-new-2.7.1
(both Debian). I copied over the bayes-related files, but Amavis isn't
loading them:

bayes: no dbs present, cannot tie DB R/O: =
/var/lib/amavis/.spamassassin/bayes_toks

I've seen this problem in the past, and have always been able to solve
it ... this time I'm stumped.

I have bayes_toks in the following places:

/var/lib/amavis/.spamassassin/bayes_toks
/var/lib/amavis/= /var/lib/amavis/.spamassassin/bayes_toks
/var/lib/amavis/tmp/= /var/lib/amavis/.spamassassin/bayes_toks

This matches our old setup. bayes_seen is also present in those
directories. Files and directories are owned by the amavis user (I've
checked, amavis-new is definitely running as this user), and
permissions are 744. I've also used 'sa-learn --dump magic
-db-path=...' to confirm that the files aren't corrupt.

In the spamasssin config files I have:

bayes_path = /var/lib/amavis/.spamassassin/bayes

All seems ok, yes? I

Thanks,
Peter Smith







Re: bayes: no dbs present, cannot tie DB R/O - Amavis-new

2013-09-27 Thread Axb

On 09/27/2013 02:02 PM, Peter Smith wrote:



In the spamasssin config files I have:

bayes_path = /var/lib/amavis/.spamassassin/bayes



make sure you have this in local.cf:

bayes_path /var/lib/amavis/.spamassassin/bayes/bayes

and that path /var/lib/amavis/.spamassassin/bayes/ exists

h2h


Ah hah, that was the problem. My bayes_path =  was causing SA to
think the path to Bayes was = /var/lib/amavis/.spamassassin/bayes,
which is obviously a relative path for a start. Once I corrected the
config, it was fine. Thank you!



Good to hear it worked.

(Pls keep list mail on the list)


RE: No dbs present modules not installed

2007-11-19 Thread Paul Arnone
SpamAssassin does not appear to be adding anything to any emails at all.  I
do not know where in our mail chain SpamAssassin was being called (but I
guess I'll have to figure it out).

We use qmail and clamav with SA.  I'll have to go through the boot process
step by step to see if I can figure out where SA gets called.  If you are
familiar with this setup though, any tips to narrow down my search would be
appreciated.

Thanks,

Paul Arnone
Network Administrator
---
NuTech Solutions, Inc.
121 West Trade Street - Suite 1900
Charlotte, NC 28202
(704)943-5423

-Original Message-
From: Matt Kettler [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 17, 2007 9:27 AM
To: Paul Arnone
Cc: users@spamassassin.apache.org
Subject: Re: No dbs present  modules not installed

Paul Arnone wrote:
 Thanks.  Good to know that some of those modules are optional.

 SpamAssassin was already in place on our server when I started working
here.
 But sometime after the old Network Admin left, it stopped flagging our
 emails.

 If bayes is optional for SA, then I could change use_bayes 1 to use_bayes
0
 in local.cf and comment out the other bayes_ classifier options and it
 should work?
   
It should work even with those options in place.

SpamAssassin normally treats configuration conflicts as warnings and
just ignores them. ie: if you tell it to use a feature, but the modules
aren't present, it just ignores you and disables the feature and goes on
its merry way.

Now, you say it stopped flagging messages.. Is it just missing a lot of
spam, or is it not adding anything to any emails at all?

If it's not adding anything to any emails, odds are someone made a
configuration change that disabled calling spamassassin. Do you know
where in your mail chain SpamAssassin was being called before? Was it in
procmail, or using a milter, or some other thing?

As I said before, merely having spamd running (ie: starting the
spamassassin service) doesn't do anything to your email. There needs to
be some part of your mail chain configured to call spamassassin, or
spamc, or load the Mail::SpamAssassin perl API and feed messages to it.
(and unless you're using spamc, running spamd is pointless)



RE: No dbs present modules not installed

2007-11-19 Thread Paul Arnone
We do have Simscan installed which I believe is supposed to do what you say
and call SpamAssassin.  Now all I need to do is find out where.

Paul Arnone
Network Administrator
---
NuTech Solutions, Inc.
121 West Trade Street - Suite 1900
Charlotte, NC 28202
(704)943-5423

-Original Message-
From: Matt Kettler [mailto:[EMAIL PROTECTED] 
Sent: Saturday, November 17, 2007 9:27 AM
To: Paul Arnone
Cc: users@spamassassin.apache.org
Subject: Re: No dbs present  modules not installed

Paul Arnone wrote:
 Thanks.  Good to know that some of those modules are optional.

 SpamAssassin was already in place on our server when I started working
here.
 But sometime after the old Network Admin left, it stopped flagging our
 emails.

 If bayes is optional for SA, then I could change use_bayes 1 to use_bayes
0
 in local.cf and comment out the other bayes_ classifier options and it
 should work?
   
It should work even with those options in place.

SpamAssassin normally treats configuration conflicts as warnings and
just ignores them. ie: if you tell it to use a feature, but the modules
aren't present, it just ignores you and disables the feature and goes on
its merry way.

Now, you say it stopped flagging messages.. Is it just missing a lot of
spam, or is it not adding anything to any emails at all?

If it's not adding anything to any emails, odds are someone made a
configuration change that disabled calling spamassassin. Do you know
where in your mail chain SpamAssassin was being called before? Was it in
procmail, or using a milter, or some other thing?

As I said before, merely having spamd running (ie: starting the
spamassassin service) doesn't do anything to your email. There needs to
be some part of your mail chain configured to call spamassassin, or
spamc, or load the Mail::SpamAssassin perl API and feed messages to it.
(and unless you're using spamc, running spamd is pointless)



Re: No dbs present modules not installed

2007-11-19 Thread Matt Kettler
Paul Arnone wrote:
 SpamAssassin does not appear to be adding anything to any emails at all.  I
 do not know where in our mail chain SpamAssassin was being called (but I
 guess I'll have to figure it out).

 We use qmail and clamav with SA.  I'll have to go through the boot process
 step by step to see if I can figure out where SA gets called.  If you are
 familiar with this setup though, any tips to narrow down my search would be
 appreciated.

Well, don't look at the boot process. That will merely tell you where
spamd is started. You want to examine your email process, starting with
where mail gets received.

With Qmail, you might want to look at Qmail's queuing stuff, or look for
signs of simscan or QmailScanner, but I'm no Qmail expert.

Some ways of integrating SA into qmail are detailed at:

http://wiki.apache.org/spamassassin/IntegratedInQmailWithIfspamh

http://wiki.apache.org/spamassassin/IntegratedInQmailWithQmailScanner

And simscan's site is at:

http://www.inter7.com/simscan/


Re: No dbs present modules not installed

2007-11-17 Thread Matt Kettler
Paul Arnone wrote:
 Thanks.  Good to know that some of those modules are optional.

 SpamAssassin was already in place on our server when I started working here.
 But sometime after the old Network Admin left, it stopped flagging our
 emails.

 If bayes is optional for SA, then I could change use_bayes 1 to use_bayes 0
 in local.cf and comment out the other bayes_ classifier options and it
 should work?
   
It should work even with those options in place.

SpamAssassin normally treats configuration conflicts as warnings and
just ignores them. ie: if you tell it to use a feature, but the modules
aren't present, it just ignores you and disables the feature and goes on
its merry way.

Now, you say it stopped flagging messages.. Is it just missing a lot of
spam, or is it not adding anything to any emails at all?

If it's not adding anything to any emails, odds are someone made a
configuration change that disabled calling spamassassin. Do you know
where in your mail chain SpamAssassin was being called before? Was it in
procmail, or using a milter, or some other thing?

As I said before, merely having spamd running (ie: starting the
spamassassin service) doesn't do anything to your email. There needs to
be some part of your mail chain configured to call spamassassin, or
spamc, or load the Mail::SpamAssassin perl API and feed messages to it.
(and unless you're using spamc, running spamd is pointless)


RE: No dbs present modules not installed

2007-11-16 Thread Paul Arnone
Thanks.  Good to know that some of those modules are optional.

SpamAssassin was already in place on our server when I started working here.
But sometime after the old Network Admin left, it stopped flagging our
emails.

If bayes is optional for SA, then I could change use_bayes 1 to use_bayes 0
in local.cf and comment out the other bayes_ classifier options and it
should work?

Paul Arnone
Network Administrator
---
NuTech Solutions, Inc.
121 West Trade Street - Suite 1900
Charlotte, NC 28202
(704)943-5423
-Original Message-
From: Matt Kettler [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 16, 2007 8:58 AM
To: Paul Arnone
Cc: users@spamassassin.apache.org
Subject: Re: No dbs present  modules not installed

Paul Arnone wrote:

 We are running SpamAssassin 3.1.8 on FreeBSD 6.2-RELEASE-p3.

  

 Currently, SpamAssassin is running but not flagging emails as ***SPAM***.

Hmm, that's odd. How did you integrate it into your mail system? (ie:
just having spamd running doesn't do anything at all)

  

 *I get the following info when running spamassassin -lint:*

 [5841] warn: config: SpamAssassin failed to parse line,
 /usr/local/etc/mail/spamassassin/.bayes is not valid for
 bayes_path, skipping: bayes_path /usr/local/etc/mail/spamassassin/.bayes

 [5841] warn: lint: 1 issues detected, please rerun with debug enabled
 for more information

  

 *And the following info when running -lint -D:*

 [5563] dbg: diag: module not installed: IP::Country::Fast ('require'
 failed)

 [5563] dbg: diag: module not installed: Razor2::Client::Agent
 ('require' failed)

 [5563] dbg: diag: module not installed: Net::Ident ('require' failed)

 [5563] dbg: diag: module not installed: DBI ('require' failed)


 I have two questions:

 1)   Are these modules required in order for SpamAssassin to run
 properly?  Just running -lint doesn't say anything about them.  If so,
 how do I install them (I'm a FreeBSD/SpamAssassin newbie)

No. read the INSTALL document that comes with SpamAssassin under
Optional modules

http://svn.apache.org/repos/asf/spamassassin/branches/3.2/INSTALL

 2)   The bayes_journal, bayes_seen,  bayes_toks files are in
 /usr/local/vpopmail/.spamassassin but in our local.cf file, the
 bayes_path is set to /usr/local/etc/mail/spamassassin/.bayes which is
 an empty directory.  Even if I change the bayes_path to
 /usr/local/vpopmail/.spamassassin, I still get the message no dbs
 present when running -lint -D.  What am I doing wrong? 

You don't have DBI installed, therefore no databases can be supported.
Bayes is optional for SA, so DBI is optional.

 Is it just a matter of running sa-learn -sync?  But then it still
 doesn't seem like the bayes_path is pointing to the right spot.

  

 I know that this issue has come up many times before and I have spent
 several days reading posts and web sites but I have not found the
 answer that I am looking for.  I was hoping someone on this list could
 help.

  





Re: No dbs present modules not installed

2007-11-16 Thread Matt Kettler
Paul Arnone wrote:

 We are running SpamAssassin 3.1.8 on FreeBSD 6.2-RELEASE-p3.

  

 Currently, SpamAssassin is running but not flagging emails as ***SPAM***.

Hmm, that's odd. How did you integrate it into your mail system? (ie:
just having spamd running doesn't do anything at all)

  

 *I get the following info when running spamassassin –lint:*

 [5841] warn: config: SpamAssassin failed to parse line,
 /usr/local/etc/mail/spamassassin/.bayes is not valid for
 bayes_path, skipping: bayes_path /usr/local/etc/mail/spamassassin/.bayes

 [5841] warn: lint: 1 issues detected, please rerun with debug enabled
 for more information

  

 *And the following info when running –lint –D:*

 [5563] dbg: diag: module not installed: IP::Country::Fast ('require'
 failed)

 [5563] dbg: diag: module not installed: Razor2::Client::Agent
 ('require' failed)

 [5563] dbg: diag: module not installed: Net::Ident ('require' failed)

 [5563] dbg: diag: module not installed: DBI ('require' failed)


 I have two questions:

 1)   Are these modules required in order for SpamAssassin to run
 properly?  Just running –lint doesn’t say anything about them.  If so,
 how do I install them (I’m a FreeBSD/SpamAssassin newbie)

No. read the INSTALL document that comes with SpamAssassin under
Optional modules

http://svn.apache.org/repos/asf/spamassassin/branches/3.2/INSTALL

 2)   The bayes_journal, bayes_seen,  bayes_toks files are in
 /usr/local/vpopmail/.spamassassin but in our local.cf file, the
 bayes_path is set to /usr/local/etc/mail/spamassassin/.bayes which is
 an empty directory.  Even if I change the bayes_path to
 /usr/local/vpopmail/.spamassassin, I still get the message “no dbs
 present” when running –lint –D.  What am I doing wrong? 

You don't have DBI installed, therefore no databases can be supported.
Bayes is optional for SA, so DBI is optional.

 Is it just a matter of running sa-learn –sync?  But then it still
 doesn’t seem like the bayes_path is pointing to the right spot.

  

 I know that this issue has come up many times before and I have spent
 several days reading posts and web sites but I have not found the
 answer that I am looking for.  I was hoping someone on this list could
 help.

  




No dbs present modules not installed

2007-11-16 Thread Paul Arnone
We are running SpamAssassin 3.1.8 on FreeBSD 6.2-RELEASE-p3.

 

Currently, SpamAssassin is running but not flagging emails as ***SPAM***.

 

I get the following info when running spamassassin -lint:

[5841] warn: config: SpamAssassin failed to parse line,
/usr/local/etc/mail/spamassassin/.bayes is not valid for bayes_path,
skipping: bayes_path /usr/local/etc/mail/spamassassin/.bayes

[5841] warn: lint: 1 issues detected, please rerun with debug enabled for
more information

 

And the following info when running -lint -D:

[5563] dbg: diag: module not installed: IP::Country::Fast ('require' failed)

[5563] dbg: diag: module not installed: Razor2::Client::Agent ('require'
failed)

[5563] dbg: diag: module not installed: Net::Ident ('require' failed)

[5563] dbg: diag: module not installed: DBI ('require' failed)

[5768] dbg: bayes: no dbs present, cannot tie DB R/O:
/root/.spamassassin/bayes_toks

[5768] dbg: bayes: not scoring message, returning undef

[5768] dbg: bayes: opportunistic call attempt failed, DB not readable

 

 

I have two questions:

1)   Are these modules required in order for SpamAssassin to run
properly?  Just running -lint doesn't say anything about them.  If so, how
do I install them (I'm a FreeBSD/SpamAssassin newbie)

2)   The bayes_journal, bayes_seen,  bayes_toks files are in
/usr/local/vpopmail/.spamassassin but in our local.cf file, the bayes_path
is set to /usr/local/etc/mail/spamassassin/.bayes which is an empty
directory.  Even if I change the bayes_path to
/usr/local/vpopmail/.spamassassin, I still get the message no dbs present
when running -lint -D.  What am I doing wrong?  Is it just a matter of
running sa-learn -sync?  But then it still doesn't seem like the bayes_path
is pointing to the right spot.

 

I know that this issue has come up many times before and I have spent
several days reading posts and web sites but I have not found the answer
that I am looking for.  I was hoping someone on this list could help.

 

Thanks,

 

 

Paul Arnone

Network Administrator

---

NuTech Solutions, Inc.

121 West Trade Street - Suite 1900

Charlotte, NC 28202

(704)943-5423

 



no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks

2004-11-23 Thread Johnson, S








I just upgraded from 2.62 to 3.0.1 and ran into the error:



no dbs present, cannot tie DB R/O:
/root/.spamassassin/bayes_toks



when I type in sa_learn dump D



I had bayes running before the upgrade. I wouldnt
mind restarting the bayes DB if I had to. (Ive got lots of spam and ham
to put in). One thing is curious It appears to be looking for the
bayes_toks in the /root directory. The real file exists in /var/amavis/.spamassassin/bayes_toks.
Anyone know where this path is set?



Thanks much.





=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Confidentiality Notice

If the information in this electronic communication relates to an individual pupil, it is a confidential pupil record under Minnesota Law and may not be reviewed, distributed, or copied by any person other than the individual(s) to whom it is addressed. This electronic communication is intended solely for the use of the individual(s) to whom it is addressed. If you are not the intended recipient, any further review, dissemination, distribution, or copying of this electronic communication or any attachment thereto is strictly prohibited. If you have received an electronic communication in error, you should immediately return it to the sender and delete it from your system.







Re: no dbs present, cannot tie DB R/O: /root/.spamassassin/bayes_toks

2004-11-23 Thread Michael Barnes
On Tue, Nov 23, 2004 at 10:54:04AM -0600, Johnson, S wrote:
 The real file exists in /var/amavis/.spamassassin/bayes_toks.  Anyone
 know where this path is set?

User Contributed Perl Documentation   Mail::SpamAssassin::Conf(3)

 user has their own, in their ~/.spamassassin directory
 with mode 0700, but for system-wide SpamAssassin use,
 you may want to share this across all users.

 bayes_path /path/to/file (default: ~/.spamassassin/bayes)
 Path for Bayesian probabilities databases.  Several
 databases will be created, with this as the base, with
 _toks, _seen etc. appended to this filename; so the
 default setting results in files called
 ~/.spamassassin/bayes_seen,
 ~/.spamassassin/bayes_toks etc.

 By default, each user has their own, in their
 ~/.spamassassin directory with mode 0700/0600, but for
 system-wide SpamAssassin use, you may want to reduce
 disk space usage by sharing this across all users.
 (However it should be noted that Bayesian filtering
 appears to be more effective with an individual database
 per user.)


-- 
/-\
| Michael Barnes [EMAIL PROTECTED] |
| UNIX Systems Administrator  |
| College of William and Mary |
| Phone: (757) 879-3930   |
\-/


Re: no dbs present

2004-09-26 Thread JP Kelly
Yes I see that during regular spam scanning the bayes_db is working.
Thanks for all your effort!
SpamAssassin ROCKS!
On 25 Sep 2004, at 6:42 PM, Theo Van Dinter wrote:
That's the debug output from the initial get everything going 
internal
message run.  Don't worry about it. :)
-
Jon-Paul Kelly
A11 SA TEX
[EMAIL PROTECTED]
web hosting
http://www.jpkvideo.net