From 1cbc53aed520aa7cc0635813c6c4befae493c339 Mon Sep 17 00:00:00 2001
From: Julien Moutinho <julm@sourcephile.fr>
Date: Sat, 4 Apr 2020 03:19:02 +0200
Subject: [PATCH] dovecot: improve list.sieve

---
 servers/mermet/dovecot/sieve/global/list.sieve | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/servers/mermet/dovecot/sieve/global/list.sieve b/servers/mermet/dovecot/sieve/global/list.sieve
index dc888ae..b049ee9 100644
--- a/servers/mermet/dovecot/sieve/global/list.sieve
+++ b/servers/mermet/dovecot/sieve/global/list.sieve
@@ -4,7 +4,11 @@ require [ "date", "fileinto", "mailbox", "variables" ];
 #if currentdate :matches "month" "*" { set "month" "${1}"; }
 
 if exists "X-MC-User" {
-  if header :matches "From" "*<*@*.*>*" {
+  if header :matches "From" "*<*@*.asso.fr>*" {
+    set "list"   "${2}";
+    set "domain" "${3}";
+  }
+  elsif header :matches "From" "*<*@*.*>*" {
     set "list"   "${2}";
     set "domain" "${3}";
   }
-- 
2.47.0