There exists a server1.example.com running WHM/cPanel that hosts clients who are not tech mavens.
Some of those clients use server1.example.com to collect their mail using POP3 and/or IMAP, and asking them to change their mail servers to mail.theirdomains.tld in their email clients would yield similar results to asking flowering plants to play the bassoon.
I want to migrate those clients to a new server running Virtualmin on Rocky with the hostname server1.example.net.
Will creating an alias server1.example.com → server1.example.net allow those clients to continue collecting mail using server1.example.com as their mail servers?
Will Virtualmin vomit if I attempt to create nameservers ns1.example.com and ns2.example.com on server1.example.net (initially skipping resovability check), in addition to ns1.example.net and ns2.example.net, using the same two IP addresses?
Assume that server.example.net does not yet host the virtual server example.com but eventually will, at which time the nameservers for example.com IP’s will be updated at the registrar and in DNS on that virtual server.
Here’s how I’d do it, though it may yield a few complaints it would be safest and allow customers to continue using the service as if nothing has changed.
Setup new server with the same “hostname”
Map all domains and mailboxes identical to the original server
Migrate DNS so that “hostname” points to new server
Here’s where it sort of gets ugly. The first thing people will notice if they use IMAP is that all their mail has suddenly vanished… Oh no… Not really… This is temporary.
Once you’ve confirmed “new” mail is hitting the “new” server (usually takes less than 24 hours for most TLDs), use an app like “imapsync” in conjunction with a script to automate the process.
*** This script will migrate email content from “old” to “new” server preserving things ***
Once this is complete, those few complaints will go away as people will start seeing their mailboxes populate with older mail.
The benefit of this approach is you can do it transitional, and new mail is NOT lost as it’ll either reach the “old” server or “new” server during the initial phase of migration. As you’ll be “syncing” the mailboxes from old to new, you could complete this process a few times during the final step to ensure all mail from “old” reaches “new” server without duplicates.
I use this process to migrate terabytes of email between servers every couple years as we do major server upgrades.
At risk of going off-topic I want to point out that during a migration, imapsync can be used before the new server is made live - doing so eliminates the ugly issue of users seeing no mail on the new server
Thank you Peter. That’s another option. I’ve done it that way myself many times. I’m just considering options at this time.
None of the clients care about a few hours of downtime in the middle of the night; and the servers are all lightly-loaded and the clients all US-based, so that’s a doable thing. I could just shut down the mail server, make backups, reinstall the OS and panel on the same machines, and restore the sites from backups. No mail will be lost because the mail server will have been shut down.
But I do have a spare server with a Pro license that’s doing nothing especially useful at the moment, so I have that available if needed. Or I could downgrade it to GPL and use the license for one of the replacements.
I’m just gathering information to ponder options at this time. Thanks again.