> Am 20.05.2016 um 20:52 schrieb Pablo E Garaitonandia <pe...@psu.edu>:
> 
> Hello all,
>      I am a rookie to postfix, I apologize in advance,  and I have been 
> tasked with not allowing SPAM to be forwarded. I basically receive messages 
> from an edge mail server that adds a  header to a messages stating whether it 
> has been flagged for spam or not  and another that gives the message a 
> numerical spam rating spam rating. I am also not running spam assassin or 
> clamav on my system because these edge servers already mitigate those issues. 
> My job is to ensure that if a person has a forwarder set to another domain to 
> only deliver the SPAM locally and not forward it. This is on a Zimbra 8.6.0 
> install. If someone could point me in the right direction I would greatly 
> appreciate it. I have been looking on line and what I have been finding is 
> mostly about rejecting SPAM. I have also been looking at postfix after-queue 
> content filtering on the postfix docs. But I need some good examples and I am 
> not really quite sure what commands I would use to deliver only locally. Any 
> guidance would be appreciated. 

Not sure, if I understood correctly. You receive mail on a Postfix server that 
is already been spam checked and that carries headers that you can parse, right?

If so, I would add a header_checks_maps parameter in PCRE format and send it 
through FILTER discard:

For example in main.cf:

-------------------------------------------------
header_checks = pcre:/etc/postfix/header_checks
-------------------------------------------------

header_checks:
-------------------------------------------------
/^My-SPAM-Flag:.+Yes$/i   FILTER discard:
-------------------------------------------------

You might need to place the header_checks inside master.cf. It depends on your 
setup.

Maybe this works for you

Christian
—
Christian Rößner B.Sc.
Erlenwiese 14, 36304 Alsfeld
T: +49 6631 78823400, F: +49 6631 78823409, M: +49 171 9905345
USt-IdNr.: DE225643613, http://www.roessner-network-solutions.com

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to