Enable spmassassin to learn from what you mark as spam

I’m receiving a lot of spam, my email address seems to be known very well.
When I flag en email to be spam it is moved to the Spam folder.
Although Spamassassin does a great job by itself, I needed a way to tell Spamassassin to check what is in Spam folders and to learn from it.

I have added a cron job every hours to do that learning:
0 * * * * /usr/bin/sa-learn -p ~/.spamassassin/user_prefs --spam /home/user-data/mail/mailboxes///.Spam/{cur,new} >/dev/null 2>&1

That works now all good, and I’m wondering if there is a cleaner way to do that?
Mail-in-a-Box is already using some scheduled tasks, where are they and how can I add that task?
Thanks!

MiaB is already configured to run sa-learn on all mail that is moved either from the inbox to the spam folder or from the spam folder to the inbox.

1 Like