X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=etc%2Fdovecot%2Fsieve%2Fglobal.d%2Flist.sieve;h=39f5ce5314016cc8e63900a1ae29912d79f9ecc3;hp=d7ff6e73946782868c6dff9f11f26377330db1aa;hb=0210f08d89fd6d6b4669a5b8aebc910bcc9244cf;hpb=9a4c93fc839cd4aa298ec8b8ccce58714d07f277 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; }