I just wonder, what's the norm for the first (bottommost) "Received" header in emails?
I run my own mail system (Postfix for MSA/MTA) and to avoid exposing my home machine's IP address I've used this for the
header_checks setting for the authenticated submissions:
/^\s*(Received: from)[^\n]*(.*)/ REPLACE $1 [127.0.0.1] (localhost [127.0.0.1])$2
I believe it makes sense, privacy-wise, to not disclose my home IP address or my rough location if I'm on the go.
Effectively, my emails look like this excerpt:
... Received: from drdaeman.pp.ru (drdaeman.pp.ru. [18.104.22.168]) by mx.google.com with ESMTPS id v68si4673202lfd.50.2017.12.21.07.26.50 for <[email protected]> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 21 Dec 2017 07:26:50 -0800 (PST) ... Received: from [127.0.0.1] (localhost [127.0.0.1]) by drdaeman.pp.ru (Postfix) with ESMTPSA id 7CAF160104 for <[email protected]>; Thu, 21 Dec 2017 16:58:09 +0300 (MSK)
However, I've seen an opinion that this "Received from localhost" header may lead to Google leaning towards marking my emails as spam. Which they sometimes do.
Of course, I can't be sure that's the reason and I know it's essentially pointless to ask why big mail providers could treat messages as spam, but still... I think it's still a sensible question on what use as a first "Received" header.
E.g., should I use self-referencing "
Received: from drdaeman.pp.ru (drdaeman.pp.ru. [22.214.171.124]) by drdaeman.pp.ru (Postfix) ..." instead? Or should I completely omit the "from" part and let it be just "
Received: by drdaeman.pp.ru (Postfix) with ESMTPSA ..."?
What's the sanest, most standard- and reality-compliant recommended practice nowadays?