Solved

Postfix Strip Headers Not Working At All

Posted on 2014-01-02
5
695 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 62

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 62

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Weekend adv creator 3 38
Penetration Testing home based work 3 75
AWS Central Authentication 1 59
email address of new exchange 2010 user doesn't match user name 5 30
Resolve DNS query failed errors for Exchange
Pop culture is prime bait for hackers seeking to infect user’s computers and mobile devices with malicious malware. Hackers know exactly what the latest trends are online and know how to use them to their advantage.
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

770 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