]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/dovecot/sieve/global/list.sieve
knot+nginx: add lemoutona5pattes.sourcephile.fr for helping Cadine
[sourcephile-nix.git] / servers / mermet / dovecot / sieve / global / list.sieve
1 require [ "date", "fileinto", "mailbox", "variables" ];
2
3 #if currentdate :matches "year" "*" { set "year" "${1}"; }
4 #if currentdate :matches "month" "*" { set "month" "${1}"; }
5
6 if exists "X-MC-User" {
7 if header :matches "From" "*<*@*.asso.fr>*" {
8 set "list" "${2}";
9 set "domain" "${3}";
10 }
11 elsif header :matches "From" "*<*@*.*>*" {
12 set "list" "${2}";
13 set "domain" "${3}";
14 }
15 fileinto :create "Listes+${domain}+${list}";
16 stop;
17 }
18 elsif exists "List-Id" {
19 if header :matches "List-Id" "*<*.*.*.*>*" {
20 set "list" "${2}";
21 set "domain" "${4}";
22 }
23 elsif header :matches "List-Id" "*<*.*.*>*" {
24 set "list" "${2}";
25 set "domain" "${3}";
26 }
27 fileinto :create "Listes+${domain}+${list}";
28 stop;
29 }