From: Julien Moutinho Date: Mon, 2 Sep 2013 14:19:14 +0000 (+0200) Subject: Correction : filtres des listes de courriels plus fins. X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=commitdiff_plain;h=0210f08d89fd6d6b4669a5b8aebc910bcc9244cf Correction : filtres des listes de courriels plus fins. --- 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; }