(My current hoster became very unreliable, network issues, support just not existent. In short: I need to move!)

So I want to move to a new server and in the process change the MAILCOW_HOSTNAME.
Is it enough to just change MAILCOW_HOSTNAME in the mailcow.conf?
And at which point in the process of moving should I do that? (At the point of restoring the backup the old hostname will still be pointing to the old server but if the certificates are all renewed before mailcow shouldn’t try to update those right?)

  • Before I restore the backup (edit mailcow.conf in the backup folder).
  • After restoring the backup but before the first start.
  • After restoring the backup but start it once before changing.
  • Just change it whenever, restart mailcow, it’ll manage.
    Older threads on here say to just down, change and up -d. But I’m restoring from a backup and I’m also kind of worried that certificates will be all messed up after. I don’t have any ADDITIONAL_SAN set up. Everything is handled via mail.oldhostname.tld. for now. Are the servers IP addresses defined somewhere and it’ll fail to bind to them on the new system?

Other things I considered before moving to a new server:

  • Handle DNS (for the new hostname) before the “big move” so it’s already propagated and I only need to change MX records.
  • Set the TTL of MX records to 1 minute on the hosted domains so nothing (not too much) gets lost when I finally change it to the new system.
  • Add the IPs of the new system to the SPF before the move so mails won’t get flagged.
  • Firewall off the system before the final backup so sending mailservers retry and hopefully hit the new system by the time everything is up and running and users can’t send anything via the old server during and after the move.
  • The new IPs of the new server will be clean/not on any blocklists. (Already have the new Server ready to go)
  • IP reputation with BIGMAIL will be a pain in the a**.

More questions:

  • How do I clean up the system once everything is running? I will restore from a backup of a Mailcow instance that has been running since 2019. Surely there must be something I can get rid of or even optimize. I always used the update.sh script.

Anything else to consider? I want this to go as smooth as possible. I have half my family and a few of their small businesses connected to this server.
Obviously I will do some testing before but any input/shared experiences would be nice. Anything I forgot? I will keep my old system for a few more days to roll back to if anything doesn’t go as expected.
I’m aware that the users need to change their mailserver to the new hostname and I think they are all capable of doing so. But I’m also thinking I add the old hostname as an ADDITIONAL_SAN in the future? Would this be sufficient?

Thanks for any advise!

    Why changing the hostname at all? It keeps the configuration effort for everyone (users and admin) at minimum.

    • albi replied to this.

      Have something to say?

      Join the community by quickly registering to participate in this discussion. We'd like to see you joining our great moo-community!

      esackbauer Short answer: I want to. I don’t like it.

      Long answer: All my other hosts use a different domain for their host names. It’s made up of my first and last name which I feel isn’t really suited for a mailserver that hosts more than my personal mail. Changing it is on my list for over a year now. The host name never was intended to be permanent. I set up a test system, was happy how it worked and kept it. You know how it is. There is nothing more permanent than a temporary solution.

      Everyone has already been notified and maybe, if the ADDITIONAL_SAN works as I intend to, I add the NEW host name to the OLD server and give my users some time to set it up. There is also a new chunk of users I will take over once migrated and I want to give them the new host name.

        albi , I add the NEW host name to the OLD server and give my users some time to set it up.

        Thats a good idea. Then the migration itself will be less complicated, and will be focused around the server part only.

        albi After restoring the backup but before the first start.

        That should be the best way to change the hostname.

        albi But I’m restoring from a backup and I’m also kind of worried that certificates will be all messed up after.

        Do a force renewal after the first start:
        docs.mailcow.email Icon Advanced SSL - mailcow: dockerized documentation

        No one is typing