Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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: noreply@valid.mydomain.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: noreply@valid.mydomain.com

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<webapp@invalid.mydomain.com>   

-- changed to --

From: Confirmation Email<noreply@valid.mydomain.com>

Any help will be greatly appreciated.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

Solved - Following line in /etc/postfix/master.cf was causing conflict :

pickup    fifo  n       -       -       60      1       pickup
    -o content_filter=
#   -o receive_override_options=no_header_body_checks  //commented this line out
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.