On 2011-07-29 16:16, monolit939 wrote:



Axb wrote:

On 2011-07-29 15:50, monolit939 wrote:


Axb wrote:

On 2011-07-29 15:03, monolit939 wrote:


Axb wrote:

On 2011-07-29 11:14, monolit939 wrote:

Hello,

I have found test which says the change of type of Spamassassin
database
can
increase performance almost three times (from Berkeley DB format to
SDBM
format). I want to ask you if somebody has some experience with
conversion
of standard Spamassassin bayes database.

I have found just this
http://wiki.mailscanner.info/doku.php?id=documentation:anti_spam:spamassassin:bayes:sdbm&rev=1269508492
guide , but it describes solution for mailscanner...

stop spamd

sa-learn --backup>    /tmp/bayes_export

add to local.cf

bayes_store_module           Mail::SpamAssassin::BayesStore::SDBM


sa-learn --restore /tmp/bayes_export

test change:

spamassassin -D --lint 2>&1 | grep -i bayes


if you see no errors

restart spamd

ls /path/to/bayes shows

bayes.mutex
bayes_seen.dir
bayes_seen.pag
bayes_toks.dir
bayes_toks.pag


h2h






Hello,

I have problems with conversion from Berkeley DB to SDBM. I followed
steps
you wrote...

/etc/init.d/spamassassin stop
su mail -c 'sa-learn --backup>    /tmp/bayes_export'
add 'bayes_store_module           Mail::SpamAssassin::BayesStore::SDBM'
to
/etc/mail/spamassassin/local.cf
su mail -c 'sa-learn --restore /tmp/bayes_export'
OUTPUT: ERROR: Bayes restore returned an error, please re-run with -D
for
more information
su mail -c 'sa-learn -D --restore /tmp/bayes_export'
OUTPUT:

<SNIPPED>

file /var/mail/.spamassassin/*
/var/mail/.spamassassin/auto-whitelist:       Berkeley DB (Hash,
version
8,
native byte-order)
/var/mail/.spamassassin/auto-whitelist.mutex: ASCII text
/var/mail/.spamassassin/bayes_journal:        ASCII text
/var/mail/.spamassassin/bayes.mutex:          ASCII text
/var/mail/.spamassassin/bayes_seen:           Berkeley DB (Hash,
version
8,
native byte-order)
/var/mail/.spamassassin/bayes_seen.dir:       empty
/var/mail/.spamassassin/bayes_seen.pag:       empty
/var/mail/.spamassassin/bayes_toks:           Berkeley DB (Hash,
version
9,
native byte-order)
/var/mail/.spamassassin/bayes_toks.dir:       empty
/var/mail/.spamassassin/bayes_toks.pag:       data
/var/mail/.spamassassin/mnt:                  setgid directory
/var/mail/.spamassassin/ol:                   setgid directory
/var/mail/.spamassassin/spamassassin.zip:     Zip archive data, at
least
v1.0 to extract
/var/mail/.spamassassin/user_prefs:           ASCII English text

As you can see, database files were not converted to SDBM, they are
still
the Berkeley DB type. Do you have some clue now? Or should I post some
other
output or log?

hmm....pls run the backup&   restore as root.

then, also as root:

spamassassin -D --lint 2>&1 | grep -i bayes

and show us the output.
you can change ownership later






Hello,

it will be problem, because when I use:
sa-learn --backup>   /tmp/bayes_export
I get:
ls -l /tmp/bayes_export
-rw-r--r-- 1 root root 77 2011-07-29 15:37 /tmp/bayes_export # the file
has
just 77B
Content of the file is:
v       3       db_version # this must be the first line!!!
v       0       num_spam
v       0       num_nonspam


BUT when I use:
su mail -c 'sa-learn --backup>   /tmp/bayes_export'
I get:
   ls -l /tmp/bayes_export
-rw-r--r-- 1 mail mail 35434634 2011-07-29 15:27 /tmp/bayes_export #the
file
has more than 35MB!

I'm guessing you don't have the path to bayes in local.cf which is why
root fails as it doesn't find your active bayes files

for example:

local.cf
bayes_path /var/lib/bayes/bayes







Hello,

I added to /etc/mail/spamassassin/local.cf this line:
bayes_path /var/mail/.spamassassin
As you could notice from my previous posts - spamassassin database files are
placed in path /var/mail/.spamassassin.

I stopped spamd and then I started:
  sa-learn --backup>  /tmp/bayes_export

The resolution is the same - 77B file with content I uploaded in my previous
post.

Do you have any suggetions?

wrong!

http://spamassassin.apache.org/full/3.3.x/doc/Mail_SpamAssassin_Conf.txt

see "bayes_path"

in your case:
bayes_path /var/mail/.spamassassin/bayes

Reply via email to