Hi
I was wondering if someone could shed some light on the issue im having,
Currently i have PMG proxmox mail gateway which then sends the email to mailcow,
on PMG when it tags an email as spam it puts on the header SPAM and adds the rating. I was checking the sieve filters on mailcow and in theory it should of put in the junk folder but for some reason its not,
not sure what else im missing
and in the global filters i have this
in theory the part that says x-spam flag if yes
# 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;
}
Thank you