X-Git-Url: https://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fdovecot%2Fsieve%2Fglobal.d%2Flist.sieve;h=cdc19f9b447e29762284100b2a1cb341a866db73;hb=3dde6e2b7fcd76a6116a32c92fd8faa87c0c54e7;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..cdc19f9 100644 --- a/etc/dovecot/sieve/global.d/list.sieve +++ b/etc/dovecot/sieve/global.d/list.sieve @@ -9,10 +9,34 @@ 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" "*<*.*.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; }