I get this message when I try to train against my personal Junk folder (about 5K messages). If I just run zmtrainsa with no args then it seems to run without error.
This is the error:
reading message email@example.com@localhost.localdomain:1430 of 6304 (1346 header octets) . (2989 body octets) ...bayes: bayes db version 0 is not able to be used, aborting! at /opt/zimbra/zimbramon/lib/Mail/SpamAssassin/BayesStore/DBM.pm line 195.
bayes: cannot open bayes databases /opt/zimbra/amavisd/.spamassassin/bayes_* R/W: lock failed: File exists
Learned from 0 message(s) (1 message(s) examined).
ERROR: the Bayes learn function returned an error, please re-run with -D for more information
fetchmail: MDA returned nonzero status 17