I'm using postfix-pcre on my Ubuntu Server. If I test my header_checks configuration with the following command
postmap -q 'To: "Markus Schlei" <[email protected]>' regexp:/etc/postfix/header_checks
I get the following warning message:
postmap: warning: regexp map /etc/postfix/header_checks, line 36: Invalid preceding regular expression.
Also it's not reject my test. On Line 36 I got this code:
/^To:.*\@(?!(gmail\.com)).*/ REJECT Test-Nr-1
I want to reject all messages which not match with gmail.com
Edit 1: I found out that, if I remove the "(?!(..)" the warning message gone away, but it do the inverse what I want.