Ajout : roundcube.
[lhc/ateliers.git] / etc / dovecot / sieve / global.d / list.sieve
diff --git a/etc/dovecot/sieve/global.d/list.sieve b/etc/dovecot/sieve/global.d/list.sieve
new file mode 100644 (file)
index 0000000..d7ff6e7
--- /dev/null
@@ -0,0 +1,18 @@
+require
+ [ "date"
+ , "fileinto"
+ , "mailbox"
+ , "variables"
+ ];
+
+if currentdate :matches "year"  "*" { set "year"  "${1}"; }
+if currentdate :matches "month" "*" { set "month" "${1}"; }
+
+if exists "List-ID" {
+       if header :matches "List-ID" "*<*.*.*>*" {
+               set "list"   "${2}";
+               set "domain" "${3}";
+        }
+       fileinto :create "Lists.${domain}.${list}.${year}.${month}";
+       stop;
+ }