bayes: cannot open bayes databases /home/user/.spamassassin/bayes_* R/W: tie failed: No such file or directory

2009-07-12 Thread Admin

Hi there,

Any clues how I can fix the following error?
sa-learn is failing

$ sa-learn --no-sync --spam --mbox ~/mail/Spam
bayes: cannot open bayes databases /home/user/.spamassassin/bayes_* R/O: 
tie failed:
bayes: cannot open bayes databases /home/user/.spamassassin/bayes_* R/O: 
tie failed: Bad file descriptor
bayes: cannot open bayes databases /home/user/.spamassassin/bayes_* R/W: 
tie failed: No such file or directory

Learned tokens from 0 message(s) (1 message(s) examined)
ERROR: the Bayes learn function returned an error, please re-run with -D 
for more information



Cheers,

Noah


Re: bayes: cannot open bayes databases /home/user/.spamassassin/bayes_* R/W: tie failed: No such file or directory

2009-07-12 Thread Benny Pedersen

On Sun, July 12, 2009 21:04, Admin wrote:

 $ sa-learn --no-sync --spam --mbox ~/mail/Spam

ls -l ~/mail/Spam
ls -l /mail/Spam

 bayes: cannot open bayes databases /home/user/.spamassassin/bayes_* R/O:
 tie failed:

does the dir .spamassassin exists with the same user ?

have you set some path global where it needed to be in just user_prefs ?

spamassassin 21 -D --lint | less

to see


-- 
xpoint



R/O: tie failed: Permission denied

2008-08-12 Thread Hungry Snail

hi Guys,

I have recently moved out mail server to new hardware.

It is setup exactly the same way (an identical mirror), yet I am getting the
following warnings in my spamd.log.

Tue Aug 12 15:13:36 2008 [6247] warn: bayes: cannot open bayes databases
/etc/mail/spamassassin/spamdb/bayes_* R/O: tie failed: Permission denied
Tue Aug 12 15:13:36 2008 [6247] warn: bayes: cannot open bayes databases
/etc/mail/spamassassin/spamdb/bayes_* R/O: tie failed: Permission denied


The strange thing is, it is marking emails as spam like it should be, and if
I sa-learn a message as spam it correctly shows as having worked when i run
sa-learn --dump magic the 'nspam' number shows as having inreased.

Any ideas :)

Cheers
-- 
View this message in context: 
http://www.nabble.com/R-O%3A-tie-failed%3A-Permission-denied-tp18945254p18945254.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.



Re: R/O: tie failed: Permission denied

2008-08-12 Thread Michael Scheidell


 From: Hungry Snail [EMAIL PROTECTED]
 Date: Tue, 12 Aug 2008 07:21:01 -0700 (PDT)
 To: users@spamassassin.apache.org
 Subject: R/O: tie failed: Permission denied
 
 
 hi Guys,
 
 I have recently moved out mail server to new hardware.
 
 It is setup exactly the same way (an identical mirror), yet I am getting the
 following warnings in my spamd.log.
 
 Tue Aug 12 15:13:36 2008 [6247] warn: bayes: cannot open bayes databases
 /etc/mail/spamassassin/spamdb/bayes_* R/O: tie failed: Permission denied
 Tue Aug 12 15:13:36 2008 [6247] warn: bayes: cannot open bayes databases
 /etc/mail/spamassassin/spamdb/bayes_* R/O: tie failed: Permission denied

Probably a permission problem :-)

'move to new hardware'. Took disk out, put in in new hardware? Or
tarball/extrct? Scp? Rsync? Dump / reload?
Check to make sure the userid's, password file, groups, group permissions
are still the same.

-- 
Michael Scheidell, CTO
|SECNAP Network Security
Winner 2008 Network Products Guide Hot Companies
FreeBSD SpamAssassin Ports maintainer

_
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com
_


Re: R/O: tie failed: Permission denied

2008-08-12 Thread Hungry Snail



Michael Scheidell wrote:
 
 
 
 From: Hungry Snail [EMAIL PROTECTED]
 Date: Tue, 12 Aug 2008 07:21:01 -0700 (PDT)
 To: users@spamassassin.apache.org
 Subject: R/O: tie failed: Permission denied
 
 
 hi Guys,
 
 I have recently moved out mail server to new hardware.
 
 It is setup exactly the same way (an identical mirror), yet I am getting
 the
 following warnings in my spamd.log.
 
 Tue Aug 12 15:13:36 2008 [6247] warn: bayes: cannot open bayes databases
 /etc/mail/spamassassin/spamdb/bayes_* R/O: tie failed: Permission denied
 Tue Aug 12 15:13:36 2008 [6247] warn: bayes: cannot open bayes databases
 /etc/mail/spamassassin/spamdb/bayes_* R/O: tie failed: Permission denied
 
 Probably a permission problem :-)
 
 'move to new hardware'. Took disk out, put in in new hardware? Or
 tarball/extrct? Scp? Rsync? Dump / reload?
 Check to make sure the userid's, password file, groups, group permissions
 are still the same.
 
 -- 
 Michael Scheidell, CTO
