Hi, I've got a problem regarding migration of my bayes-db. Before
migrating, the files in the .spamassassin directory look like this:

[EMAIL PROTECTED] .spamassassin]# ls -al
total 707
drwx------    2 root     root         1024 Oct 10 16:45 .
drwxr-x---    8 root     root         1024 Oct 10 13:22 ..
-rw-------    1 root     root         1403 Oct 10 12:35 bayes_msgcount
-rw-r--r--    1 root     root        49152 Oct 10 16:33 bayes_seen
-rw-r--r--    1 root     root       663552 Oct 10 16:33 bayes_toks
-rw-r--r--    1 root     root         1969 Oct 10 16:21 user_prefs

As you can see, there are some entries in the bayes_toks file. I am
upgrading from 2.55 to 2.60 and my db-file has to be imported:

[EMAIL PROTECTED] .spamassassin]# sa-learn -D --import --dbpath
/root/.spamassassin
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting
PATH
debug: PATH included '/bin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/bin/X11', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/root/bin', which doesn't exist, dropping.
debug: Final PATH set to:
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X1
1:/usr/X11R6/bin
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: bayes: no dbs present, cannot scan: /root/.spamassassin/_toks
debug: Score set 0 chosen.
debug: Initialising learner
debug: bayes: 17142 untie-ing
debug: lock: 17142 created
/root/.spamassassin/bayes.lock.probivirix.atrete.ch.17142
debug: lock: 17142 trying to get lock on /root/.spamassassin/bayes with
0 retries
debug: lock: 17142 link to /root/.spamassassin/bayes.lock: link ok
debug: bayes: 17142 tie-ing to DB file R/W
/root/.spamassassin/bayes_toks
debug: bayes: 17142 tie-ing to DB file R/W
/root/.spamassassin/bayes_seen
debug: bayes: found bayes db version 0
debug: bayes: new db, set db version 2 and 0 tokens
upgrading to DB_File, please be patient:
/root/.spamassassin/old_bayes_seen
DB_File: copied 345 entries.
upgrading to DB_File, please be patient:
/root/.spamassassin/old_bayes_toks
DB_File: copied 17331 entries.
import successful, original files saved with "old" prefix
debug: bayes: 17142 untie-ing
debug: bayes: 17142 untie-ing db_toks
debug: bayes: 17142 untie-ing db_seen
debug: bayes: files locked, now unlocking lock
debug: unlock: 17142 unlink /root/.spamassassin/bayes.lock
debug: bayes: 17142 untie-ing

That still looks pretty good, doesn't it? After that, I do an ls:

[EMAIL PROTECTED] .spamassassin]# ls -al
total 1276
drwx------    2 root     root         1024 Oct 10 16:47 .
drwxr-x---    8 root     root         1024 Oct 10 13:22 ..
-rw-------    1 root     root         1403 Oct 10 12:35 bayes_msgcount
-rw-------    1 root     root        49152 Oct 10 16:47 bayes_seen
-rw-------    1 root     root       663552 Oct 10 16:47 bayes_toks
-rw-r--r--    1 root     root        49152 Oct 10 16:47 old_bayes_seen
-rw-r--r--    1 root     root       663552 Oct 10 16:47 old_bayes_toks
-rw-r--r--    1 root     root         1969 Oct 10 16:21 user_prefs

The files have exactly the same size. That looks a bit strange for me,
but I can live with that I think. Now I want to know if there is some
data in the db:

[EMAIL PROTECTED] .spamassassin]# sa-learn -D --dump
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting
PATH
debug: PATH included '/bin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/bin/X11', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/root/bin', which doesn't exist, dropping.
debug: Final PATH set to:
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X1
1:/usr/X11R6/bin
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: bayes: no dbs present, cannot scan: /root/.spamassassin/_toks
debug: Score set 0 chosen.
debug: Initialising learner
Use of uninitialized value in numeric lt (<) at
/usr/lib/perl5/site_perl/5.8.0/Mail/SpamAssassin/BayesStore.pm line
1281.
0.000          0          0          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: current
scan-count
0.000          0          0          0  non-token data: last expiry
atime
debug: bayes: 17145 untie-ing
debug: bayes: 17145 untie-ing db_toks
debug: bayes: 17145 untie-ing

