I need to modify the "From:" header line in incoming e-mail messages only if "Message-Id:" starts with a defined string. So in main.cf I put:
header_checks = pcre:/etc/postfix/header_checks
and header_checks file contains:
if /^Message-Id: <footext.+/
/^From: (.*)@johndoe.com/ REPLACE From: ${1}@ext.johndoe.com
endif
It doesn't work, the condition does not take. What am I missing?