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:.*([\n]).*sender: (.+?)\).*(by.+?)\).*(id \w+).*(;.*)/
REPLACE Received: ${3}, authenticated sender ${2})${1} ${4}${5}
It's a bit hairy but it makes the Received: header of a submission user
look a lot like the Received: header added by local delivery:
Received: by rincewind.trouble.is (Postfix, authenticated sender
philip)
id XXXXXXXXX; Tue, 1 May 2018 09:56:20 +0000 (UTC)
I wonder if it wouldn't be easier to add a configuration option to smtpd
to suitably expurgate Received: headers of sensitive information.
This is working for me though. It's ugly but it seems to work for all
my users and the exotic devices they use.
Philip
--
Philip Paeps
Senior Reality Engineer
Ministry of Information