summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve
diff options
context:
space:
mode:
Diffstat (limited to 'pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve')
-rw-r--r--pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve14
1 files changed, 14 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve b/pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve
new file mode 100644
index 0000000..92ea3b9
--- /dev/null
+++ b/pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve
@@ -0,0 +1,14 @@
+require ["fileinto", "variables", "envelope"];
+
+if header :contains "X-Group-Mail" ["Yes", "YES", "1"] {
+ if header :contains "X-Spam-Flag" ["Yes", "YES", "1"] {
+ if envelope :matches :localpart "to" "*" {
+ fileinto "group/${1}/SPAM"; stop;
+ }
+ }
+ if address :is ["To"] "sales@florist.ru" {
+ fileinto "group/info/Orders";
+ }
+ stop;
+}
+keep;