Hello,
I have now adjusted the values accordingly:
root@lnxmail01:~# doveconf | grep -A 13 ^plugin plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_execute_exec_timeout = 60s sieve_extensions = +vnd.dovecot.filter +spamtest +spamtestplus sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter sieve_filter_exec_timeout = 60s sieve_filter_socket_dir = sieve-filter sieve_global = /usr/lib/dovecot/sieve-global sieve_pipe_exec_timeout = 60s sieve_plugins = sieve_extprograms sieve_spamtest_max_value = 5 sieve_spamtest_status_header = X-Spam-Level sieve_spamtest_status_type = strlen }
I will observe whether the problems continue to occur.
Nevertheless, I would like to know if there is a way to prevent the e-mails from being completely discarded if an error occurs.
The program /usr/lib/dovecot/sieve-filter/spamc-filter.sh is executed because there is an include in the file .dovecot.sieve: include :global “spamc”; This is sufficient to start the filter “spamc-filter.sh” (I got this from a guide on the Internet, but I can't find the link to it now).
The problem is that only spamc is started in the script and STDIN and STDOUT are connected to dovecot-lda. It would be easy to abort the call of spamc after X seconds (man 'timeout(1)'). But then the input provided by dovecot-lda and piped into spamc would be lost. You would therefore have to cache all input in the script that comes via STDIN in a file. If spamc is aborted, the script would have to recognize this and output the contents of this file again via STDOUT. spamc must be called using 'timeout' and the timeout used must be less than what was set for sieve_filter_exec_timeout. This would then save the mail from /dev/null.
Unfortunately, I currently see no other way to solve this problem.
Or does anyone have another idea how to tackle this issue?
Many thanks & best regards Meinhard