Sieve: fileinto a subfolder of inbox

Krisztián Szegi k.git at mszk.eu
Fri Dec 2 17:21:50 UTC 2022


2 Dec 2022 18:16:43 dovecot at ptld.com:

>> I'm trying to write a sieve script that moves emails to a *subfolder* of the inbox.
>> My script:
>> require ["envelope", "fileinto", "mailbox"];
>> if anyof( address "to" "support at domain.cc",
>>           address "cc" "support at domain.cc",
>>           envelope "to" "support at domain.cc" ) {
>>   fileinto :create "INBOX.support";
>> }
>> But this creates a new "support" folder BESIDE the inbox, not INSIDE it.
> 
> 
> Mine looks like this:
>      if anyof (header :contains "sender" "@dovecot.org", header :contains "to" "redacted at example.com")
>      {
>          fileinto "INBOX.Dovecot";
>      }
> 
> 
> I notice your rule has ":create" which might be why its always creating a new folder.
> Try the rule without the ":create"
Hi!

See here for the relevant stuff.
Basically you haven' passed "LAYOUT=fs" to mail_location
So you need to use "." for hierarchical separator.

I presume there IS some advantage for the default Maildir++ format, but I don't know what that is...


More information about the dovecot mailing list