Submitted by responsiveny on Mon, 03/02/2015 - 13:33
Hi,
My Virtualmin server on AWS EC2 is reporting hostname as:
$ hostname ip-172-31-37-191.ec2.internal
but in /etc/hosts I have:
[centos@ip-172-31-37-191 ~]$ more /etc/hosts 127.0.0.1 killjoy.responsiveny.com localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1
As a result, some email "from" are looking like this:
Mar 2 19:14:19 ip-172-31-37-191 postfix/qmgr[1796]: 6438D8A8E2E: from=<example@ip-172-31-37-191.ec2.internal>, size=1003, nrcpt=1 (queue active)
What is the proper way to correct the FQDN of this server?
Status:
Closed (fixed)
Comments
Submitted by andreychek on Mon, 03/02/2015 - 13:41 Comment #1
Howdy -- you can set the hostname in Webmin -> Networking -> Network Configuration -> Hostname and DNS Client.
When setting that, make sure that the "Update hostname in host addresses if changed" option is selected.
Also, you'd want to review afterwards that the new hostname is listed on the "mydestination" line of your /etc/postfix/main.cf file.
Submitted by responsiveny on Mon, 03/02/2015 - 13:49 Comment #2
Hmm, "update hostname..." checkbox is not available, see screenshot:
http://screencast.com/t/yusVZx7UnRU
Submitted by andreychek on Mon, 03/02/2015 - 13:54 Comment #3
In that case, you may just want to manually verify that /etc/hosts contains an entry with your server's primary IP address (usually the one on "eth0"), along with your updated hostname.
Submitted by responsiveny on Mon, 03/02/2015 - 14:00 Comment #4
It didn't make the change in /etc/hosts. I'll just go ahead and add it manually. Postfix is set to use hostname for outbound email domain so I shouldn't need to manually edit main.cf.
Submitted by responsiveny on Mon, 03/02/2015 - 15:59 Comment #5
you should be able to close this now
Submitted by JamieCameron on Mon, 03/02/2015 - 16:49 Comment #6
Submitted by Issues on Mon, 03/16/2015 - 17:50 Comment #7
Automatically closed -- issue fixed for 2 weeks with no activity.
Make sure you setup your FQDN before installing VM, you are warned at ./install.sh
It will save you a lot of bother I believe it says.