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

This mail will not be dropped into Junk as it is does not score more than 8 (standard unless you change this score). It only tells you that the email comes into your server already marked as spam. You will need to learn it as spam, adjust your rules to increase the spam score to 8, then it will satisfy the X-Spam-Flag sieve rule

Have something to say?

Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

You should train BAYES first. I don’t see any BAYES_SPAM or BAYES_HAM in your report.

Manual training

Login to domainname.com/rspamd. You have to create a password under mailcow UI. System –> Configuration –> Access –> Rspamd UI

Under Scan/Train. Copy the header and body of the spam and paste into the dialog box. Hit Scan message and Upload SPAM.

If it is a HAM, then Upload HAM. After you hit 200 HAMs and SPAMs each, the system should be able to learn by itself. You also still can manually train the system

Thank you so much for the reply, so after hitting the 200 becomes automatic? and the users itself cant train it right? by putting the emails in the junk folder?

Thank you

    killmasta93 Yes. I rather not to allow users to do so. One man’s meat is another man’s poison. If you know what i mean

    No one is typing