Learn SpamAssassins about new spam messages
Before starting, by using your mail client move all spam messages to a custom folder named Junk and then you can scan that folder as Junk/Spam.

sa-learn -p /home/USER/.spamassassin/user_prefs --spam /var/vmail/DOMAIN.TLD/ACCOUNT/.Junk/{cur,new}

By default, SpamAssassins will deny messages or save them in the folder /var/vmail/DOMAIN.TLD/ACCOUNT/.Spam/

Learn SpamAssassins about NOT spam messages
Before starting, by using your mail client move all valid messages to a custom folder named Seen and then scan it with --ham, example:

sa-learn -p /home/USER/.spamassassin/user_prefs --ham /var/vmail/DOMAIN.TLD/ACCOUNT/.Seen/{cur,new}

Don't forget to replace USER, DOMAIN.TLD, and ACCOUNT
Example for mailbox john@testaccount.com owned by system user testacc:

sa-learn -p /home/testacc/.spamassassin/user_prefs --spam /var/vmail/testaccount.com/john/.Junk/{cur,new}

More info about SpamAssassins
https://spamassassin.apache.org/full/3.1.x/doc/sa-learn.html