Postfix Strip Headers Not Working At All

Hi Experts,

Maybe it's because I've been awake since 1:30 AM, but somehow I am unable to get postfix to strip...  head... ers...  strip headers. ;)

Ok, heres the setup:

Home Mail Server -> Remote Relay Mail Server Proxy (both postfix)

I want to strip all "Received" headers from all smtp related email forwarded to my remote relay mail server proxy box so the forward relay box will be the originating box, instead of all my local lan IP addresses and amavisd scan headers and such.

I followed a bunch of ideas and guides but nothing has worked for me yet. Not sure what I'm missing.

smtp_header_checks = regexp:/etc/postfix/smtp_header_checks

and in /etc/postfix/smtp_header_checks I have:

/^Received/   IGNORE

I think it could have something to do with the fact that I am relaying a message instead of receiving it? But I logically assume postfix would understand that I am still sending via SMTP to google or whatever...  I am confused as to why this doesn't work!

Thanks for any help! I hope there is an easy fix for this solution...

Best regards,

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

You should not strip received headers.
dr34m3rsAuthor Commented:
I should. In fact. In this instance.
Received: headers are counted to prevent mail delivery loops

Normally you have already a file /etc/postfix/header_checks

header_checks = regexp:/etc/postfix/header_checks

in header_checks file ad regex replacing Received: with nonsense
/Received:\ .*\[127\.0\.0\.[0-9]/ REPLACE Received:\ from Intranet.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dr34m3rsAuthor Commented:
Ok I'll try a few things and get back with you.

dr34m3rsAuthor Commented:
I figured out the reason, which is unique to my system so no point in posting my results.

Thanks for the help!

It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Servers

From novice to tech pro — start learning today.