From a405a80438edaf479fd5f95625d62ef88d9263d5 Mon Sep 17 00:00:00 2001 From: Eric <514408+EricThi@users.noreply.github.com> Date: Thu, 15 Jun 2023 16:14:59 +0200 Subject: [PATCH] Create u_e-dovecot-sieve_filter.en.md --- .../Dovecot/u_e-dovecot-sieve_filter.en.md | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 docs/manual-guides/Dovecot/u_e-dovecot-sieve_filter.en.md diff --git a/docs/manual-guides/Dovecot/u_e-dovecot-sieve_filter.en.md b/docs/manual-guides/Dovecot/u_e-dovecot-sieve_filter.en.md new file mode 100644 index 000000000..8081b9299 --- /dev/null +++ b/docs/manual-guides/Dovecot/u_e-dovecot-sieve_filter.en.md @@ -0,0 +1,32 @@ +Here is just an example of Sieve rule. + +on your /mailbox, Tab "Filters". + +You can create "Add filter" and Select domain.tld and Prefilter. + +## Rule Example for matches To and redirect mail, mark as read and move mail on subfolder + +``` +require "fileinto"; +require "mailbox"; +require "variables"; +require "subaddress"; +require "envelope"; +require "duplicate"; +require "imap4flags"; + +if header :matches "To" "*mail@domain.tld*" { + redirect "anothermail@anotherdomain.tld"; + setflag "\\seen"; /* Mark mail as read */ + fileInto "INBOX/SubFolder"; /* Move mail on subfolder after */ +} else { + # The rest goes into INBOX + # default is "implicit keep", we do it explicitly here + keep; +} +``` +Keep Warning about From/To : if on source of your mail, you see firstname name : Your "if header" need to match all data +If you use ":is" to replace ":matches", you need to set the exact patern. + +[Examples rules Sieve](https://doc.dovecot.org/configuration_manual/sieve/examples/) +[IETF : Draft with examples](https://datatracker.ietf.org/doc/html/draft-happel-sieve-filter-rule-metadata-00)