These scripts and tools are provided to help you manage your Kopano system. They are provided as a free service for Kopano users, without warranty of any kind.
Please be aware that usage is at your own risk!
From Kopano Core 8.6 we will provide a kopano-spamd, which works in a different way, ie it does not learn or train directly instead writing the spam emls in a directory so you can use another script to handle these.
See https://jira.kopano.io/browse/KC-666 for more information.
Spam learning daemon for Kopano / SpamAssasin
Messages (if they do not have the X-Spam = YES flag) dragged into the Junk folder will be taught to SpamAssassin's sa-learn command.
Uses ICS for near realtime learning.
Tested on a system which also runs amavisd-new, hence the user for sa-learn is also amavis.
Add the following line to allow the Kopano user to only run /usr/bin/sa-learn --spam as the user amavis
kopano ALL=(amavis) NOPASSWD: /usr/bin/sa-learn --spam
Copy the provided spamd.cfg in /etc/kopano/.
If needed edit it to suit your needs.
Copy the kopano-spamd.py to /usr/local/bin/
Start the kopano-spamd.py, check /var/log/kopano/spamd.log to see if all went fine.
Now drag some Spam into your Junk box and check the log !