@ckruijntjens and what was now the solution? My problem is on the kopano-spamd process and you mixed your problems with inotify also in this topic why i lost a little the overview here.
On my Debian 9 Server:
If i choose a mail in mail inbox to sort it in the junk mail folder i get this messages in
2019-01-12 08:17:57,330 - spamd - INFO - Learning message as SPAM, entryid: 00000000A497753E7B1B4CE3894BB06ABB7C1F450100000005000000D451EC976A324DCAA23AF88AB788EAD800000000
2019-01-12 08:17:57,356 - spamd - ERROR - Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/kopano/log.py", line 103, in log_exc
File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 83, in update
self.learn(item, searchkey, True)
File "/usr/lib/python3/dist-packages/kopano_spamd/__init__.py", line 106, in learn
os.chown(emlfilename, uid, gid)
PermissionError: [Errno 1] Operation not permitted: '/var/lib/kopano/spamd/spam/9DFD4A4E633343C081465B7B8EDBCBE4.eml'
i installed the python 3 deamon via
apt-get install python3-daemon.
I have spamassassin, clamav and amavis running that’s why i assigned kopano to the amavis group via
gpasswd -a kopano amavis.
i can execute this command
sudo -H -u kopano chown kopano:amavis /var/lib/kopano/spamd/spam/9DFD4A4E633343C081465B7B8EDBCBE4.eml
so the rights should be correct, or?
So, what could it be?