[SOLVED] Mail headers showing Received: from hostname (localhost.localdomain [])


Sep 1, 2021

I've installed and configured PMG. We're relaying email both inbound and outbound via a smarthost. I noticed on the headers that I get the following -

Received: from mxserver.example.net (localhost.localdomain [])
    by mxserver.example.net (Proxmox) with ESMTP id 69FD7201062
    for <recipient@example.com>; Thu, 19 May 2022 04:15:28 +0100 (BST)

I've redacted the hostname & recipient. The hostname is fine bit you can then see the localhost.localdomain bit. My /etc/hosts file looks like the below:

Code: localhost.localdomain localhost
PUBLIC_IP_HERE mxserver.example.net

# The following lines are desirable for IPv6 capable hosts

::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

Any idea why this might be / is it a problem? I can imagine some mailservers seeing this as suspicious and flagging as spam...


Stoiko Ivanov

Proxmox Staff Member
Staff member
May 2, 2018
Any idea why this might be /
yes - put shortly every single hop (SMTP server) usually adds a Received header to the top of the mail - for the following reasons:
* it helps detecting mail-loops (if a smtp server sees itself in the received headers it's a sign of a loop)
* it helps in debugging issues with mail transport
* it helps in seeing where a spam-mail/unwanted mail originated (at least the first trust-worthy hop will write where it received the mail from)

is it a problem? I can imagine some mailservers seeing this as suspicious and flagging as spam...
At least in my experience not really - mails getting passed through multiple hops inside some network (and also inside a single system) is quite a common pattern - and IIRC I've never seen any mail being rejected/treated as SPAM/... because localhost.localdomain or showed up in the 'Received' headers

I hope this explains it!


Sep 1, 2021
Thank Stoiko,

Very useful indeed! Appreciate your help and I'll mark this as solved as it seems to be nothing to worry about. I just wanted to check it wasn't the result of a misconfiguration.

  • Like
Reactions: Stoiko Ivanov


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!