X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=etc%2Fdovecot%2Fsieve%2Fglobal.d%2Flist.sieve;fp=etc%2Fdovecot%2Fsieve%2Fglobal.d%2Flist.sieve;h=d7ff6e73946782868c6dff9f11f26377330db1aa;hb=b75d4503ef9c919231c0c02daf5a1ed1e57c73af;hp=0000000000000000000000000000000000000000;hpb=4c57b350e0265cfadb9bbf95cd55ae491ee66820;p=lhc%2Fateliers.git diff --git a/etc/dovecot/sieve/global.d/list.sieve b/etc/dovecot/sieve/global.d/list.sieve new file mode 100644 index 0000000..d7ff6e7 --- /dev/null +++ b/etc/dovecot/sieve/global.d/list.sieve @@ -0,0 +1,18 @@ +require + [ "date" + , "fileinto" + , "mailbox" + , "variables" + ]; + +if currentdate :matches "year" "*" { set "year" "${1}"; } +if currentdate :matches "month" "*" { set "month" "${1}"; } + +if exists "List-ID" { + if header :matches "List-ID" "*<*.*.*>*" { + set "list" "${2}"; + set "domain" "${3}"; + } + fileinto :create "Lists.${domain}.${list}.${year}.${month}"; + stop; + }