mailcow/data/conf/dovecot/sieve_after

25 lines
477 B
Plaintext
Raw Normal View History

2017-03-02 18:23:23 +08:00
require "fileinto";
require "mailbox";
require "variables";
require "subaddress";
require "envelope";
if header :contains "X-Spam-Flag" "YES" {
fileinto "Junk";
}
if allof (
envelope :detail :matches "to" "*",
header :contains "X-Moo-Tag" "YES",
mailboxexists "INBOX/${s}"
) {
fileinto "INBOX/${s}";
}
elsif allof (
envelope :detail :matches "to" "*",
header :contains "X-Moo-Tag" "YES"
) {
set :lower "s" "${1}";
fileinto :create "INBOX/${s}";
}