|SECNAP Network Security
 Winner 2008 Network Products Guide Hot Companies
 FreeBSD SpamAssassin Ports maintainer
 
 _
 This email has been scanned and certified safe by SpammerTrap(r). 
 For Information please see http://www.spammertrap.com
 _
 
 
Thanks for the reply,

Well I installed everything on the new server and then just copied across
the mail folders, configuration files and of course the spamdb.

The permissions of the files are identical on both servers, and they are
both set to run as root (probally something to be frowned upon, but it
worked ok on the old server).

even the passwd file looks identical.


-- 
View this message in context: 
http://www.nabble.com/R-O%3A-tie-failed%3A-Permission-denied-tp18945254p18946110.html
Sent from the SpamAssassin - Users mailing list archive at Nabble.com.



Re: R/O: tie failed: Permission denied

2008-08-12 Thread Michael Scheidell
Copying thigs across doesn't always preserve permissions.
For cp command, you would need the '-p' option. Same for scp or rcp.
rsync, would be -a option.

Most likely permissions problems. Since the error message says 'Permission
denied'

Look at permissions on the files AND the directory, and parent directory and
parent directory.

-- 
Michael Scheidell, CTO
|SECNAP Network Security
Winner 2008 Network Products Guide Hot Companies
FreeBSD SpamAssassin Ports maintainer


_
This email has been scanned and certified safe by SpammerTrap(r). 
For Information please see http://www.spammertrap.com
_


Re: tie failed

2007-02-22 Thread John Fleming

Feb 21 22:26:10 Luke spamd[5590]: spamd: setuid to elizabeth succeeded
Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
/var/.spamassassin/bayes_* R/O: tie failed: Permission denied


1) are you using bayes_path ?
2) have you set bayes_file_mode 0777 in your local.cf?


YES YES


If you use bayes_path in a multi-user environment, you *MUST* set
bayes_file_mode 0777 in local.cf.

Also, make sure that /var/.spamassassin has world rwx privileges.


Thanks Matt, but it's critical to note that it only happens SOMETIMES.  For 
example, the headers on your message to me included the expected line:


X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,TW_RW
autolearn=ham version=3.1.7

My spam is being detected and the headers have the appropriate Bayes lines, 
BUT when watching the mail log, I saw an occasional tie failed message.  I 
don't see how it could be a permissions issue if it's intermittent? 
THANKS - John





Re: tie failed

2007-02-22 Thread John Fleming


- Original Message - 
From: David Morton [EMAIL PROTECTED]

