In any mailbox you can create two IMAP folders called:
All the spam messages that are not detected by the engine as spam (or even detected) can be dragged and dropped to the junk_learn folder. The engine will learn from them every night and will DELETE them automatically from the server.
All the clean messages that are detected as spam or are assigned with a high score can be copied to the ham_learn folder. Make sure that you do not move these messages because they are also DELETED every night.
You must train at least 200 ham AND 200 spam messages. If you train only spam, the Bayesian filter will not work.