This is a fork of the official kopano-spamd. I have added spam unlearning and some more config options.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Christoph Haas f6dc89b55f Fixed default path in systemd script 2 years ago
startup Fixed default path in systemd script 2 years ago
LICENSE Initial commit 2 years ago
README.md Initial commit 2 years ago
kopano-spamd.py Ignore public folders, fixed error message in logs 2 years ago
spamd.cfg Initial commit 2 years ago

README.md

Spam learning daemon for Kopano / SpamAssasin

Original project: https://stash.kopano.io/projects/KSC/repos/kopano-spamd/browse

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.

It works the same way to unlearn messages from the inbox folder if they have the X-Spam header set to true.

Uses ICS for near realtime learning.

Tested on a system which also runs amavisd-new, hence the user for sa-learn is also amavis.

Also tested on a system runing mimedefang, hence the user for sa-learn is also defang.

Sudo setup

Add the following line to allow the Kopano user to only run /usr/bin/sa-learn --spam as the user amavis (or defang if you are using mimedefang)

kopano ALL=(amavis) NOPASSWD: /usr/bin/sa-learn --spam
kopano ALL=(amavis) NOPASSWD: /usr/bin/sa-learn --ham

Installation

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 !