|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
Re: Removing headers from SASL-authenticated SMTP hosts
From: Adam Jacob Muller (lists-postfix
adam.gs)
Date: Sun Dec 31 2006 - 02:46:50 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 31, 2006, at 12:08 AM, Victor Duchovni wrote:
> On Sat, Dec 30, 2006 at 02:28:13PM -0500, Brandon Kuczenski wrote:
>
>> On Sat, 30 Dec 2006, Victor Duchovni wrote:
>>
>>> On Sat, Dec 30, 2006 at 12:27:02PM +0100, mouss wrote:
>>>
>>>> If your postfix doesn't support REPLACE, you can use IGNORE but
>>>> - you'll lose information that may be helpful for debugging/
>>>> audit/...
>>>> - other headers will be removed (It's hard to get an expression
>>>> that
>>>> will only match the one you want)
>>>
>>> I recommend against deleting "Received" headers, absense of origin
>>> "Received" headers increases the spam score of mail arriving at the
>>> receiving MTA, and makes problem resolution harder. If you want
>>> to prevent stupid downstream systems from scoring IPs of your
>>> authenticated clients, you can use REPLACE to just hide the IP
>>> and helo name of the sending client:
>>>
>>> PCRE:
>>>
>>> /^Received: from (\S+) \(\S+ \[[.\d]+\]\)(.*)/ REPLACE
>>> Received: from localhost (localhost [127.0.0.1]){$1}
>>>
>>
>> Thanks for your help. I thought deleting the trusted Received:
>> header
>> would protect my users' privacy, and anyway, reflect the true
>> entry point
>> of the mail into 'The Internet'. In any case, I didn't want to try
>> rewriting it for fear of violating some RFC regarding the Received:
>> header.
>>
>>
>> But if you all agree that deleting the header entirely is
>> distasteful,
>> maybe you can help me construct a regexp that would clean it. I'm
>> afraid
>> I'm no perl whiz. Can you tell me what the {$1} in your
>> expression above
>> decodes to?
>
> Sorry the pattern is a mess, not checked... The correct version is
> probably (please test):
>
> /^Received: from \S+ \(\S+ \[[.\d]+\]\)(.*)/ REPLACE
> Received: from localhost (localhost [127.0.0.1])${1}
>
> This picks up the rest of the header after hiding the HELO name and IP
> address with localhost and 127.0.0.1.
>
> --
> 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:majordomo
postfix.org?body=unsubscribe%20postfix-users>
>
> 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.
I've actually thought about (and would like to -- and probably will)
write something that removes the first "Received" header on my
submission port, saving the results into a database, and replacing it
some kind of unique key, probably will write a milter to do this at
some point.
The reasons for me are simple, if you look at the headers of my mail
it, quite frankly, divulges more information than I would like to
provide about my location. In the sense, that I really don't want
people being able to know if I sent a particular email from the
office (or which office), or from home, or starbucks, or the free
WiFi at the strip club.
At the same time, removing the headers entirely could leave me open
to abuse, so replacing them with some kind of hash and preserving the
information elsewhere seems smart.
Am I the only one who has thought of the privacy implications of this?
-Adam
// Forgive me if the above is incoherent, i am sleep deprived.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]