X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fdovecot%2Fsieve%2Fglobal.d%2Flist.sieve;h=029ca20eb039d2c183eecd917c1a8e776a341062;hb=cf81c8bf06af7c2f07057c4cd77d08aae8e3573c;hp=d7ff6e73946782868c6dff9f11f26377330db1aa;hpb=b75d4503ef9c919231c0c02daf5a1ed1e57c73af;p=lhc%2Fateliers.git diff --git a/etc/dovecot/sieve/global.d/list.sieve b/etc/dovecot/sieve/global.d/list.sieve index d7ff6e7..029ca20 100644 --- a/etc/dovecot/sieve/global.d/list.sieve +++ b/etc/dovecot/sieve/global.d/list.sieve @@ -9,10 +9,38 @@ 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" "**" { + set "list" "${2}+info"; + set "domain" "cyclocoop"; + } + 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" "*<*.*.ptitvelo.net>*" { + set "list" "${2}+${3}"; + set "domain" "ptitvelo"; + } + elsif header :matches "List-ID" "*<*.ptitvelo.net>*" { + set "list" "${2}"; + set "domain" "ptitvelo"; + } + 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; }