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 ...