As per advice from this list, I have been re-using my bayes databases on several different servers running SA. On one of the servers though, the database is not accepted. I re-transferred them several times over ssh, to make sure they were not corrupted. The database files are in the correct location, with correct permissions and owned by the correct user:

# ls -l /var/spool/spamd/bayes/
total 5912
-rw-rw-rw- 1 spamd spamd 1310720 2016-02-09 08:42 bayes_seen
-rw-rw-rw- 1 spamd spamd 4739072 2016-02-09 08:43 bayes_toks

The version of SA on both the donor and receiving servers is 3.4.1.

When I try to learn a new message on the receiving server (where I moved the bayes files), I get the following error:

# su - spamd -c "/usr/bin/sa-learn -D --spam /New\ UnansweredSexHookup\ Request.eml"

<snip>

Feb 12 16:20:53.777 [12973] dbg: locker: mode is 438
Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: created /var/spool/spamd/bayes/bayes.lock.mdr-server.mdrinteriors.co.uk.12973 Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: trying to get lock on /var/spool/spamd/bayes/bayes with 0 retries Feb 12 16:20:53.778 [12973] dbg: locker: safe_lock: link to /var/spool/spamd/bayes/bayes.lock: link ok Feb 12 16:20:53.778 [12973] dbg: bayes: tie-ing to DB file R/W /var/spool/spamd/bayes/bayes_toks
Feb 12 16:20:53.779 [12973] dbg: bayes: untie-ing DB file toks
Feb 12 16:20:53.779 [12973] dbg: locker: safe_unlock: unlink /var/spool/spamd/bayes/bayes.lock bayes: cannot open bayes databases /var/spool/spamd/bayes/bayes_* R/W: tie failed: No such file or directory
Learned tokens from 0 message(s) (1 message(s) examined)
Feb 12 16:20:53.779 [12973] dbg: plugin: Mail::SpamAssassin::Plugin::Bayes=HASH(0x93106d0) implements 'learner_close', priority 0 ERROR: the Bayes learn function returned an error, please re-run with -D for more information at /usr/bin/sa-learn line 498.

Reply via email to