Removing client IP from email header?

Problem Description
Hello! I noticed that when I’m sending out emails, the emails include the IP address and hostname of the client itself in a “Received” header.

Would it be possible to strip that from the default installation of FreedomBox for privacy reasons? Or would it be recommended for people to strip it themselves in the instances that they run?

Steps to Reproduce

  1. Send an email to myself
  2. Open the received email and check the email headers
  3. You will see a Received header that includes your client’s / ISP’s IP and hostname.

Expected Results
I expect to have the IP & hostname of the server itself but not the client’s.

Screenshot

Delivered-To: jag@aangat.lahat.computer
Received: from aangat.lahat.computer
	by aangat-lahat with LMTP
	id JO8BH+BaBWfMKAQAWkoivA
	(envelope-from <jag@aangat.lahat.computer>)
	for <jag@aangat.lahat.computer>; Tue, 08 Oct 2024 12:16:32 -0400
Received: from [10.152.40.163] (static-198-54-135-84.cust.tzulo.com [198.54.135.84])
	by aangat.lahat.computer (Postfix) with ESMTPSA id 4B8DF1FCD78
	for <jag@aangat.lahat.computer>; Tue,  8 Oct 2024 12:16:32 -0400 (EDT)

Hello! Just wanted to bump this issue that I’m running into if people are experiencing this as well. Are people running into something similar? Is there an easy way to address it?

Hi @jag , thank you for reporting this issue. I created and issue in the issue tracker for this: email: Consider stripping IP address and hostname of the sender from sent email (#2465) · Issues · FreedomBox / FreedomBox · GitLab

If it is a good idea to remove these, then FreedomBox should do this automatically or at least provide a simple option for it. It certainly improves privacy but I don’t know what is the standard practice for it. Please post on the issue or here anything you could find such as comparison with other services, postfix/dovecot configuration snippets, RFCs or best practice recommendations.

Thank you so much I appreciate it! Perhaps I should’ve made an issue on GitLab in the first place :sweat_smile: