dovecot/sieve: add support for sr.ht lists
authorJulien Moutinho <julm@sourcephile.fr>
Mon, 26 Jul 2021 03:02:24 +0000 (05:02 +0200)
committerJulien Moutinho <julm@sourcephile.fr>
Mon, 26 Jul 2021 03:02:24 +0000 (05:02 +0200)
hosts/mermet/dovecot/sieve/global/list.sieve

index e52e9f56cfa26da671fb6fb8c69f17ff01bb1ce4..064659c67996c78bfed44d28b54095997afc5496 100644 (file)
@@ -14,7 +14,13 @@ if exists "X-MC-User" {
   }
 }
 elsif exists "List-Id" {
-  if header :matches "List-Id" "*<*.*.*.*>*" {
+  if header :matches "List-Id" "*<*/*.lists.sr.ht>*" {
+    if allof (not string :is "${2}" "", not string :is "${3}" "")  {
+      fileinto :create "Listes+sr.ht+${2}+${3}";
+      stop;
+    }
+  }
+  elsif header :matches "List-Id" "*<*.*.*.*>*" {
     if allof (not string :is "${2}" "", not string :is "${3}" "", not string :is "${4}" "")  {
       fileinto :create "Listes+${4}+${3}+${2}";
       stop;