So, there was actually one piece missing to fully solve this puzzle. For whatever reason, the guide I used back when I set up the scripts put "exec" in front of the actual command. Not sure what it does, but it's garbage in this scenario. As far as I read it somehow replaces bash with whatever you execute. Executing the command from rspamd-learn-spam.sh with the exec infront on a remote machine will terminate the remote session. So just removing that seems to have fixed all error messages (the IO error due to EOF can still happen, but it won't happen every time anymore). So it wasn't a permission issue or any issue with dovecot, just a bad command inside the script.
Thanks all for chiming in.
On 16.09.24 13:12, Richard wrote:
This actually helped.
So I'm not entirely sure when my method stopped working, but for all I can tell it used to work. Now this has changed. I've changed rspamd-learn-spam.sh to this:
#!/bin/sh exec /usr/bin/rspamc -h localhost:11333 -P
learn_spam Manually testing this now works better, so I'll just have to wait for the spam mail to be missed to test if this actually solves the issue. Can't be that long.
PS: rspamd for my config doesn't use socket files. But the needed port is the same that's written in /etc/rspamd/local.d/worker-normal.inc (and in /etc/rspamd/rspamd.conf in the worker "normal"{} section).