These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for myhostname and Postfix on the new forum.
Vmin GPL
CentOS Linux 7.4.1708
Hi,
In an attempt to understand why my emails are ending up in Outlook.com spam folder I've been looking at the email headers and have noticed that the
'Received: from' and 'HELO' fields are server1.mydomain
which according to an email tester is not associated with my ip address, my rDNS is server1.mydomain.com
Postfix main.cf file has
myhostname = server1.mydomain
which would be the reason for the 'Received: from' and 'HELO' fields in the email headers.
I've checked:
$hostname = server1
$hostname -f = server1.mydomain.com
I can change the myhostname field in main.cf to have the .com suffix, the email header then validates, but want to know how Virtualmin is generating server1.mydomain without the .com
I see that myhostname in main.cf is derived from the value in Webmin > Servers > Postfix Mail Server > General Options > Internet hostname of this mail system
However the help popup states:
This parameter specifies the internet hostname of this mail system. The default is to use the fully-qualified domain name from gethostname(). $myhostname is used as a default value for many other configuration parameters
I would have thought that $myhostname would be server1.mydomain.com or the short version of just server1
I haven't seen any references to server1.mydomain on the system, only in Postfix, so am curious as to how it got there - I have never previously made a change to the Postfix setup.
Sounds like /etc/hosts or DNS may have been misconfigured at the time virtualmin was installed, and since corrected.