To: Jim Knuth [EMAIL PROTECTED]
Cc: John Fleming [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, February 22, 2007 2:03 AM
Subject: Re: tie failed

Could someone please translate this to n00bese with helpful
suggestions/comments?  It doesn't happen with all messages.  I just 
noticed

this while tailing the mail log.  THANKS - John



Feb 21 22:26:10 Luke spamd[5590]: spamd: setuid to elizabeth succeeded
Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
/var/.spamassassin/bayes_* R/O: tie failed: Permission denied


That path looks fishy to me too, does user elizabeth have a valid home 
directory?


YES.

As a newbie, I need to know exactly what the tie failed msg means and when 
did it fail?  IOW, is the issue that Bayes cannot be utilized for 
determining if a msg is spam, or does that part work OK but tokens cannot be 
written in the autolearn process?


IOW, my Bayes is detecting the spam properly[at least most of the time]:

X-Spam-Status: Yes, score=136.7 required=5.0 
tests=BAYES_99,DNS_FROM_RFC_POST,

FORGED_RCVD_HELO,FROM_HAS_MIXED_NUMS,MSGID_FROM_MTA_ID,
RAZOR2_CF_RANGE_51_100,RAZOR2_CF_RANGE_E4_51_100,
RAZOR2_CF_RANGE_E8_51_100,RAZOR2_CHECK,RCVD_IN_BL_SPAMCOP_NET,
SARE_SUB_CASH_CHAR,SARE_SUB_ENC_ISO2022JP,URIBL_AB_SURBL,URIBL_BLACK,
URIBL_JP_SURBL,URIBL_OB_SURBL,URIBL_SBL,URIBL_SC_SURBL,URIBL_WS_SURBL
autolearn=spam version=3.1.7

(And it says it autolearned, so maybe this is just one of the ones that 
worked OK??)


I also see an occasional message header that includes 
autolean=unavailable - It that what ends up in the messages where the tie 
fails??  I don't get the intermittent nature of this.


Thanks - John



Re: tie failed

2007-02-22 Thread Matt Kettler
David Morton wrote:
 Matt Kettler wrote:

  Also, make sure that /var/.spamassassin has world rwx privileges.
 
  
  Doesn't this create a potential or real giant type security risk?
  Well, regardless, the current user SA is running as has to be able to
  read and write to the bayes DB. It has to write to the journal publish
  atime updates at the very least. It will also want to be able to perform
  autolearning, journal sync, and oportunistic expiry, unless you've
  disabled those.

  Without that, bayes cannot function.

  Does it have a security risk? Yes, there's the possibility of someone
  exploiting it for local-user privilege escalation. AFAIK, SA's bayes
  code is very careful about how it accesses files to mitigate this risk,
  but there's always room for mistakes.

 The point is that no one should be writing directly to /var/ like
 that,  by most
 filesystem standards it should be /var/*something*/.spamassassin,  maybe
 /var/lib/spamassassin, or /var/spool/spamassassin/ or since the user
 bound as
 user elizabeth, maybe /home/elizabeth ??  but /var is not right.


Erm, you do realize .spamassassin is a DIRECTORY, not a file, right?

How is /var/*something*/.spamassassin/bayes_toks different from
/var/.spamassassin/bayes_toks?

I'd agree with you on style points, but from a security perspective
there's no difference.





Re: tie failed

2007-02-22 Thread Daryl C. W. O'Shea

John Fleming wrote:

I also see an occasional message header that includes 
autolean=unavailable - It that what ends up in the messages where the 
tie fails??  I don't get the intermittent nature of this.


Yes.  Learning is slow.  If two spamd children try to learn at the same 
time only one will get a lock to write to the database.  The child who 
doesn't get the lock (tie fails) will report that autolearn is unavailable.


Daryl



Re: tie failed

2007-02-22 Thread David B Funk
On Thu, 22 Feb 2007, Daryl C. W. O'Shea wrote:

 John Fleming wrote:

  I also see an occasional message header that includes
  autolean=unavailable - It that what ends up in the messages where the
  tie fails??  I don't get the intermittent nature of this.

 Yes.  Learning is slow.  If two spamd children try to learn at the same
 time only one will get a lock to write to the database.  The child who
 doesn't get the lock (tie fails) will report that autolearn is unavailable.

But doesn't bayes_learn_to_journal help this?


-- 
Dave Funk  University of Iowa
dbfunk (at) engineering.uiowa.eduCollege of Engineering
319/335-5751   FAX: 319/384-0549   1256 Seamans Center
Sys_admin/Postmaster/cell_adminIowa City, IA 52242-1527
#include std_disclaimer.h
Better is not better, 'standard' is better. B{


Re: tie failed

2007-02-22 Thread Daryl C. W. O'Shea

David B Funk wrote:

On Thu, 22 Feb 2007, Daryl C. W. O'Shea wrote:


John Fleming wrote:


I also see an occasional message header that includes
autolean=unavailable - It that what ends up in the messages where the
tie fails??  I don't get the intermittent nature of this.

Yes.  Learning is slow.  If two spamd children try to learn at the same
time only one will get a lock to write to the database.  The child who
doesn't get the lock (tie fails) will report that autolearn is unavailable.


But doesn't bayes_learn_to_journal help this?


If he enabled it, sure, it'd help reduce the frequency that this occurs. 
 There's still only a single journal, though, so it's still possible 
that a spamd child process won't get a tie on it during busy periods.


Daryl


Re: tie failed

2007-02-22 Thread David B Funk
On Thu, 22 Feb 2007, Daryl C. W. O'Shea wrote:

 David B Funk wrote:
  On Thu, 22 Feb 2007, Daryl C. W. O'Shea wrote:
 
  Yes.  Learning is slow.  If two spamd children try to learn at the same
  time only one will get a lock to write to the database.  The child who
  doesn't get the lock (tie fails) will report that autolearn is unavailable.
 
  But doesn't bayes_learn_to_journal help this?

 If he enabled it, sure, it'd help reduce the frequency that this occurs.
   There's still only a single journal, though, so it's still possible
 that a spamd child process won't get a tie on it during busy periods.

Hmm, as the journal file is an append-only write I had assumed that
it didn't need locking, thus theoretically simultaneous updates
could be possible.

-- 
Dave Funk  University of Iowa
dbfunk (at) engineering.uiowa.eduCollege of Engineering
319/335-5751   FAX: 319/384-0549   1256 Seamans Center
Sys_admin/Postmaster/cell_adminIowa City, IA 52242-1527
#include std_disclaimer.h
Better is not better, 'standard' is better. B{


Re: tie failed

2007-02-22 Thread Theo Van Dinter
On Thu, Feb 22, 2007 at 03:30:24PM -0500, Daryl C. W. O'Shea wrote:
 If he enabled it, sure, it'd help reduce the frequency that this occurs. 
  There's still only a single journal, though, so it's still possible 
 that a spamd child process won't get a tie on it during busy periods.

The journal has no locking, nor is it tie()'ed, it's just an open().  fyi.

-- 
Randomly Selected Tagline:
 Leela: Okay, this has gotta stop. I'm going to remind Fry of his 
humanity the way only a woman can. 
  Professor: You're going to do his laundry?


pgpsxKvvUER9w.pgp
Description: PGP signature


Re: tie failed

2007-02-22 Thread Daryl C. W. O'Shea

David B Funk wrote:

On Thu, 22 Feb 2007, Daryl C. W. O'Shea wrote:


David B Funk wrote:

On Thu, 22 Feb 2007, Daryl C. W. O'Shea wrote:


Yes.  Learning is slow.  If two spamd children try to learn at the same
time only one will get a lock to write to the database.  The child who
doesn't get the lock (tie fails) will report that autolearn is unavailable.

But doesn't bayes_learn_to_journal help this?

If he enabled it, sure, it'd help reduce the frequency that this occurs.
  There's still only a single journal, though, so it's still possible
that a spamd child process won't get a tie on it during busy periods.


Hmm, as the journal file is an append-only write I had assumed that
it didn't need locking, thus theoretically simultaneous updates
could be possible.


Yeah... I had (hopefully temporarily) envisioned a pretty retarded 
journaling method.  Like Theo pointed out, there's no locking the 
journal.  I plead sleep deprivation.


Daryl



tie failed

2007-02-21 Thread John Fleming
Could someone please translate this to n00bese with helpful 
suggestions/comments?  It doesn't happen with all messages.  I just noticed 
this while tailing the mail log.  THANKS - John


Feb 21 22:26:10 Luke spamd[5590]: spamd: setuid to elizabeth succeeded
Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases 
/var/.spamassassin/bayes_* R/O: tie failed: Permission denied
Feb 21 22:26:10 Luke spamd[5590]: spamd: processing message 
[EMAIL PROTECTED] for elizabeth:1006
Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases 
/var/.spamassassin/bayes_* R/O: tie failed: Permission denied
Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases 
/var/.spamassassin/bayes_* R/O: tie failed: Permission denied
Feb 21 22:26:10 Luke postfix/smtpd[6346]: disconnect from 
somedomain.com[204.16.32.68]
Feb 21 22:26:22 Luke spamd[5590]: spamd: clean message (1.5/5.0) for 
elizabeth:1006 in 12.3 seconds, 2567 bytes. 



Re: tie failed

2007-02-21 Thread Jim Knuth
Heute (22.02.2007/04:31 Uhr) schrieb John Fleming,

 Could someone please translate this to n00bese with helpful 
 suggestions/comments?  It doesn't happen with all messages.  I just noticed
 this while tailing the mail log.  THANKS - John

 Feb 21 22:26:10 Luke spamd[5590]: spamd: setuid to elizabeth succeeded
 Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
 /var/.spamassassin/bayes_* R/O: tie failed: Permission denied
 Feb 21 22:26:10 Luke spamd[5590]: spamd: processing message 
 [EMAIL PROTECTED] for elizabeth:1006
 Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
 /var/.spamassassin/bayes_* R/O: tie failed: Permission denied
 Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
 /var/.spamassassin/bayes_* R/O: tie failed: Permission denied
   ^^
 Feb 21 22:26:10 Luke postfix/smtpd[6346]: disconnect from 
 somedomain.com[204.16.32.68]
 Feb 21 22:26:22 Luke spamd[5590]: spamd: clean message (1.5/5.0) for
 elizabeth:1006 in 12.3 seconds, 2567 bytes. 


You do not seen? Check your permissions.


-- 
Viele Gruesse, Kind regards,
 Jim Knuth
 [EMAIL PROTECTED]
 ICQ #277289867
--
Zufalls-Zitat
--
Das letzte Wort des Anstreichers: Aber sicher ist das GerĂ¼st stabil.
--
Der Text hat nichts mit dem Empfaenger der Mail zu tun
--
Virus free. Checked by NOD32 Version 2074 Build 9119  21.02.2007



Re: tie failed

2007-02-21 Thread Matt Kettler

John Fleming wrote:
 Could someone please translate this to n00bese with helpful
 suggestions/comments?  It doesn't happen with all messages.  I just
 noticed this while tailing the mail log.  THANKS - John

 Feb 21 22:26:10 Luke spamd[5590]: spamd: setuid to elizabeth succeeded
 Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
 /var/.spamassassin/bayes_* R/O: tie failed: Permission denied

1) are you using bayes_path ?
2) have you set bayes_file_mode 0777 in your local.cf?

If you use bayes_path in a multi-user environment, you *MUST* set
bayes_file_mode 0777 in local.cf.

Also, make sure that /var/.spamassassin has world rwx privileges.




RE: tie failed

2007-02-21 Thread R Lists06

 
 1) are you using bayes_path ?
 2) have you set bayes_file_mode 0777 in your local.cf?
 
 If you use bayes_path in a multi-user environment, you *MUST* set
 bayes_file_mode 0777 in local.cf.
 
 Also, make sure that /var/.spamassassin has world rwx privileges.
 

