Kopano-spamd läuft nicht

Ich habe wie in https://kb.kopano.io/display/WIKI/Kopano-spamd beschrieben installiert
Wenn ich dann das script kopano-spamd.py von Hand starte kommt:
-bash: ./kopano-spamd.py: keine Berechtigung.
Muß ich in der spamd.cfg noch was ändern.
Installiert ist Kopano auf UCS alles grade in aktueller Version

Gruß
Chrissi

Wenn ich dann eine mail nach Junkmail verschiebe steht folgendes in der log:

2020-03-05 19:04:27,344 - spamd - ERROR - Traceback (most recent call last):
File “/usr/lib/python3/dist-packages/kopano/log.py”, line 103, in log_exc
try: yield
File “/usr/lib/python3/dist-packages/kopano_spamd/init.py”, line 83, in up date
self.learn(item, searchkey, True)
File “/usr/lib/python3/dist-packages/kopano_spamd/init.py”, line 106, in l earn
os.chown(emlfilename, uid, gid)
PermissionError: [Errno 1] Operation not permitted: ‘/var/lib/kopano/spamd/spam/ A9750B668F0A4F0D8DCD6C5C883D2D69.eml’

8.7.9?

Bitte einmal die Informationen aus https://wiki.z-hub.io/display/K4U/Debugging+Kopano+on+Univention#DebuggingKopanoonUnivention-Nativepackagedapps posten.

Das Skript aus dem ersten Post ist aber veraltet. Eine aktualisierte Version befindet sich im Paket Repository. Die zugehörige Doku gibt es unter https://documentation.kopano.io/kopanocore_administrator_manual/special_kc_configurations.html#configuring-kopano-spamd-for-automatic-spam-ham-learning

Zu den Versionen:
root@mail:~# dpkg -l | grep -w ‘kopano4ucs|kopano-server-packages|kopano-webapp|z-push-kopano’
ii kopano-server-packages 8.7.1.0-0+9.1 all Metapackage to install the entire Kopano Core stack
ii kopano-webapp 3.5.5.2276+93.1 all New and improved WebApp for Kopano
ii kopano-webapp-plugin-desktopnotifications 2.0.2.23+28.5 all Kopano WebApp Desktop notifications plugin
ii kopano-webapp-plugin-filepreviewer 2.1.0.26+20.6 all Kopano File previewer plugin
ii kopano-webapp-plugin-files 2.1.5.305+101.2 all Adds Files functionality to Kopano enabling access to WebDAV and other files backends.
ii kopano-webapp-plugin-filesbackend-owncloud 2.1.0.87+42.5 all Adds Owncloud specific functionality to Kopano Files plugin.
ii kopano-webapp-plugin-filesbackend-smb 2.1.0.50+31.5 all Adds Samba specific functionality to Kopano Files plugin.
ii kopano-webapp-plugin-folderwidgets 3.5.5.2276+93.1 all Kopano WebApp folder widgets plugin
rc kopano-webapp-plugin-gmaps 3.5.5.2276+93.1 all Kopano WebApp google maps plugin
ii kopano-webapp-plugin-intranet 0.1+14.3 all This plugin adds one or more buttons in the top menu bar which can be used to open a webpage inside Kopano WebApp.
ii kopano-webapp-plugin-mdm 2.1.1.109+38.3 all Kopano WebApp MDM plugin
ii kopano-webapp-plugin-pimfolder 3.5.5.2276+93.1 all Kopano WebApp personal inbox plugin
ii kopano-webapp-plugin-quickitems 3.5.5.2276+93.1 all Kopano WebApp quick items plugin
ii kopano-webapp-plugin-smime 2.2.1.223+22.6 all Kopano WebApp S/MIME plugin
ii kopano-webapp-plugin-spell 2.0.0.19+37.5 all Kopano WebApp Spellchecker plugin
ii kopano-webapp-plugin-spell-de-de 2.0.0.3+34.4 all Kopano WebApp Spellchecker German dictionary plugin
ii kopano-webapp-plugin-spell-en 2.0.0.1+34.4 all Kopano WebApp Spellchecker English dictionary plugin
ii kopano-webapp-plugin-spell-nl 2.0.0.1+35.4 all Kopano WebApp Spellchecker Dutch dictionary plugin
ii kopano-webapp-plugin-titlecounter 3.5.5.2276+93.1 all Kopano WebApp Titlecounter plugin
ii kopano-webapp-plugin-webappmanual 3.5.5.2276+93.1 all Kopano WebApp Manual plugin
ii kopano4ucs 1.6.2 all Kopano4ucs integration package for Univention Corporate Server
ii kopano4ucs-app 1.6.2 all Package for UCS app specific logic
ii kopano4ucs-lib 1.6.2 all Library package for common Kopano4ucs functions
ii kopano4ucs-schema 1.6.2 all LDAP schema for the Kopano4ucs integration
ii kopano4ucs-udm 1.6.2 all UDM extensions for the Kopano4ucs integration
ii kopano4ucs-webapp 1.5.33 all Kopano4ucs kopano-webapp integration package for Univention Corporate Server
ii kopano4ucs-z-push 1.5.33 all Meta package for Z-Push installation
ii z-push-kopano 2.4.5+0-0 all Z-Push for Kopano
ii z-push-kopano-gab2contacts 2.4.5+0-0 all GAB sync into a contacts folder for Kopano
ii z-push-kopano-gabsync 2.4.5+0-0 all GAB sync for Kopano

