2019-06-01 19:53:24 +08:00
|
|
|
# global_sieve_before script
|
|
|
|
# global_sieve_before -> user sieve_before (mailcow UI) -> user sieve_after (mailcow UI) -> global_sieve_after
|
2021-01-14 16:38:56 +08:00
|
|
|
|
2021-07-29 03:44:06 +08:00
|
|
|
require ["imap4flags", "mailbox", "fileinto"];
|
2021-01-14 16:38:56 +08:00
|
|
|
|
2021-07-29 03:44:06 +08:00
|
|
|
if allof(header :contains ["Chat-Version"] [""],
|
|
|
|
header :contains ["Auto-Submitted"] ["auto-replied"]) {
|
2021-01-14 16:38:56 +08:00
|
|
|
if mailboxexists "DeltaChat" {
|
|
|
|
fileinto "DeltaChat";
|
|
|
|
} else {
|
|
|
|
fileinto :create "DeltaChat";
|
|
|
|
}
|
|
|
|
stop;
|
|
|
|
}
|
2021-07-29 03:44:06 +08:00
|
|
|
|
|
|
|
if allof(header :contains ["Chat-Version"] [""],
|
|
|
|
header :contains ["Autocrypt"] [""]) {
|
|
|
|
setflag "\\seen";
|
|
|
|
stop;
|
|
|
|
}
|