Doesn't this create a potential or real giant type security risk?

 - rh

--
Robert - Abba Communications
   Computer  Internet Services
 (509) 624-7159 - www.abbacomm.net



Re: tie failed

2007-02-21 Thread Matt Kettler
R Lists06 wrote:
 1) are you using bayes_path ?
 2) have you set bayes_file_mode 0777 in your local.cf?

 If you use bayes_path in a multi-user environment, you *MUST* set
 bayes_file_mode 0777 in local.cf.

 Also, make sure that /var/.spamassassin has world rwx privileges.

 

 Doesn't this create a potential or real giant type security risk?
Well, regardless, the current user SA is running as has to be able to
read and write to the bayes DB. It has to write to the journal publish
atime updates at the very least. It will also want to be able to perform
autolearning, journal sync, and oportunistic expiry, unless you've
disabled those.

Without that, bayes cannot function.

Does it have a security risk? Yes, there's the possibility of someone
exploiting it for local-user privilege escalation. AFAIK, SA's bayes
code is very careful about how it accesses files to mitigate this risk,
but there's always room for mistakes.

Really, using a SQL based bayes is a much better idea for an environment
using a single bayes DB with multiple users accessing it. It's safer in
this regard, and significantly faster too.


Re: tie failed

2007-02-21 Thread David Morton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jim Knuth wrote:
 Heute (22.02.2007/04:31 Uhr) schrieb John Fleming,
 
 Could someone please translate this to n00bese with helpful 
 suggestions/comments?  It doesn't happen with all messages.  I just noticed
 this while tailing the mail log.  THANKS - John
 
 Feb 21 22:26:10 Luke spamd[5590]: spamd: setuid to elizabeth succeeded
 Feb 21 22:26:10 Luke spamd[5590]: bayes: cannot open bayes databases
 /var/.spamassassin/bayes_* R/O: tie failed: Permission denied

