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?

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

Is there a way that we can check whether this is working? I have, for example, messages from Square Receipts after a sale is made on my website that are continually marked as Spam (SPF headers fail) despite me repeatedly moving them to my inbox and/or another non-Spam folder.

Are there logs for sa-learn that I can observe? Do I need to add it to a cron job like @swauzie mentioned above?

It appears that @daveteu runs sa-learn manually. Is that necessary?

There are many things that sa-learn never overcomes. The solution is either to make a filter for that sender or fix the the SPF issue so it doesn’t fail.