Fiddled some more, and now the permission error is gone, but the following are still there ...
Jul 31 01:26:18 server dovecot[19120]: imap(
[email protected])<19235><wTvoi1/IDv5WYXhY>: program exec:/usr/local/bin/dovecot-sieve/rspamd-learn-ham.sh (19236): Terminated with non-zero exit code 1...