That path looks fishy to me too, does user elizabeth have a valid home 
directory?


- --
David Morton
Maia Mailguard- http://www.maiamailguard.com
Morton Software Design and Consulting - http://www.dgrmm.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF3UBcUy30ODPkzl0RAiBSAJ93qiphCb9RR93zueCwJyuVpBmB3QCfXSL/
pL5pJ6SKyyLj1uP1MfhngDU=
=yNYa
-END PGP SIGNATURE-


Re: tie failed

2007-02-21 Thread David Morton
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Matt Kettler wrote:

 Also, make sure that /var/.spamassassin has world rwx privileges.

 
 Doesn't this create a potential or real giant type security risk?
 Well, regardless, the current user SA is running as has to be able to
 read and write to the bayes DB. It has to write to the journal publish
 atime updates at the very least. It will also want to be able to perform
 autolearning, journal sync, and oportunistic expiry, unless you've
 disabled those.
 
 Without that, bayes cannot function.
 
 Does it have a security risk? Yes, there's the possibility of someone
 exploiting it for local-user privilege escalation. AFAIK, SA's bayes
 code is very careful about how it accesses files to mitigate this risk,
 but there's always room for mistakes.

The point is that no one should be writing directly to /var/ like that,  by most
filesystem standards it should be /var/*something*/.spamassassin,  maybe
/var/lib/spamassassin, or /var/spool/spamassassin/ or since the user bound as
user elizabeth, maybe /home/elizabeth ??  but /var is not right.


- --
David Morton
Maia Mailguard- http://www.maiamailguard.com
Morton Software Design and Consulting - http://www.dgrmm.net
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFF3UHHUy30ODPkzl0RAsmrAKCaD5VxMMRa1XsUOeIBHC+qMgm9gACcCL9m
5T1UbPdX8AvTAyjEfTVPR7Q=
=/0KG
-END PGP SIGNATURE-


Re: bayes tie failed

