Kopano universal spam retrainer
-
Hi all,
I’ve ported our Zarafa spam retrainer to Kopano, it can be found here: https://github.com/psy0rz/kopano-dspam
I renamed to to kopano-dspam to prevent conflicting with the kopano-spamd. Also included is an example script to use for dspam.
This system is a bit more flexible and intelligent: It calls your retraining command directly, instead of dumping files in a directory.
Because of this it can also call an “untrain” script if the user made a mistake and move the mail back again.
By default the logging is on level 6, so you should get very detailed logging about whats going on:
2018-08-03 11:06:19,663 - dspam - INFO - spam_user: psy, folder: 'Inbox', subject: 'Got High Blood Pressure? Then Don???t Take THIS (Increases Stroke Risk by 248%)', spam_id: 5a1f2c2f68521785918732, detected_as_spam: True, retrained: False, in_spamfolder: False, CONCLUSION: moved from spam: retraining as innocent 2018-08-03 11:06:19,669 - dspam - DEBUG - Starting: [u'/etc/kopano/userscripts/kopano-dspam-retrain', 'psy', '5a1f2c2f68521785918732', 'innocent', ''] 2018-08-03 11:06:19,735 - dspam - DEBUG - Command exited with code 0
I hope this is usefull to someone, maybe the Kopano core team could even extend their version to support the same functionality as well.