On Wed, Nov 26, 2008 at 11:16:59AM -0700, Sturgis, Grant wrote:

> 
> 
> On Tue, 2008-11-25 at 11:53 -0700, Wietse Venema wrote:
> > Sturgis, Grant:
> > > I'm trying to hide our internal mail servers from the message
> > headers of
> > > outbound email.  I've done some reading about this and have found
> > two
> > > solutions:
> > ...
> > > 2.  Use header_checks like this
> > > http://www.nabble.com/Hide-internal-address-(Postfix)-td2300995.html
> > 
> > Wietse Venema:
> > This removes ALL Received: headers. That is a bit drastic. You
> > could use a REPLACE action to sanitize IP address and hostname
> > information.
> > 
> > See: http://www.google.com/search?q=postfix+replace+received
> 
> > 
> 
> I am having some problems getting this header_checks match.  The header
> I am working with is this:
> 
> Received: from blackfoot.internal.com (blackfoot.arraybiopharma.com
> [10.65.35.185])
> 
> So I've added this to my header_checks file for testing:
> 
> /^Received: from blackfoot\.internal\.com \(blackfoot\.arraybiopharma
> \.com \[10\.65\.35\.185\]\) / HOLD
> 
> 
> Can someone point out what I've done wrong?

The space just before the final "/" should not be there. Postfix added
Received headers (for network-originated traffic) match (PCRE):

    /^Received:
        [ ] from [ ] \S+                # Helo name
        [ ] \(\S+ [ ] \[\S+\]\)         # Host name, IP address
        (\n\t\([^\n]*?\))*              # TLS, SASL, ... annotations
        \n\t by [ ] mta\.example\.com   # This mta's hostname
        [ ] \(Postfix\)                 # $mail_name setting from main.cf
        [ ] with [ ] \w+                # Protocol
        [ ] id [ ] \w+                  # Queue-id
        (?:;\n\t|\n\tfor [ ]<.*?>;[ ])? # Single Recipient?
        \w{3},                          # Weekday name
        [ ] [ \d]{2}                    # Day of month
        [ ] \w{3}                       # Month name
        [ ] \d{4}                       # Year
        [ ] (?:\d\d:){2}\d\d            # Time of day
        [ ] [-+]\d{4}                   # TZ offset
        [ ] \(.*?\)                     # Timezone name
        $/sx                            

Note the various "\n\t" occurences, the header is presented to
header_checks with "\n\t" folding whitespace. On the network,
this is sent as "\r\n\t".

-- 
        Viktor.

Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.

To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
<mailto:[EMAIL PROTECTED]>

If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.

Reply via email to