[Dovecot] Change sieve scripts for DeltaChat

master
andryyy 2021-07-28 21:44:06 +02:00
parent e98a8a533b
commit 96a460c2fa
No known key found for this signature in database
GPG Key ID: 8EC34FF2794E25EF
1 changed files with 9 additions and 3 deletions

View File

@ -1,10 +1,10 @@
# global_sieve_before script
# global_sieve_before -> user sieve_before (mailcow UI) -> user sieve_after (mailcow UI) -> global_sieve_after
require "fileinto";
require "mailbox";
require ["imap4flags", "mailbox", "fileinto"];
if header :contains ["Chat-Version"] [""] {
if allof(header :contains ["Chat-Version"] [""],
header :contains ["Auto-Submitted"] ["auto-replied"]) {
if mailboxexists "DeltaChat" {
fileinto "DeltaChat";
} else {
@ -12,3 +12,9 @@ if header :contains ["Chat-Version"] [""] {
}
stop;
}
if allof(header :contains ["Chat-Version"] [""],
header :contains ["Autocrypt"] [""]) {
setflag "\\seen";
stop;
}