]> Git — Sourcephile - sourcephile-nix.git/blob - servers/mermet/dovecot/sieve/global/list.sieve
dovecot: sieve: fix List-Id filter with 3 components
[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 fileinto :create "Listes+${3}+${2}";
9 stop;
10 }
11 elsif header :matches "From" "*<*@*.*>*" {
12 fileinto :create "Listes+${3}+${2}";
13 stop;
14 }
15 }
16 elsif exists "List-Id" {
17 if header :matches "List-Id" "*<*.*.*.*>*" {
18 fileinto :create "Listes+${4}+${3}+${2}";
19 stop;
20 }
21 elsif header :matches "List-Id" "*<*.*.*>*" {
22 fileinto :create "Listes+${3}+${2}";
23 stop;
24 }
25 }