spamassassin  uses bayesian filters (think of this as a form of artificial intelligence) that can learn about what sort of emails are spam (bad) and what sort are ham (good). The key to this is a tool called sa-learn which you run against mailbox files that either contain only ham or only spam emails. This allows Spamassassin to learn which emails you think are spam. Spamassassin uses several files to store this information, kept in a hidden directory (.spamassassin) 

Spamassassin with amavis uses the .spamassassin directory in the Amavis working directory. On debian I found this to be in /var/lib/amavis/ 

So let's assume the inbox of user USER is cleanly refined wanted mail and ll the spam has been sorted to the Junk folder. Theexample fits for a dovecot imap with Maildir and teaches Spamassassin how to sort spam from ham:

sa-learn --dbpath /var/lib/amavis/.spamassassin --dir --spam -u amavis /home/USER/Maildir/.Junk/cur
sa-learn --dbpath /var/lib/amavis/.spamassassin --dir --ham  -u amavis /home/USER/Maildir/cur


(Page 1 of 1, totaling 1 entries)