home | list info | list archive | date index | thread index

Re: Received headers (was Re: Bluenose email)

Dianne Skoll via linux wrote on 2026-09-22 14:15:
Still, Gmail discloses your IP address to your e-mail recipient, which is not that good when you send something to mailing list like this:
Don't all SMTP servers do that? Adding a Received: header is a MUST requirement in RFC 5321 (though inclusion of the IP address is only a SHOULD): https://www.rfc-editor.org/info/rfc5321/#section-4.4

I had to do a test to verify that Gmail was doing that, and it does include my home IP address.

As you say, it should, but I think when using web mail (and/or the app?) it does not do that.


I've added to my /etc/postfix/master.cf:

submission_hide_home_ip unix n - n - 0 cleanup
  -o header_checks=pcre:/etc/postfix/submission_hide_home_ip.pcre

and my /etc/postfix/submission_hide_home_ip.pcre:

/^(Received: from ).*\([0-9\.\-]+cable.teksavvy.com.*\)(.*by .*)$/AU   REPLACE ${1}***ISP name hidden*** ${2}


For fixing this exact issue.


A received message header now shows:

Received: from ***ISP name hidden***
	by mail.bclug.ca (Postfix) with ESMTPSA id E771F81BB4
	for<linux [ at ] linux-ottawa [ dot ] org>; Tue, 22 Sep 2026 14:04:20 -0700 (PDT)