I just can't seem to figure out why header_checks are not being evaluated. I'm on Ubuntu 12.04, postfix 2.7, dovecote, spamassasin, clamav, amavis.
I add following line to /etc/postfix/main.cf :
header_checks = regexp:/etc/postfix/header_checks
And here is header_checks :
/From: .*/ REPLACE From: email@example.com
To test out regexp :
#postmap -q "From: <werwe>" regexp:/etc/postfix/header_checks
which evaluates correctly and give me return output of :
REPLACE From: firstname.lastname@example.org
However, when I try to send email from commandline or from php webpage, postfix will not replace the From header. I'm stumped.
I want to rewrite all outgoing emails:
From: Confirmation Email<email@example.com>
-- changed to --
From: Confirmation Email<firstname.lastname@example.org>
Any help will be greatly appreciated.