Most efficient way is to identify and list mailboxen in an account that contain "ham" or legitimate email to a file and run SA's "sa-learn" on that:
find ~/mail -type f > ~/sa-ham-mbox.list
Now edit list to make sure mailboxen contain 1) enough messages and 2)"ham" and run the learner:
sa-learn -D --showdots --mbox --ham -f ~/sa-ham-mbox.list
You can do the same for mailboxes you know contain spam. "man sa-learn" for more information.