Change server domain to a new one

The current domain I’m using to access my mail-in-a-box server is going to expire soon, and I don’t want to renew it, and I don’t use it for an email address. Can I change to another domain without having to start all over with a new installation? Thanks

So you’re using <box.expiringdomain.com>, but not for mail, and want to change it to <box.anotherdomain.com>? I’m not sure this will work, but if I were to try this I would:

  • make a backup of your VPS
  • spin-up a fresh VPS and restore the backup to this
  • look at /etc/mailinabox.conf and change the entry for PRIMARY_HOSTNAME, and the _IP entries (because the fresh box has different ones)
  • make a user on the <anotherdomain.com> an admin in the admin panel.
  • re-run the mailinabox installation

If you don´t encounter issues, you can try it on the real box.

Perhaps you could elaborate on your reasons for not wanting to start all over?

1 Like