Header Check Postfix

emailpostfixsmtp

I want to reject all messages with following header:

X-PHP-Originating-Script: 10003:dump.php(1954) : eval()'d code
Date: Wed, 10 Aug 2016 13:28:58 +0200
From: Agnieszka Wisniewski <agnieszka_wisniewski@monasteriodelashuelgas.org>
Message-ID: <ebc99995e5cd5649c5df34833c173796@www.monasteriodelashuelgas.org>

I have tried with header_checks = regexp:/etc/postfix/header_check

/eval()'d code/                                         REJECT SPF rule 1  
/eval()\'d code/                                            REJECT SPF rule 2

but it won't block emails as I expect.

What I do wrong ?

Best Answer

You need to escape some character in the pattern string, such as *?+|(). In this case, you forgot to escape the ( and ) characters. This pattern

/eval\(\)'d code/ REJECT SPF rule 1

should works in your problem above.

Related Topic