2005-05-13 Thread kmd
On 5/12/05, kmd [EMAIL PROTECTED] wrote:
 On 5/11/05, kmd [EMAIL PROTECTED] wrote:
  today i spent many hours building SA on perl 5.8.6, instead of the
  5.8.1 perl that is default installed on the mdk 9.2 linux box (it's
  very difficult to upgrade perl with rpm, it breaks things). so, im'
  running two perl versions basically now. i'm not a total linux wizard
  but i think i managed it: I compiled and installed perl 5.8.6, SA
  3.0.3 from cpan, compiled DB_file,... but unfortunately bayes will not
  function. running SA with the -D option gives:
 
  debug: bayes: 7926 tie-ing to DB file R/O /home/kmd/.spamassassin/bayes_toks
  Cannot open bayes databases /home/kmd/.spamassassin/bayes_* R/O: tie failed:
  debug: bayes: 7926 untie-ing DB file toks
  debug: Score set 1 chosen.
  ...
 
  i tried chmod 666 the bayes files, sa-learn --import, deleting the
  bayes db and relearning the ham/spam, it still won't work. my guess it
  is a librabry mismatch somewhere, but what exactly? i'm stuck i'm
  afraid (and a bit tired as well ;) )
 
  --
  kmd
 
 
 anyone? :\
 
 i'm really out of options here, sorry. yesterday i tried recompiling
 SA and DB_file to be sure. but i still get 'bayes tie failed' :( it's
 a bit stupid having SA running without the bayes test. i googled
 around but really i have no clue what i'm doing wrong. i don't see
 errors during compilation. then, why is bayes not working? please help
 me out with this. i spent many hours trying run SA with perl 5.8.6
 instead of 5.8.1.
 
 --
 kmd
 

i also see this: 

debug: open of AWL file failed: Cannot open auto_whitelist_path
/home/spamtrap/.spamassassin/auto-whitelist: Inappropriate ioctl for
device

anyone?


-- 
kmd


Re: bayes tie failed

2005-05-13 Thread kmd
On 5/12/05, kmd [EMAIL PROTECTED] wrote:
 On 5/12/05, kmd [EMAIL PROTECTED] wrote:
  On 5/11/05, kmd [EMAIL PROTECTED] wrote:
   today i spent many hours building SA on perl 5.8.6, instead of the
   5.8.1 perl that is default installed on the mdk 9.2 linux box (it's
   very difficult to upgrade perl with rpm, it breaks things). so, im'
   running two perl versions basically now. i'm not a total linux wizard
   but i think i managed it: I compiled and installed perl 5.8.6, SA
   3.0.3 from cpan, compiled DB_file,... but unfortunately bayes will not
   function. running SA with the -D option gives:
  
   debug: bayes: 7926 tie-ing to DB file R/O 
   /home/kmd/.spamassassin/bayes_toks
   Cannot open bayes databases /home/kmd/.spamassassin/bayes_* R/O: tie 
   failed:
   debug: bayes: 7926 untie-ing DB file toks
   debug: Score set 1 chosen.
   ...
  
   i tried chmod 666 the bayes files, sa-learn --import, deleting the
   bayes db and relearning the ham/spam, it still won't work. my guess it
   is a librabry mismatch somewhere, but what exactly? i'm stuck i'm
   afraid (and a bit tired as well ;) )
  
   --
   kmd
  
 
  anyone? :\
 
  i'm really out of options here, sorry. yesterday i tried recompiling
  SA and DB_file to be sure. but i still get 'bayes tie failed' :( it's
  a bit stupid having SA running without the bayes test. i googled
  around but really i have no clue what i'm doing wrong. i don't see
  errors during compilation. then, why is bayes not working? please help
  me out with this. i spent many hours trying run SA with perl 5.8.6
  instead of 5.8.1.
 
  --
  kmd
 
 
 i also see this:
 
 debug: open of AWL file failed: Cannot open auto_whitelist_path
 /home/spamtrap/.spamassassin/auto-whitelist: Inappropriate ioctl for
 device
 
 anyone?
 
 --
 kmd
 

never mind. i got fed up with cryptic problems over and over again and
deleted my attempts

and thanks for the overwhelming feedback! surely the greatest feature of SA!


-- 
kmd


Procmail reports Uninitialized value in DBM.pm and bayes_* R/O: tie failed

2005-05-04 Thread Mun Johl
Hi,

I'm new to SpamAssassin and am using:

   SpamAssassin : 3.0.3
   Perl : 5.8.2
   Berkeley DB  : 4.3.27
   Solaris  : 5.8

In my procmail logfile, I see a bunch of the messages printed below.  I
assumed this would be a common problem, but didn't find a resolution
during my searches.

I installed SpamAssassin for a single user.  I'm thinking there must be
compatibility issues or something between DB_File and DBM.pm?

-- Delimiter BEGIN 

Use of uninitialized value in concatenation (.) or string at 
~/lib/perl5/site_perl/5.8.2/Mail/SpamAssassin/BayesStore/DBM.pm line 261.
Use of uninitialized value in numeric ge (=) at 
~/lib/perl5/site_perl/5.8.2/Mail/SpamAssassin/BayesStore/DBM.pm line 1758.
Use of uninitialized value in numeric eq (==) at 
~/lib/perl5/site_perl/5.8.2/Mail/SpamAssassin/BayesStore/DBM.pm line 1758.
Use of uninitialized value in numeric ge (=) at 
~/lib/perl5/site_perl/5.8.2/Mail/SpamAssassin/BayesStore/DBM.pm line 1772.
Use of uninitialized value in numeric eq (==) at 
~/lib/perl5/site_perl/5.8.2/Mail/SpamAssassin/BayesStore/DBM.pm line 1772.
...

--- Delimiter END -


Procmail is also complaining as shown below--which may not be surprising
given the issue above?

-- Delimiter BEGIN 

Cannot open bayes databases /home/mj/.spamassassin/bayes_* R/O: tie failed: No 
such file or directory
Cannot open bayes databases /home/mj/.spamassassin/bayes_* R/O: tie failed: No 
such file or directory
uname: not super user
Cannot open bayes databases /home/mj/.spamassassin/bayes_* R/W: tie failed: No 
such file or directory

--- Delimiter END -

I would appreciate any insight that can be offered.

Regards,

-- 
Mun


Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format

2004-10-13 Thread Chris Weiss
I'm using SA in the environment described by Scott Vintinner at 
http://www.flakshack.com/anti-spam/ (Fairly-Secure Anti-SPAM Gateway 
Using OpenBSD, Postfix, Amavisd-new, SpamAssassin, Razor and DCC). 
Things had been running smoothly until I recent upgraded from v2.6 to 
3.0. The upgrade went well, except now I'm getting the following error:

Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie 
failed: Inappropriate file type or format

I've tried completely deleting and re-creating the bayes databases 
(using sa-learn clear followed by sa-learn on my various mailboxes), but 
am still getting the errors. I also made sure I'd installed DB_file (I'd 
read somewhere it was needed). Any idea where to look for the solution 
to this problem?

I'm also getting the following error regarding URIBL, but I'm fairly 
sure I dont have it set up correctly...

