##local.cf:
use_bayes 1
bayes_path /etc/mail/spamassassin/bayes
bayes_file_mode 0664
#### end
run "sa-learn" in order to learn for HAM (good mail) and SPAM (bad mail):
sa-learn --showdots --ham /path/to/maildir/with/ham
sa-learn --showdots --spam /path/to/maildir/with/spam
if you use mbox format instead of maildir format you will have to add "--mbox" to sa-learn parameters:
sa-learn --mbox --showdots --ham /path/to/mbox/with/ham
sa-learn --mbox --showdots --spam /path/to/mbox/with/spam
also make sure that the user spamassassin runs with has r/w access to /etc/mail/spamassassin and to /etc/mail/spamassassin/bayes* files
hope it helps