Hoffe es hilft weiter
Die Doku hate ich gefunden war aber nicht sicher ob und wie ich Rechte für das Script änder muß

Es muss afair nur das gemacht werden, was in der Doku steht. Wie gesagt die Doku bezieht sich auf die paketierte Version des Skripts, nicht die veraltete Variante die aus der Knowledge Base heruntergeladen werden kann.

Wo kann ich die aktuelle Version laden.
Habe nur den link in der KnowledgeBase gefunden

univention-install kopano-spamd

Ja dann kommt aber das die neuste Version (8.7.1.0-0+9.1) schon installiert wäre
Aber weder unter usr/local/bin ist ein script noch wird unter /var/log/kopano/spamd.log was aufgezeichnet wenn ich eine mail in Junkmail verschiebe.

Oder muß ich woanders was ausführen ?

Gruß
Christian

Das Paket installiert einen daemon, welcher mittels Systemd gestartet wird. Ich würde prüfen, ob der Dienst läuft (systemctl status ..). Logging sollte in journald sein (journalctl -fu ..).

Hallo zusammen,

ich versuche gerade ebenfalls den Spamfilter zum “lernen” zu bekommen. Habe:

univention-install kopano-spamd

installiert. In der Doku steht:;

kopano-spamd by default runs in the user context of the user kopano (as defined by run_as_user and run_as_group). To succesfully run sa-learn make sure that the provided user is both part of the amavis group (so spamassasin can process the item), as well as local_admin_user within Kopano (so kopano-spamd has access to the users mailboxes).

Anschließend habe ich den Benutzer kopano der Gruppe amavis hinzugerfügt:

usermod -aG amavis kopano

aber das scheint nicht alles zu sein. Muss der Benutzer kopano noch in die Gruppe root oder was ist mit:

as well as local_admin_user within Kopano (so kopano-spamd has access to the users mailboxes).

gemeint?

Viele Grüße
Sven

Das meint dass wenn man einen anderen Nutzer als kopano verwendet wird, dieser in der server.cfg als local_admin_user eingetragen werden muss. Dies ist notwendig, damit das Skript auf die Postfächer der Nutzer zugreifen kann.

Also bei mir gehts leider noch immer nicht.
Habe ein System frisch aufgesetzt und wenn ich dann eine mail in Junkmail verschiebe kommt im journalctl:
Mär 09 11:50:00 mail kopano-spamd[548]: 2020-03-09 11:50:00,900 - spamd - ERROR - Traceback (most recent call last):
Mär 09 11:50:00 mail kopano-spamd[548]: File “/usr/lib/python3/dist-packages/kopano/log.py”, line 103, in log_exc
Mär 09 11:50:00 mail kopano-spamd[548]: try: yield
Mär 09 11:50:00 mail kopano-spamd[548]: File “/usr/lib/python3/dist-packages/kopano_spamd/init.py”, line 83, in update
Mär 09 11:50:00 mail kopano-spamd[548]: self.learn(item, searchkey, True)
Mär 09 11:50:00 mail kopano-spamd[548]: File “/usr/lib/python3/dist-packages/kopano_spamd/init.py”, line 106, in learn
Mär 09 11:50:00 mail kopano-spamd[548]: os.chown(emlfilename, uid, gid)
Mär 09 11:50:00 mail kopano-spamd[548]: PermissionError: [Errno 1] Operation not permitted: ‘/var/lib/kopano/spamd/spam/DC0126AB3DCA4C4E94AA926EB9083C07.eml’

Das letzte mal dass ich mich in der Tiefe mit spamd beschäftigt habe, lief es nach den Änderungen aus https://forum.kopano.io/post/11572 (welche inzwischen auch so im Handbuch zu finden sind).

Sollte es damit immer noch nicht gehen empfehle ich ein Ticket bei unserem Support aufzumachen.

Wenn ich das in: https://forum.kopano.io/post/11572 richtig verstehe soll man die spamd.cfg editieren. Die gibts bei mir aber an der Stelle nicht wenn der Dienst als daemon läuft.
Oder ist die .cfg woanders ?

Gruß
Christian

Mastodon