Failed to run URIBL_PH_SURBL SpamAssassin test, skipping:
   (Can't locate object method check_uridnsbl via package 
Mail::SpamAssassin::PerMsgStatus at 
/usr/local/libdata/perl5/site_perl/Mail/SpamAssassin/PerMsgStatus.pm 
line 2296, GEN10 line 377.
)

I'd greatly appreciate any constructive help on these issues...


Re: Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format

2004-10-13 Thread Matt Kettler
At 12:55 AM 10/13/2004 -0700, Chris Weiss wrote:
debug: config: SpamAssassin failed to parse line, skipping: rewrite_subject 1
debug: config: SpamAssassin failed to parse line, skipping: use_terse_report 0
debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1
debug: config: SpamAssassin failed to parse line, skipping: dcc_add_header 1
Fix the above errors. Those lines are invalid.
the rewrite_subject bit has been replaced, see UPGRADE
rewrite_subject 1
subject_tag SPAM(_SCORE_)
  becomes
rewrite_header Subject SPAM(_SCORE_)
auto_learn should be bayes_auto_learn. I don't think it's ever not had 
bayes in it's name

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) 
inhibited further callbacks
debug: bayes: 7110 tie-ing to DB file R/O 
/var/amavisd/.spamassassin/bayes_toks
Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie 
failed: Inappropriate file type or format
debug: bayes: 7110 untie-ing DB file toks
debug: Score set 0 chosen.
debug: bayes: 7110 tie-ing to DB file R/O 
/var/amavisd/.spamassassin/bayes_toks
Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie 
failed: Inappropriate file type or format
debug: bayes: 7110 untie-ing DB file toks
ERROR: Bayes dump returned an error, please re-run with -D for more 
information

Note that after running sa_learn --ham on all of my inboxes and sa-learn 
--spam on my junk folder, I end up with these files in my .spamassassin 
folder (during the install, I tried several gymnastics with sa-learn 
--import and --upgrade or something to that effect, hence the old_* files):
Um.. what are sa-learn --import and sa-learn --upgrade?  This is SA 3.0 
man.. Those arguments no longer exist.

Try running sa-learn -D --sync and see what happens. Thats the bayes DB 
upgrade command for SA 3.0.

When you ran sa-learn --clear, did it actually work and remove the files or 
reduce them to 0 bytes?

If the sync above doesn't work, and --clear doesn't truly wipe the files, 
use rm -f bayes_* and retrain.






Re: Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: tie failed: Inappropriate file type or format

2004-10-13 Thread Chris Weiss

Matt Kettler wrote:
At 12:55 AM 10/13/2004 -0700, Chris Weiss wrote:
debug: config: SpamAssassin failed to parse line, skipping: 
rewrite_subject 1
debug: config: SpamAssassin failed to parse line, skipping: 
use_terse_report 0
debug: config: SpamAssassin failed to parse line, skipping: auto_learn 1
debug: config: SpamAssassin failed to parse line, skipping: 
dcc_add_header 1

Fix the above errors. Those lines are invalid.
the rewrite_subject bit has been replaced, see UPGRADE
rewrite_subject 1
subject_tag SPAM(_SCORE_)
  becomes
rewrite_header Subject SPAM(_SCORE_)
auto_learn should be bayes_auto_learn. I don't think it's ever not had 
bayes in it's name

Will do, I'm just trying to figure out how to implement them in my 
environment (IE - some of the directives are fed via AmavisD). They 
should not be the cause of my problem either way -ya?

debug: plugin: Mail::SpamAssassin::Plugin::URIDNSBL=HASH(0x3cb7d078) 
inhibited further callbacks
debug: bayes: 7110 tie-ing to DB file R/O 
/var/amavisd/.spamassassin/bayes_toks
Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: 
tie failed: Inappropriate file type or format
debug: bayes: 7110 untie-ing DB file toks
debug: Score set 0 chosen.
debug: bayes: 7110 tie-ing to DB file R/O 
/var/amavisd/.spamassassin/bayes_toks
Cannot open bayes databases /var/amavisd/.spamassassin/bayes_* R/O: 
tie failed: Inappropriate file type or format
debug: bayes: 7110 untie-ing DB file toks
ERROR: Bayes dump returned an error, please re-run with -D for more 
information

Note that after running sa_learn --ham on all of my inboxes and 
sa-learn --spam on my junk folder, I end up with these files in my 
.spamassassin folder (during the install, I tried several gymnastics 
with sa-learn --import and --upgrade or something to that effect, 
hence the old_* files):

Um.. what are sa-learn --import and sa-learn --upgrade?  This is SA 
3.0 man.. Those arguments no longer exist.

Sorry, meant import and sync.
Try running sa-learn -D --sync and see what happens. Thats the bayes 
DB upgrade command for SA 3.0.

When you ran sa-learn --clear, did it actually work and remove the 
files or reduce them to 0 bytes?

Yes. It removed the files entirely. Running SA after with no bayes files 
gave the same error - I suppose that would point to it not being an 
actual file compatibility issue, but something inside SA failing 
(missing library or something)?

