I have been suffering with really poor performance for a week or so sa-learn processes killing the box and think I have finally figured it out.
The sa-learn processes seemed to be processing deleted mail. I access the mail from my Mac over imap and the mail app uses “Bin” as the mail folder name for deleted mail, I believe dovecot/spamassasin was processing all my deleted mail as Ham !
I updated /etc/dovecot/conf.d/99-local-spamd.conf and added bin to the trash line:
I believe bin is a default for millions of iphone/mac users, I really don’t think i can force them to change their configs
I will keep an eye on it and patch after each update. I hoped it might help someone else who starts having the same performance impacting issue.
I guess Junk would be classed as a ham folder and not spam too. Other mail clients may well use other names for these slightly special mail folders, food for thought