On Wed, Nov 26, 2008 at 01:58:25PM -0500, Victor Duchovni wrote: > 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".
Note, it turns out that Postfix PCRE tables don't fully support /x, because Postfix un-folds the pattern to a single line before passing it to the PCRE parser, so with the above, everything after the first comment is ignored. You can still use /x to add whitespace, and Postfix removes stand-alone comments that occupy a whole line, so a better version is: /^Received: # Helo name [ ] from [ ] \S+ # Host name, IP address [ ] \(\S+ [ ] \[\S+\]\) # TLS, SASL, ... annotations (?: \n\t\([^\n]*?\))* # This mta's hostname \n\t by [ ] mta\.example\.com # $mail_name setting from main.cf [ ] \(Postfix\) # Protocol [ ] with [ ] \w+ # Queue-id [ ] id [ ] \w+ # Single Recipient? (?:;\n\t|\n\tfor [ ]<.*?>;[ ]) # Weekday name \w{3}, # Day of month [ ] [ \d]{2} # Month name [ ] \w{3} # Year [ ] \d{4} # Time of day [ ] (?:\d\d:){2}\d\d # TZ offset [ ] [-+]\d{4} # Timezone name [ ] \(.*?\) $/sx ACTION The folding of the lookup key is perhaps undesirable, not sure whether work to "fix" this is warranted for 2.6. -- 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.