[kwlug-disc] Self-hosted email leaks home IP address
Chris Irwin
chris at chrisirwin.ca
Tue Mar 10 16:37:17 EDT 2026
On Tue, Mar 10, 2026 at 01:00:14PM -0700, Ron wrote:
>
>Anyone running Postfix to self-host email and notice that their home
>IP address is leaked in the first "Received: from" header?
Question: What is your mail setup?
I'm assuming:
1. Self-hosted SMTP on "cloud" somewhere, with a public IP address
That SMTP server is public, it's IP is your domain's mx server, etc.
2. You as a client, sending outbound via (presumably authenticated) SMTP
Your public SMTP server does the "normal" thing of adding a
"received" header
In this case, most hosted mail solutions don't do the "received" header
for authenticated outbound user mail. Gmail (as you tested) or fastmail
(which I tested), and presumably everything else.
>If you don't self-host, are you still leaking your home IP?
I'm leaking via DNS all over the place. But I'm not self-hosting mail
anymore, so technically "no" for that.
> I've got a temp work-around via header_checks:
Also, does this only act on mail you're sending? Or will mail you're
receiving be similarly altered?
>/^(Received: from ).*\([0-9\.\-]+cable.teksavvy.com.*\)(.*by .*)$/AU
>REPLACE ${1}***ISP name hidden*** ${2}
Why not an IGNORE rule to just drop that record entirely?
--
Chris Irwin
email: chris at chrisirwin.ca
web: https://chrisirwin.ca
More information about the kwlug-disc
mailing list