I have postfix with Spamassassin and spamass-milter configured. E-mails with score higher than 4.0 are supposed to be treated as a spam and be rejected. Here is my local.conf
rewrite_header Subject ***** SPAM _SCORE_ *****
report_safe 0
required_score 4.0
use_bayes 1
use_bayes_rules 1
bayes_auto_learn 1
skip_rbl_checks 0
And here is my master.cf for postfix:
smtp inet n - y - - smtpd
-o content_filter=spamassassin
smtp unix - - y - - smtp
...
spamassassin unix - n n - - pipe
user=spamd argv=/usr/bin/spamc -f -e
/usr/sbin/sendmail -oi -f ${sender} ${recipient}
I set in postfix header_checks that it should discard all e-mails marked as spam.
/^X-Spam-Status: Yes/ DISCARD
Also, in spamass-milter I added setting that all e-mails with score higher than 9.0 are rejected.
The thing is, after sending a proper e-mail (let's say from my personal gmail account) to the server and forwarding it (let's say to my second gmail account) the message is scoring below the threshold, but the header keeps being rewritten and given a score bigger than 4.0 -- the message is not being discarded/rejected, it's being forwarded with annoying header. So all the messages are marked with this SPAM header, despite being treated as a non-spam ones.