summaryrefslogtreecommitdiffstats
path: root/pigeonhole/tests/extensions/imap4flags/multiscript
diff options
context:
space:
mode:
Diffstat (limited to 'pigeonhole/tests/extensions/imap4flags/multiscript')
-rw-r--r--pigeonhole/tests/extensions/imap4flags/multiscript/fileinto.sieve4
-rw-r--r--pigeonhole/tests/extensions/imap4flags/multiscript/group-spam.sieve14
-rw-r--r--pigeonhole/tests/extensions/imap4flags/multiscript/sent-store.sieve7
-rw-r--r--pigeonhole/tests/extensions/imap4flags/multiscript/setflag.sieve3
-rw-r--r--pigeonhole/tests/extensions/imap4flags/multiscript/spam.sieve8
5 files changed, 36 insertions, 0 deletions
diff --git a/pigeonhole/tests/extensions/imap4flags/multiscript/fileinto.sieve b/pigeonhole/tests/extensions/imap4flags/multiscript/fileinto.sieve
new file mode 100644
index 0000000..94892a5
--- /dev/null
+++ b/pigeonhole/tests/extensions/imap4flags/multiscript/fileinto.sieve
@@ -0,0 +1,4 @@
+require "fileinto";
+require "mailbox";
+
+fileinto :create "folder";
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;
diff --git a/pigeonhole/tests/extensions/imap4flags/multiscript/sent-store.sieve b/pigeonhole/tests/extensions/imap4flags/multiscript/sent-store.sieve
new file mode 100644
index 0000000..cb21daa
--- /dev/null
+++ b/pigeonhole/tests/extensions/imap4flags/multiscript/sent-store.sieve
@@ -0,0 +1,7 @@
+require ["imap4flags"];
+
+if header :contains "X-Set-Seen" ["Yes", "YES", "1"] {
+ setflag "\\Seen";
+}
+
+keep;
diff --git a/pigeonhole/tests/extensions/imap4flags/multiscript/setflag.sieve b/pigeonhole/tests/extensions/imap4flags/multiscript/setflag.sieve
new file mode 100644
index 0000000..c992d19
--- /dev/null
+++ b/pigeonhole/tests/extensions/imap4flags/multiscript/setflag.sieve
@@ -0,0 +1,3 @@
+require "imap4flags";
+
+setflag "$label1 \\answered";
diff --git a/pigeonhole/tests/extensions/imap4flags/multiscript/spam.sieve b/pigeonhole/tests/extensions/imap4flags/multiscript/spam.sieve
new file mode 100644
index 0000000..9e1b6c3
--- /dev/null
+++ b/pigeonhole/tests/extensions/imap4flags/multiscript/spam.sieve
@@ -0,0 +1,8 @@
+require ["fileinto"];
+
+if header :contains "X-Spam-Flag" ["Yes", "YES", "1"] {
+ fileinto "SPAM";
+}
+keep;
+
+