Solved

Postfix Strip Headers Not Working At All

Posted on 2014-01-02
5
680 Views
Last Modified: 2014-01-04
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.

Basically:

main.cf:
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,

dr34m3r
0
Comment
Question by:dr34m3rs
  • 3
  • 2
5 Comments
 
LVL 61

Expert Comment

by:gheist
ID: 39753196
You should not strip received headers.
0
 
LVL 1

Author Comment

by:dr34m3rs
ID: 39753638
I should. In fact. In this instance.
0
 
LVL 61

Accepted Solution

by:
gheist earned 500 total points
ID: 39754587
Received: headers are counted to prevent mail delivery loops

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

In main.cf
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.
0
 
LVL 1

Author Comment

by:dr34m3rs
ID: 39756415
Ok I'll try a few things and get back with you.

Thanks!!
0
 
LVL 1

Author Comment

by:dr34m3rs
ID: 39756556
I figured out the reason, which is unique to my system so no point in posting my results.

Thanks for the help!

dr34m3r
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Marketers need statistics and metrics like everybody else needs oxygen. In this article we explain how to enable marketing campaign statistics for Microsoft Exchange mail.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
In this video we show how to create a Contact in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Contact ta…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now