Ok, it's empty and the db-version is 0. I think that should be 2? It is
not, so I try a rebuild:

[EMAIL PROTECTED] .spamassassin]# sa-learn -D --rebuild
debug: Score set 0 chosen.
debug: running in taint mode? yes
debug: Running in taint mode, removing unsafe env vars, and resetting
PATH
debug: PATH included '/bin', keeping.
debug: PATH included '/sbin', keeping.
debug: PATH included '/usr/bin', keeping.
debug: PATH included '/usr/sbin', keeping.
debug: PATH included '/usr/local/bin', keeping.
debug: PATH included '/usr/local/sbin', keeping.
debug: PATH included '/usr/bin/X11', keeping.
debug: PATH included '/usr/X11R6/bin', keeping.
debug: PATH included '/root/bin', which doesn't exist, dropping.
debug: Final PATH set to:
/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/usr/bin/X1
1:/usr/X11R6/bin
debug: using "/usr/share/spamassassin" for default rules dir
debug: using "/etc/mail/spamassassin" for site rules dir
debug: using "/root/.spamassassin/user_prefs" for user prefs file
debug: bayes: no dbs present, cannot scan: /root/.spamassassin/_toks
debug: Score set 0 chosen.
debug: Initialising learner
debug: Initialising learner
debug: Syncing Bayes journal and expiring old tokens...
debug: lock: 17146 created
/root/.spamassassin/.lock.probivirix.atrete.ch.17146
debug: lock: 17146 trying to get lock on /root/.spamassassin/ with 0
retries
debug: lock: 17146 link to /root/.spamassassin/.lock: link ok
debug: bayes: 17146 tie-ing to DB file R/W /root/.spamassassin/_toks
debug: bayes: 17146 tie-ing to DB file R/W /root/.spamassassin/_seen
debug: bayes: found bayes db version 0
debug: bayes: new db, set db version 2 and 0 tokens
debug: Syncing complete.
debug: bayes: 17146 untie-ing
debug: bayes: 17146 untie-ing db_toks
debug: bayes: 17146 untie-ing db_seen
debug: bayes: files locked, now unlocking lock
debug: unlock: 17146 unlink /root/.spamassassin/.lock

Why does "bayes: no dbs present, cannot scan: /root/.spamassassin/_toks"
appear? Sure, there is no file called _toks! But now, look at this:

[EMAIL PROTECTED] .spamassassin]# ls -al
total 1292
drwx------    2 root     root         1024 Oct 10 16:50 .
drwxr-x---    8 root     root         1024 Oct 10 13:22 ..
-rw-------    1 root     root        12288 Oct 10 16:50 _seen
-rw-------    1 root     root        12288 Oct 10 16:50 _toks
-rw-------    1 root     root         1403 Oct 10 12:35 bayes_msgcount
-rw-------    1 root     root        49152 Oct 10 16:47 bayes_seen
-rw-------    1 root     root       663552 Oct 10 16:47 bayes_toks
-rw-r--r--    1 root     root        49152 Oct 10 16:47 old_bayes_seen
-rw-r--r--    1 root     root       663552 Oct 10 16:47 old_bayes_toks
-rw-r--r--    1 root     root         1969 Oct 10 16:21 user_prefs


Hey created the _seen and _toks files without the bayes prefix. And
somehow spamassassin does even recognize this files as working:

[EMAIL PROTECTED] .spamassassin]# sa-learn --dump
0.000          0          2          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

As you can see, he checks the new small files with version 2. These are
the _ files without bayes prefix. Does anybody have an idea to fix this
or where the problem could be?

Thank you for your help

Marco Schnüriger, Switzerland



-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
SourceForge.net hosts over 70,000 Open Source Projects.
See the people who have HELPED US provide better services:
Click here: http://sourceforge.net/supporters.php
_______________________________________________
Spamassassin-talk mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/spamassassin-talk

Reply via email to