View Single Post
  #10 (permalink)  
Old 04-17-2008, 02:27 PM
mlpw mlpw is offline
Junior Member
 
Posts: 6
Default [SOLVED] Outgoing Header Address Masquerading

Quote:
Originally Posted by uxbod View Post
Something like this should work
Code:
/^Received: from .* (by zimbra\.domain\.com .*)/ REPLACE /Received: $1/
sorry but unable to test it until later. In theory that should grab everything from zimbra.domain.com onwards and then replace it in the new header.
After some trial and error I figured out the correct regular expression for what I wanted.

In "/opt/zimbra/conf/postfix_header_checks.in" I added:

Code:
/^Received: from .+\..+\.domain\.com .+(by zimbra\.domain\.com .+) / REPLACE Received: $1
Now when ZCS sees a header like this:

HTML Code:
Received: from host.zone.domain.com (host.zone.domain.com [192.168.20.2]) by zimbra.domain.com (Postfix) with ESMTP id 5870116BD472 for <user@yahoo.com>; Sun, 13 Apr 2008 09:04:22 -0400 (EDT)
It will rewrite it as:

HTML Code:
Received: by zimbra.domain.com (Postfix) with ESMTP id 5870116BD472 for <user@yahoo.com>; Sun, 13 Apr 2008 09:04:22 -0400 (EDT)
So you can eliminate a potential privacy breach by stripping host name, zone and IP's from internal mail clients outgoing messages by using postfix header_checks.
Reply With Quote