How to train spamassassin

Hi Zammad Team and Community

I am aware that the handling of spam is a server issue and not Zammad’s problem.

We have configured spamassassin with many modules down to the smallest datail and for emails that are not publicly viewable, we have been able to filter out almost all spam.

For the publicly visible e-mail addresses that are integrated into Zammad, however, unfortunately a lot of spam mails still end up in the Zammad inbox.

In order to actively improve this, spamassassin must be able to see spam and ham in order to learn.

Does anyone already have a script, or at least a good idea, to move mails that are tagged as spam in Zammad to the spam folder on the server for spamassassin?

Or maybe more easy, it already would help, if I could download once all eml Files for Tickets marked as Spam, that I could run the traincommand for spamassassin manualy. Since there are thousend of spam mails, this should already help a lot.