Hello there,
first, all the best wishes for 2019!
Let it be a good new year for all of us ;)
I'm running a SuSE Box with postfix version 3.2.0
I also do SPAM checking via amavis-new and spamassassin
after the mail passes postscreen it's directed to amavis-new
amavis-new then re-injects the mail to postfix on port 10025
If amavis-new detects some spam it will add headers like:
X-Spam-Flag: YES
X-Spam-Score: 11.248
X-Spam-Level: ***********
based on those tags I would like to send a BCC to my spam collecting
s...@address.com for further inspection and review.
the kill_level in spamassassin is set at 6.5 and the tag2_level is set
at 4.0
so all emails with SPAM scores between 4.0 and 6.49 I would like to add
a BCC
A bit of googling revealed milter_header_checks & header_checks
http://www.postfix.org/postconf.5.html#milter_header_checks
http://www.postfix.org/header_checks.5.html
so my thinking was to modify master.cf .. the postfix instance where
amavis-new re-injects mails and add a header check there
127.0.0.1:10025 inet n - n - - smtpd
...
-o milter_header_checks = pcre:/etc/postfix/milter_header_checks
...
and in /etc/postfix/milter_header_checks
/^X-Spam-Level:\s****/ BCC s...@address.com
which would then add the additional header and send a BCC?
would this setup make sense? would it work?
also ... how can i test the regex?
thanks & greetings
Becki