I have Mailinabox running on my main email address for several weeks now. Since I am running a few other mail servers and I want to minimize admin work, I figured I might as well migrate the other addresses, adding their domains to the Mailinabox config.
The only thing bothering me, is that the server is running at box.myveryspecificdomain.tld instead of box.mygenericmailserverdomain.tld. So, is there an easy way to change the “root domain” that the server is running on? As far as I can tell, I’d have to at least
change the hostname of the server
change the nameserver records on all served domains
request a new SSL certificate for box.mygenericmailserverdomain.tld and install it
The safest way would be to set up a new machine following the setup guide and the maintenance guide, which will explain how to move the old files to the new machine.
Otherwise, you’ll need to re-run the Mail-in-a-Box setup and provide the new domain name, you’ll need to manually change the name the box knows itself as at the system level (hostname command), update reverse DNS at your ISP, add new glue records (see the setup guide), update nameserver records (see the setup guide), and maybe other things I’m forgetting.