dovecot: fix sieve rules for sr.ht
authorJulien Moutinho <julm@sourcephile.fr>
Mon, 30 Aug 2021 12:08:59 +0000 (14:08 +0200)
committerJulien Moutinho <julm@sourcephile.fr>
Tue, 31 Aug 2021 14:07:11 +0000 (16:07 +0200)
hosts/mermet/dovecot/sieve/global/list.sieve

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