Hi If a sieve filter contains a rule if header :regex ["From"] ["@xxx.com","@yyy.pt"] { ??????? fileinto :create "ac"; } The mail should be copied to the folder ac and then proceed to other rules that a user might have or I understood the fileinto wrong? Using dovecot-pigeonhole-2.2.36-8.el7.x86_64
On 23-08-2022 11:44, Jo?o Silva wrote:> Hi > > If a sieve filter contains a rule > > if header :regex ["From"] ["@xxx.com","@yyy.pt"] { > ??????? fileinto :create "ac"; > } > > The mail should be copied to the folder ac and then proceed to other > rules that a user might have or I understood the > > fileinto > > wrong? > > Using dovecot-pigeonhole-2.2.36-8.el7.x86_64 >I use it like this, and it works for me: if address :is "From" "sender at domain" { fileinto :create "some_mail_folder"; stop; } Almost 20 years ago, I figured out that I *need* the "stop;" line, but I don't remember why. -- Rob
On 8/23/22 03:44, Jo?o Silva wrote:> If a sieve filter contains a rule > > if header :regex ["From"] ["@xxx.com","@yyy.pt"] { > ??????? fileinto :create "ac"; > } > > The mail should be copied to the folder ac and then proceed to other > rules that a user might have or I understood the fileinto wrong?I just took a look at my fairly extensive sieve script that has been built by the managesieve plugin for the roundcube webmail server.? I don't often look at the script itself because that plugin lets me edit the script in a GUI. The fileinto command is used in almost every one of my rules.? It is not copying the message, it is moving the message to the destination folder.? Here is one of my rules: # rule:[blog] if header :contains ["To","cc"] "blog at elyograg.org" { ??????? fileinto "admin.blog"; ??????? stop; } There is an extension to sieve that adds a :copy option to certain commands like fileinto for situations where that is actually what you want to do.? Pigeonhole does support it: https://www.rfc-editor.org/rfc/rfc3894.html Thanks, Shawn