Hi @Plutopotamus,
We’re in the same boat
I use this GitHub - sahsanu/v-hestiacp-sieve: Autolearn spam and ham for Hestia CP Spamassassin
It basically adds rules to Dovecot so when the user moves a message to spam folder, it copies to a specified dir /var/mail/imapsieve_copy/spam/
and if the user moves a message from spam dir to another dir, Dovecot copies it to dir /var/mail/imapsieve_copy/ham
.
Later, a daily cron job launches a script that will execute sa-learn --spam
for messages in /var/mail/imapsieve_copy/spam
and sa-learn --ham
for messages in /var/mail/imapsieve_copy/ham
For a bit more info:
Keep in mind that Spamassassin won’t use any info learned (Bayes rules) till at least it gets data from 200 messages, so, well, you could use your ham and spam messages to train it and speed up the process. It’s usually better to train Spamassassin with more ham than spam messages.