Subfolder in sieve not working as expected

Kees van Vloten keesvanvloten at
Mon Nov 15 22:38:00 UTC 2021

On 15-11-2021 23:04, dovecot at wrote:
>> On 11-15-2021 3:46 pm, Kees van Vloten wrote:
>> I am trying to move incoming mails into subfolders with this sieve 
>> script:
>> require ["fileinto", "variables", "mailbox"];
>> if header :matches "Delivered-To" "*@*"
>> {
>>     fileinto :create "INBOX/${2}";
>> }
> I am not using variables and my folders are pre-created. But just to 
> give you a starting point, this is what works using maildir++ format 
> with default directory layout.
> require ["fileinto"];
> # rule:[Dovecot]
> if header :contains "sender" ""
> {
> fileinto "INBOX.Dovecot";
> }

I have seen that working in the past :-)
I switched to LAYOUT=fs recently because of the limitations of the dot 
as a folder separator (now I can have the domain-name as a folder-name).
I found a nice description about folder and namespace issues here:

But somehow the sieve implementation does not seem to work properly with 
What a good approach to further analyze this issue?

More information about the dovecot mailing list