If the sync above doesn't work, and --clear doesn't truly wipe the 
files, use rm -f bayes_* and retrain.






Re: Bayes R/O tie failed with SA 3.0

2004-10-03 Thread Asif Iqbal
On Sat, Oct 02, 2004 at 03:10:56PM, Bob Proulx wrote:
 Asif Iqbal wrote:
  I just upgraded my SA from 2.63 to 3.0. I did the sa-learn --sync after
  the upgrade and the restarted spamd. Now I am seeing this error in the
  log
  
  @4000415f15ec35d6286c Cannot open bayes databases 
  /etc/mail/spamassassin/bayes_* R/O: tie failed: Permission denied
 
 You probably ran sa-learn as root instead of as the user that normally
 runs spamassassin.  That changed the ownership of the files to root.
 Find them.  Change them back to whatever user you are using to run as

Well according to my following setup

qmailq is the owner of spamd processses and has read/write permission on
bayes_* files through the spam group

(root)@qmail:/etc/mail/spamassassin# ls -al bayes_*
-rw-rw-r--   1 root spam   24576 Oct  2 21:33 bayes_seen
-rw-rw   1 root spam   90112 Oct  2 21:33 bayes_toks

(root)@qmail:/etc/mail/spamassassin# cat /etc/group | grep spam
spam::2111:qmailq,qscand

(root)@qmail:/etc/mail/spamassassin# cat /service/spamd/run
#!/bin/sh
exec 21
exec /usr/local/bin/spamd -m 20 -s stderr --syslog-socket=inet -u qmailq

(root)@qmail:/etc/mail/spamassassin# ps -ef | grep spamd
[...]
qmailq 19869 19843  0 16:47:46 ?0:00 /usr/local/bin/perl -T
/usr/local/bin/spamd -m 20 -s stderr --syslog-socket=ine
[...]

Not sure what else to look for

Thanks for the suggestions

 so that it can access those files.
 
 Bob

-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
...it said: Install Windows XP or better...so I installed Solaris...


Re: Bayes R/O tie failed with SA 3.0

2004-10-03 Thread Alex S Moore
On Sat, 2004-10-02 at 21:40 -0400, Asif Iqbal wrote:
 On Sat, Oct 02, 2004 at 03:10:56PM, Bob Proulx wrote:
 qmailq is the owner of spamd processses and has read/write permission on
 bayes_* files through the spam group
 
 (root)@qmail:/etc/mail/spamassassin# ls -al bayes_*
 -rw-rw-r--   1 root spam   24576 Oct  2 21:33 bayes_seen
 -rw-rw   1 root spam   90112 Oct  2 21:33 bayes_toks
 
 (root)@qmail:/etc/mail/spamassassin# cat /etc/group | grep spam
 spam::2111:qmailq,qscand
 

What about `ls -ld /etc/mail/spamassasin`?

Alex




RE: Bayes R/O tie failed with SA 3.0

2004-10-03 Thread Ray
I had the exact same problem.  I ran the sa-learn --sync as root instead of
the user I have in the spamd startup script.  In my case I have spamd -u
spamduser   So I just simply went to the bayes folder as root and did a
chown to make spamduser the owner of all the bayes files again, and
restarted spamd.


Ray Dzek
Network Operations Supervisor
Specialized Bicycle Components

-Original Message-
From: Asif Iqbal [mailto:[EMAIL PROTECTED] 
Sent: Saturday, October 02, 2004 2:02 PM
To: [EMAIL PROTECTED]
Subject: Bayes R/O tie failed with SA 3.0


Hi All

I just upgraded my SA from 2.63 to 3.0. I did the sa-learn --sync after the
upgrade and the restarted spamd. Now I am seeing this error in the log

@4000415f15ec35d6286c Cannot open bayes databases
/etc/mail/spamassassin/bayes_* R/O: tie failed: Permission denied
@4000415f15f0255793f4 2004-10-02 20:56:06 [19857] i: clean message
(0.0/5.0) for [EMAIL PROTECTED]:7794 in 3.7 seconds, 2187 bytes.
@4000415f15f0255cfeac 2004-10-02 20:56:06 [19857] i: result: .  0 -
scantime=3.7,size=2187,mid=[EMAIL PROTECTED]
04.AD.QINTRA.COM,autolearn=failed

Has anyone else seen the same error?

Any help/suggestion to fix this issue is greatly appreciated


-- 
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
...it said: Install Windows XP or better...so I installed Solaris...



Re: Bayes R/O tie failed with SA 3.0

2004-10-02 Thread Alex S Moore
On Sat, 2004-10-02 at 17:01 -0400, Asif Iqbal wrote:
 I just upgraded my SA from 2.63 to 3.0. I did the sa-learn --sync after
 the upgrade and the restarted spamd. Now I am seeing this error in the
 log
 
 @4000415f15ec35d6286c Cannot open bayes databases 
 /etc/mail/spamassassin/bayes_* R/O: tie failed: Permission denied

Whichever user you had owning the bayes_* files before the upgrade has
changed.  Actually, the `sa-learn --sync` probably changed the
permissions.  Correct the permissions to what is appropriate for your
environment.

Alex