Re: Removing trace records on submission MSA

2018-05-03 Thread @lbutlr
On 2018-05-02 (14:57 MDT), Philip Paeps wrote: > When it comes in over submission from authenticated users, I consider the > HELO hostname, the IP address and the reverse lookup of the IP address > sensitive. Hmm. OK, I do not see my home IP address in any mail header (and yes, I use submiss

Re: Removing trace records on submission MSA

2018-05-02 Thread Wietse Venema
Philip Paeps: > On 2018-05-02 20:52:46 (+0200), @lbutlr wrote: > > On 2018-05-01 (04:02 MDT), Philip Paeps wrote: > >> I wonder if it wouldn't be easier to add a configuration option to > >> smtpd to suitably expurgate Received: headers of sensitive > >> information. > > > > What information in

Re: Removing trace records on submission MSA

2018-05-02 Thread Philip Paeps
On 2018-05-02 20:52:46 (+0200), @lbutlr wrote: On 2018-05-01 (04:02 MDT), Philip Paeps wrote: I wonder if it wouldn't be easier to add a configuration option to smtpd to suitably expurgate Received: headers of sensitive information. What information in the Received header do you consider sen

Re: Removing trace records on submission MSA

2018-05-02 Thread @lbutlr
On 2018-05-01 (04:02 MDT), Philip Paeps wrote: > > I wonder if it wouldn't be easier to add a configuration option to smtpd to > suitably expurgate Received: headers of sensitive information. What information in the Received header do you consider sensitive? -- "You see, in this world there's

Re: Removing trace records on submission MSA

2018-05-01 Thread Philip Paeps
On 2018-03-10 22:01:01 (+0100), J Doe wrote: I have a question in regards to removing some trace records when providing submission on Postfix 3.1.x and later. Apologies for resurrecting an old thread. I had some time to kill yesterday and I came up with this PCRE monster: /^Received:.*([\

Re: Removing trace records on submission MSA

2018-04-07 Thread J Doe
Hi Viktor, > On Apr 7, 2018, at 1:32 PM, Viktor Dukhovni > wrote: > > It is now portable POSIX. For the record, in email the allowed whitespace is > more narrow than > is recognized by [[:space:]], you're not likely to run into any false > positives. The email > header whitespace consists o

Re: Removing trace records on submission MSA

2018-04-07 Thread Viktor Dukhovni
> On Apr 7, 2018, at 3:05 AM, J Doe wrote: > > Thank you for your reply. > > It occurred to me that I could side-step the issue of GNU extensions and > whether they’re supported by converting the string I e-mailed a couple of > e-mails back to full POSIX regex (in this case removing the \s).

Re: Removing trace records on submission MSA

2018-04-07 Thread J Doe
Hi Viktor and Dominic, > On Apr 7, 2018, at 2:46 AM, Dominic Raferd wrote: > > On 7 April 2018 at 07:39, J Doe > wrote: > Hi Viktor and Dominic, > > If I do the following on Ubuntu 16.04 LTS: > > $ echo "1 2" | egrep '[[:digit:]]\s[[:digit:]]’ > 1 2 >

Re: Removing trace records on submission MSA

2018-04-06 Thread Dominic Raferd
On 7 April 2018 at 07:39, J Doe wrote: > Hi Viktor and Dominic, > > If I do the following on Ubuntu 16.04 LTS: > > $ echo "1 2" | egrep '[[:digit:]]\s[[:digit:]]’ > 1 2 > > … where “1 2” are highlighted in bash > > Am I correct that since this POSIX regex for the digits AND the \s is > st

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Viktor and Dominic, If I do the following on Ubuntu 16.04 LTS: $ echo "1 2" | egrep '[[:digit:]]\s[[:digit:]]’ 1 2 … where “1 2” are highlighted in bash Am I correct that since this POSIX regex for the digits AND the \s is still being interpreted, my system must support the GNU rege

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Viktor, > On Apr 7, 2018, at 2:04 AM, Viktor Dukhovni > wrote: > > FreeBSD 11 (POSIX): > > $ echo "1 b" | egrep '\d\s\w' > $ > > MacOS High Sierra (POSIX with GNU or similar extensions): > > $ echo "1 b" | egrep '\d\s\w' > 1 b > $ > > Your Ubuntu system most likely will match the Ma

Re: Removing trace records on submission MSA

2018-04-06 Thread Dominic Raferd
On 7 April 2018 at 07:04, Viktor Dukhovni wrote: > > > > On Apr 7, 2018, at 1:59 AM, J Doe wrote: > > > > Ah, interesting - that must be it, then. > > > > This is on an Ubuntu 16.04 LTS server. I can see the dependencies > compiled in from Ubuntu’s page [1] and GNU libc is listed. [2] seems to

Re: Removing trace records on submission MSA

2018-04-06 Thread Viktor Dukhovni
> On Apr 7, 2018, at 1:59 AM, J Doe wrote: > > Ah, interesting - that must be it, then. > > This is on an Ubuntu 16.04 LTS server. I can see the dependencies compiled > in from Ubuntu’s page [1] and GNU libc is listed. [2] seems to suggest that > regular expressions are part of GNU libc. >

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Viktor, > On Apr 7, 2018, at 1:50 AM, Viktor Dukhovni > wrote: > >> On Apr 7, 2018, at 1:34 AM, J Doe wrote: >> >> mmm. I just sent a test message via submission to a Gmail account and >> checked the headers and the replacement works. >> >> According to the site [1] \s is shorthand fo

Re: Removing trace records on submission MSA

2018-04-06 Thread Viktor Dukhovni
> On Apr 7, 2018, at 1:34 AM, J Doe wrote: > > mmm. I just sent a test message via submission to a Gmail account and > checked the headers and the replacement works. > > According to the site [1] \s is shorthand for POSIX regular expressions. > > Perhaps the POSIX regex library compiled w

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Viktor, > On Apr 7, 2018, at 1:26 AM, Viktor Dukhovni > wrote: >> On Apr 7, 2018, at 1:23 AM, J Doe wrote: >> >> I did some Googling for doing PCRE to POSIX regular expressions and updated >> the string: >> >> >> /^(Received:\sfrom)[^;]+(;\s[A-Z]{1}[a-z]{2,3},)\s+([[:digit:]]{1,2}[^\n]

Re: Removing trace records on submission MSA

2018-04-06 Thread Viktor Dukhovni
> On Apr 7, 2018, at 1:23 AM, J Doe wrote: > > I did some Googling for doing PCRE to POSIX regular expressions and updated > the string: > > > /^(Received:\sfrom)[^;]+(;\s[A-Z]{1}[a-z]{2,3},)\s+([[:digit:]]{1,2}[^\n]+)/ > REPLACE $1 [127.0.0.1] (localhost [127.0.0.1]) by myserver.com$2 $

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Viktor, > On Apr 7, 2018, at 12:36 AM, Viktor Dukhovni > wrote: > > That's PCRE syntax. > >> Does anyone know what I’m doing wrong and/or is there a way to make Postfix >> provide more debug output for a regexp: operation ? > > You're using a "regexp" table, those don't support PCRE. Tha

Re: Removing trace records on submission MSA

2018-04-06 Thread Viktor Dukhovni
> On Apr 7, 2018, at 12:34 AM, J Doe wrote: > > I tried the following with a visual regex program (to make checking captures > easier): > > /etc/postfix/submission_privacy_header > > /(Received\:\s*from)[^\;]+(\;\s[A-Z]{1}[a-z]{2,3}\,)\s+(\d{1,2}[^\n]+)/ > REPLACE $1 [127.0.0

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Karol, > I am using this: > > /^(Received:) from.*]\).*(.{2}by mail\.nimitz\.pl.*Postfix.*) (with > [E]{0,1}SMTP[S]{0,1}[A]{0,1}) (.*)/ REPLACE $1 from mail.nimitz.pl > (localhost [127.0.0.1])$2 with SMTP $4 > > Just change 'mail.nimitz.pl' with FQDN of your server. This expression > works fo

Re: Removing trace records on submission MSA

2018-04-06 Thread Karol Augustin
On 06/04/2018 09:27 PM, J Doe wrote: > Hi Philip, > >>> Thank you for your reply. >>> >>> I currently use DKIM and as per the RFC for DKIM, I don’t include trace >>> headers in the message hash that makes up the DKIM signature. I am under >>> the impression that my DKIM signatures should be cor

Re: Removing trace records on submission MSA

2018-04-06 Thread J Doe
Hi Philip, >> Thank you for your reply. >> >> I currently use DKIM and as per the RFC for DKIM, I don’t include trace >> headers in the message hash that makes up the DKIM signature. I am under >> the impression that my DKIM signatures should be correct in this case if I >> use your solution

Re: Removing trace records on submission MSA

2018-04-04 Thread Philip Paeps
On 2018-04-05 08:54:45 (+0800), J Doe wrote: Hi Phillip, I have a question in regards to removing some trace records when providing submission on Postfix 3.1.x and later. While reading RFC 6409 (“Message Submission for Mail”), I note that the RFC observes that: "Even when submitted mess

Re: Removing trace records on submission MSA

2018-04-04 Thread J Doe
Hi Phillip, >> I have a question in regards to removing some trace records when providing >> submission on Postfix 3.1.x and later. >> >> While reading RFC 6409 (“Message Submission for Mail”), I note that the RFC >> observes that: >> >> "Even when submitted messages are complete, local site

Re: Removing trace records on submission MSA

2018-03-11 Thread Philip Paeps
On 2018-03-10 16:01:01 (-0500), J Doe wrote: I have a question in regards to removing some trace records when providing submission on Postfix 3.1.x and later. While reading RFC 6409 (“Message Submission for Mail”), I note that the RFC observes that: "Even when submitted messages are compl