I've been reading the docs and the migration docs for hours, but the sieve config is a mess.
In 2.3.x I am using:
plugin { sieve = ~/.sieve sieve_dir = ~/.sieve_storage }
and this is how it looks in my home dir:
$ ls -la .sie*
lrwxrwxrwx 32 a b c d .sieve -> .sieve_storage/MailFilters.sieve .rw------- 0 a b c d .sieve.log .rw------- 17,414 a b c d 2025-07-08 03:00 .sieve.svbin
So How do I do the same in 2.4.x?
I've come so far as:
sieve_script personal { driver = file }
But then there are path, bin_path, active_path, name, and a bunch of other settings.
Sorry to be a little bit frustrated, but my old settings are not out of the ordinary (2 freaking parameters), but there is no documentation on how to migrate these 2 very simple settings to the new format. The upgrade docs explain the new var expansion and a matrix with old and new parameters. But this info is completely missing for sieve. The doc only points to "script storage". Really? You couldn't have added these 2 parameters to the old-new matrix? I am not asking you to do this for every single sieve parameter, but at least for the 2 or 3 most used ones.
Sorry for my rant, but I had to get it out there to not go insane.
Cheers, K. C.
-- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
/* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */
Am Samstag, 19. Juli 2025, 05:01:00 CEST schrieb Helmut K. C. Tessarek via dovecot:
I've been reading the docs and the migration docs for hours, but the sieve config is a mess.
In 2.3.x I am using:
plugin { sieve = ~/.sieve sieve_dir = ~/.sieve_storage }
and this is how it looks in my home dir:
$ ls -la .sie*
lrwxrwxrwx 32 a b c d .sieve -> .sieve_storage/MailFilters.sieve .rw------- 0 a b c d .sieve.log .rw------- 17,414 a b c d 2025-07-08 03:00 .sieve.svbin
So How do I do the same in 2.4.x?
I am not an expert here, as i only recently switched from cyrus to dovecot-2.4, but i have following structure
$ ls -ln .dovecot.s* lrwxrwxrwx 1 1000 100 17 Mai 19 17:25 .dovecot.sieve -> .sieve/USER.sieve -rw------- 1 1000 100 5116 Mai 21 10:56 .dovecot.sieve.log -rw------- 1 1000 100 1779 Jul 1 13:46 .dovecot.svbin $ ls -ln .sieve/ total 8 -rw------- 1 1000 100 1738 Jul 1 13:07 mysieve.sieve drwx------ 2 1000 100 6 Jul 11 14:30 tmp -rw------- 1 1000 100 266 Mai 19 17:25 USER.sieve
I never created "USER.sieve" or the link ".dovecot.sieve", this was done automatically when i activated my sieve script "mysieve.sieve" via an sieve editor.
and following config
sieve_script personal { path = ~/.sieve active_path = ~/.dovecot.sieve }
So i think it does translate to
old -> new
sieve -> active_path sieve_dir -> path
hope this is of any help.
regards, Paul
Hello Paul,
Thanks for your reply.
On 2025-07-19 03:38, Paul Zirnik via dovecot wrote:
I am not an expert here, as i only recently switched from cyrus to dovecot-2.4, but i have following structure
$ ls -ln .dovecot.s* lrwxrwxrwx 1 1000 100 17 Mai 19 17:25 .dovecot.sieve -> .sieve/USER.sieve -rw------- 1 1000 100 5116 Mai 21 10:56 .dovecot.sieve.log -rw------- 1 1000 100 1779 Jul 1 13:46 .dovecot.svbin $ ls -ln .sieve/ total 8 -rw------- 1 1000 100 1738 Jul 1 13:07 mysieve.sieve drwx------ 2 1000 100 6 Jul 11 14:30 tmp -rw------- 1 1000 100 266 Mai 19 17:25 USER.sieve
I never created "USER.sieve" or the link ".dovecot.sieve", this was done automatically when i activated my sieve script "mysieve.sieve" via an sieve editor.
This makes partly sense. The link always points to the activated sieve script. The .bin file is a binary "compiled" version of this script and recreated the first time it is accessed after making a change to the plain text sieve script.
The part that does not make sense is the USER.sieve script. You said you activated the mysieve.sieve script, in which case the link should point to it:
.dovecot.sieve -> .sieve/mysieve.sieve
If .dovecot.sieve points to the USER script, it means that this one is active and used.
Something seems off and I hope the devs can chime in here.
and following config
sieve_script personal { path = ~/.sieve active_path = ~/.dovecot.sieve }
So i think it does translate to
old -> new
sieve -> active_path sieve_dir -> path
hope this is of any help.
Yes, your migration matrix makes sense. I'm still a bit fuzzy about this USER.sieve script and why it was activated instead of the one that was actually activated. It's quite troubling and makes me nervous.
I'm currently still on 2.3.21 and rewrote my config file for when 2.4 hits my distro. This will be when F43 server is out, which is still a few months away.
I hope this mystery can be solved until then.
Thanks again for your detailed reply. It helped me a lot, although this USER.sieve script created more questions:
Where does it come from? Maybe another script storage type, e.g. "default", is setup in the config. Why was it activated instead of the correct script? (The default would be used when no personal script was created and activated, but as soon as you activate that script, the link should point to the selected and activated script.) Also, a default script should not be in your home directory. Weird. Default scripts cannot be seen by the user unless one configures it that way, but either way, the script does not exist in the uaer's sieve storgae dir.
Cheers, K. C.
P.S.: I go by KC, trying to avoid the Spaceballs Dark Helmet mixup.
-- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
/* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */
Am Sonntag, 20. Juli 2025, 00:07:56 CEST schrieb Helmut K. C. Tessarek via dovecot:
On 2025-07-19 03:38, Paul Zirnik via dovecot wrote:
I never created "USER.sieve" or the link ".dovecot.sieve", this was done automatically when i activated my sieve script "mysieve.sieve" via an sieve editor.
This makes partly sense. The link always points to the activated sieve script. The .bin file is a binary "compiled" version of this script and recreated the first time it is accessed after making a change to the plain text sieve script.
The part that does not make sense is the USER.sieve script. You said you activated the mysieve.sieve script, in which case the link should point to it:
.dovecot.sieve -> .sieve/mysieve.sieve
If .dovecot.sieve points to the USER script, it means that this one is active and used.
Yes, but you can have more than one active sieve script. The USER.sieve is some kind of distributor that activates all your active scripts
$ cat .sieve/USER.sieve
USER Management Script
This script includes the various active sieve scripts
it is AUTOMATICALLY GENERATED. DO NOT EDIT MANUALLY!
For more information, see http://wiki.kolab.org/KEP:14#USER
require ["include"];
include :personal "mysieve";
But if i review the header, it looks like it probably is related to KDE (kmail or sieveeditor) which i use. Maybe this is a KDE only thing ? I never digged into this, as it just works since ages :-)
regards, Paul
On 2025-07-20 02:44, Paul Zirnik via dovecot wrote:
Yes, but you can have more than one active sieve script. The USER.sieve is some kind of distributor that activates all your active scripts
Hmm, this is a rather complicated topic. Especially when there are global, default, before and/or after and personal scripts involved. e.g. the sieve command "keep" changes its behavior depending on in which script it is located. Then one has to look into precedence and order.
But when it comes to personal scripts, there can only be one active one.
$ cat .sieve/USER.sieve
USER Management Script
This script includes the various active sieve scripts
it is AUTOMATICALLY GENERATED. DO NOT EDIT MANUALLY!
For more information, seehttp://wiki.kolab.org/KEP:14#USER
require ["include"];
include :personal "mysieve";
But if i review the header, it looks like it probably is related to KDE (kmail or sieveeditor) which i use. Maybe this is a KDE only thing ? I never digged into this, as it just works since ages 🙂
This seems to be an interesting workaround for allowing multiple personal scripts.
But still, only the "distributor" file is active. So technically it is only one script that is active. Having multiple scripts can be hard to deal with, because you still need to write the rules depending on which script you are editing, since the rules are applied top to bottom. This can easily become a nightmare, but it's anyone's choice really.
However, this explains the USER file that includes your activated script. As you already mentioned, this is most likely the doing of your sieve client. But now at least it makes sense.
Thanks for clarifying this.
I am no longer nervous. ;-)
Cheers, K. C.
-- regards Helmut K. C. Tessarek KeyID 0x172380A011EF4944 Key fingerprint = 8A55 70C1 BD85 D34E ADBC 386C 1723 80A0 11EF 4944
/* Thou shalt not follow the NULL pointer for chaos and madness await thee at its end. */
participants (2)
-
Helmut K. C. Tessarek
-
Paul Zirnik