Tobias Leupold
2021-Jul-05 14:29 UTC
Deleting an active sieve script leaves sieve unfunctional
Dear devs, I noticed this using Dovecot 2.3.7.2, set up on a newly created Ubuntu 20.04 server. If I delete a sieve script via KMail's managesieve interface, and the script is active, it leaves sieve unfunctional afterwards. What's happening is this: Dovecot creates a USER.sieve script containing all active scripts, e. g.: require ["include"]; include :personal "some-script"; include :personal "some-other-script"; Now if I delete "some-script", it's actually deleted, but USER.sieve is not updated (and still contains 'include :personal "some-script";'). So next time an email is filtered, this happens: mail log: Jul 5 15:20:01 server dovecot: lda(user at domain)<123456> <xxxxxxxxxxxxxxxxxxxxxx>: sieve: Failed to compile script `/srv/sieve/user at domain/active-script.sieve' (view user logfile `/srv/sieve/user at domain/active-script.sieve.log' for more information) active-script.sieve.log: sieve: info: started log at Jul 05 14:57:54. USER: line 12: error: included personal script 'some_script' does not exist. USER: error: validation failed. So, to avoid this, one has to FIRST deactivate the respectice script, so that USER.sieve is updated and THEN delete the script. Or to manually fix USER.sieve on the server, which is surely not what's intended. So the question is now: Is this a KMail bug, a Doveceot bug, or is the server misconfigured?! Thanks for all help! Cheers, Tobias
dovecot at ptld.com
2021-Jul-05 16:46 UTC
Deleting an active sieve script leaves sieve unfunctional
> On 07-05-2021 10:29 am, Tobias Leupold wrote: > > So, to avoid this, one has to FIRST deactivate the respectice script, > so that > USER.sieve is updated and THEN delete the script. Or to manually fix > USER.sieve on the server, which is surely not what's intended.Curious, can you also fix the situation by just removing the symlink pointing to the non existent script?
Benny Pedersen
2021-Jul-05 16:58 UTC
Deleting an active sieve script leaves sieve unfunctional
On 2021-07-05 16:29, Tobias Leupold wrote:> So the question is now: Is this a KMail bug, a Doveceot bug, or is the > server > misconfigured?!in roundcube one would create another filter-set, with no filter-rules in, then one set the filter-set with no rules in to be default, this will disable sieve, reason is that it must always be atleast one filter-set active, but its not required to have rules in a filter set hope this works
Oscar del Rio
2021-Jul-05 18:47 UTC
Deleting an active sieve script leaves sieve unfunctional
On 2021-07-05 10:29 a.m., Tobias Leupold wrote:> > ?? require ["include"]; > ?? ?? include :personal "some-script"; > ?? include :personal "some-other-script"; > > Now if I delete "some-script", it's actually deleted, but USER.sieve > is not > updated (and still contains 'include :personal "some-script";'). > > active-script.sieve.log: > > ?? sieve: info: started log at Jul 05 14:57:54. > ?? USER: line 12: error: included personal script 'some_script' does not > ?????? exist. > ?? USER: error: validation failed. > > > So the question is now: Is this a KMail bug, a Doveceot bug, or is the > server > misconfigured?! >IMHO the client (KMail) should take care of it. Perhaps it could also add the "optional" flag in the "include" statement include :personal :optional "some-script"; https://datatracker.ietf.org/doc/html/rfc6609> 3.2.? Control Structure "include" > > ????? Usage:? include [LOCATION] [":once"] [":optional"] <value: string> > ????????????? LOCATION = ":personal" / ":global" > > The ":optional" parameter indicates that the script may be missing. > Ordinarily, an implementation MUST generate an error during execution > if an "include" command specifies a script that does not exist. When > ":optional" is specified, implementations MUST NOT generate an error > for a missing script, and MUST continue as if the "include" command > had not been present.