aboutsummaryrefslogtreecommitdiffstats
path: root/roles/dovecot/files/etc/dovecot/sieve/report-ham.sieve
diff options
context:
space:
mode:
Diffstat (limited to 'roles/dovecot/files/etc/dovecot/sieve/report-ham.sieve')
-rw-r--r--roles/dovecot/files/etc/dovecot/sieve/report-ham.sieve15
1 files changed, 15 insertions, 0 deletions
diff --git a/roles/dovecot/files/etc/dovecot/sieve/report-ham.sieve b/roles/dovecot/files/etc/dovecot/sieve/report-ham.sieve
new file mode 100644
index 0000000..578e7b2
--- /dev/null
+++ b/roles/dovecot/files/etc/dovecot/sieve/report-ham.sieve
@@ -0,0 +1,15 @@
+require ["vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];
+
+if environment :matches "imap.mailbox" "*" {
+ set "mailbox" "${1}";
+}
+
+if string "${mailbox}" "Trash" {
+ stop;
+}
+
+if environment :matches "imap.email" "*" {
+ set "email" "${1}";
+}
+
+pipe :copy "report-ham.sh" [ "${email}" ];