Hai,
I use this setup on debian stretch with spamassassin and this works great.
Small side note, i use Spamassassin and Bayes in MariaDB (mysql).
setup found here:
https://p5r.uk/blog/2017/spamassassin-with-mariadb.html
my steps:
get the source of kopano-spamd and put them in /usr/local/bin
imo, should be in sbin, but lets ignore that for now.
create the systemd file : /etc/systemd/system/kopano-spamd.service
[Unit]
Description=Kopano Core Spamd (Community)
After=kopano-server.service kopano-gateway.service mariadb.service mysql.service
Wants=kopano-server.service kopano-gateway.service mariadb.service mysql.service
[Service]
Type=simple
Environment=LC_ALL=C LANG=C
ExecStart=/usr/local/bin/kopano-spamd.py -F
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
In /usr/local/bin/kopano-spamd.py.
change the first line to :
#!/usr/bin/env python2
change the “learncmd” in the CONFIG= part.
I changed the user/group to kopano and spamassassin to debian-spamd.
CONFIG = {
'run_as_user': Config.string(default="kopano"),
'run_as_group': Config.string(default="kopano"),
'learncmd': Config.string(default="/usr/bin/sudo -u debian-spamd /usr/bin/sa-learn --spam")
}
I used spamassassing with clamav so change that to amavis.
Dont forget to allow the amavis user in your spamassassin folders,
This is not needed when you run in SQL setup with spamassassin/amavis.
i did also notice a few python dependecies that i was missing.
that one or more of these fixed my issue.
python-configobj python-linecache2 python-traceback2 python-tracer
Greetz,
Louis