Hi,
I can not get my mail tags to work.
When I send an e-mail to hi+test@example.com it arrives to the mailbox, but it is not properly marked.
Tried both with Subject and subfolder.
This is my global_sieve_after:
``
global_sieve_after script
global_sieve_before -> user sieve_before (mailcow UI) -> user sieve_after (mailcow UI) -> global_sieve_after
require “fileinto”;
require “mailbox”;
require “variables”;
require “subaddress”;
require “envelope”;
require “duplicate”;
if header :contains “X-Spam-Flag” “YES” {
fileinto “Junk”;
}
if allof (
envelope :detail :matches “to” “*”,
header :contains “X-Moo-Tag” “YES”
) {
set :lower :upperfirst “tag” “${1}”;
if mailboxexists “INBOX/${1}” {
fileinto “INBOX/${1}”;
} else {
fileinto :create “INBOX/${tag}”;
}
}
if duplicate {
discard;
stop;
}
``
I have a suspicion that the X-Moo-Tag is not added to arriving emails, but I am not sure.
Any help would be appreciated.