Hello,
I have a small problem with dovecot-lda. I am using Debian 12 Bookworm:
root@lnxmail01:~# dovecot --version 2.3.13 (89f716dc2)
Historically grown (probably still from sendmail times, long time ago) I always used procmail for local e-mail delivery. This also included the call for spamc for SpamAssassin.
I have now changed this and set up a route via sieve. There is a small script for this:
root@lnxmail01:~# cat /usr/lib/dovecot/sieve-filter/spamc-filter.sh #!/bin/bash
/usr/bin/spamc
My sieve configuration says (in extracts):
root@lnxmail01:~# head -12 ~meini/.dovecot.sieve ## Generated by Roundcube Webmail SieveRules Plugin ##
require ["body","comparator-i;ascii-numeric","copy","envelope","fileinto","imap4flags","include","regex","relational","spamtestplus","vacation","variables","spamtest"];
include :global "spamc";
# rule:[Spam] if spamtest :value "ge" :comparator "i;ascii-numeric" "5" { fileinto "Spam"; stop; }
In general, this has been working for many months without any problems. But sometimes the whole thing fails due to a timeout:
Jul 7 22:00:13 lnxmail01 dovecot:
lda(meini)<766014>
The worst thing is that the entire mail is lost (/dev/null)!
Then I tried to set the timeout higher (than the current 10 seconds):
root@lnxmail01:~# doveconf | grep -A 12 ^plugin plugin { sieve = file:~/sieve;active=~/.dovecot.sieve sieve_execute_exec_timeout = 60s sieve_extension_exec_timeout = 60s sieve_extensions = +vnd.dovecot.filter +spamtest +spamtestplus sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter sieve_filter_socket_dir = sieve-filter sieve_global = /usr/lib/dovecot/sieve-global sieve_plugins = sieve_extprograms sieve_spamtest_max_value = 5 sieve_spamtest_status_header = X-Spam-Level sieve_spamtest_status_type = strlen }
I have set both the values for "sieve_execute_exec_timeout" and "sieve_extension_exec_timeout" to 60 sec, but according to the log, this does not seem to affect the 10000 msec mentioned therein.
The SpamAssassin daemon has enough child processes to handle the requests (most of them were idle at the time of the error).
How can I configure that the external script gets more time for execution? And what can I do so that - should the script terminate contrary to expectations or be killed in the timeout - the mail is not lost but simply processed further?
Many thanks & best regards Meinhard