From 0210f08d89fd6d6b4669a5b8aebc910bcc9244cf Mon Sep 17 00:00:00 2001 From: Julien Moutinho Date: Mon, 2 Sep 2013 16:19:14 +0200 Subject: [PATCH] Correction : filtres des listes de courriels plus fins. --- etc/dovecot/sieve/global.d/list.sieve | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/etc/dovecot/sieve/global.d/list.sieve b/etc/dovecot/sieve/global.d/list.sieve index d7ff6e7..39f5ce5 100644 --- a/etc/dovecot/sieve/global.d/list.sieve +++ b/etc/dovecot/sieve/global.d/list.sieve @@ -9,10 +9,26 @@ if currentdate :matches "year" "*" { set "year" "${1}"; } if currentdate :matches "month" "*" { set "month" "${1}"; } if exists "List-ID" { - if header :matches "List-ID" "*<*.*.*>*" { + if header :matches "List-ID" "*<*.heureux-cyclage.org>*" { + set "list" "${2}"; + set "domain" "LHC"; + } + elsif header :matches "List-ID" "*<*.*.cyclocoop.org>*" { + set "list" "${2}+${3}"; + set "domain" "cyclocoop"; + } + elsif header :matches "List-ID" "*<*.cyclocoop.org>*" { + set "list" "${2}"; + set "domain" "cyclocoop"; + } + elsif header :matches "List-ID" "*<*.*.*.*>*" { + set "list" "${2}"; + set "domain" "${4}"; + } + elsif header :matches "List-ID" "*<*.*.*>*" { set "list" "${2}"; set "domain" "${3}"; } - fileinto :create "Lists.${domain}.${list}.${year}.${month}"; + fileinto :create "Listes+${domain}+${list}+${year}+${month}"; stop; } -- 2.20.1