Trouble changing hostname

Strator

Verified User
Joined
Jan 19, 2011
Messages
283
Hi,

I have a small but annoying problem - hopefully someone can help me:

Your hostname, server, and the servername you have set in DirectAdmin, server.yourdomain.org, do not match. It is recommended that these two values are the same.

Solution: Either change the servername in DirectAdmin or run the 'hostname.sh' script via ssh to change your hostname

So I use this...

/usr/local/directadmin/scripts/hostname.sh my.server.name

Verify with this:

/bin/hostname --fqdn

...but after the next reboot, the hostname is reset to what it was before. Anyone have an easy fix? :)
 
Last edited:
Hello,

If you use a VPS you need to change hostname in a control panel where you start/stop/reboot your VE.
 
I am afraid I am still having issues with this after all those months. I recently go alerted to the fact that my mail server actually responds to HELO requests with "server" instead of "server.yourdomain.org" which has probably caused me deliverability issues in the past.

It appears like exim uses the result of uname -n for this, and that indeed returns "server" instead of the fully qualified domain name. Various sources claim that changing /etc/hostname will do the trick, but even after changing that from "server" to "server.yourdomain.org", uname -n will still return "server" only.

As a temporary measure, I have now set "primary_hostname = server.yourdomain.org" in exim.conf, but I'd rather make sure all server, host and network names are set properly on my system. Any pointers highly appreciated!

EDIT: Seems like this has actually been asked before, but it went unanswered: http://forum.directadmin.com/showthread.php?t=51370
 
Last edited:
Back
Top