Partially failed migration from CPanel - missing mail aliases

I've successfully migrated a number of virtual servers from WHM/Cpanel to Virtualmin via CPanel backup files. Here are the system details:

EXPORT FROM: CPanel version: build=54.0.16 running on CENTOS 6.5 x86_64 (the latter with a lot of upgrades applied, judging from apache/php versions etc) IMPORT TO Webmin version: 1.782 running on CentOS Linux 7.0.1406

This was mostly a magnificent experience (kudos!), but one import went a bit hairy.

The offending CPanel account was for a Wordpress Multisite setup with many parked domains, including some parked domains with mail aliases that weren't duplicated in the main domain. (So if x.com was the main domain, and y.com was the parked domain, I had mail forwarders forward@y.com set up that had no corresponding account or forwarder forward@x.com.) One of the parked domains also had its own mailbox accounts.

The account was created and most things were ok, but the mail forwarders (zillions of the buggers) weren't created. I had to go in and set them up manually in all the sub-servers corresponding with the original CPanel parked domains. (Manual creation of aliases went fine.)

Later, however, I tried to move one of the sub-servers out from under the parent to become a new toplevel server - see my post here.

The files were moved successfully; however, Virtualmin still showed the server as a subserver of its original parent, and it ALSO showed it as a sub-server of another toplevel server on a subdomain of the moved domain (ie on sub.y.com, when I'd moved y.com out from under x.com). These two "rogue" sub-accounts were actually aliases of the same (toplevel) account; if I disabled either one, they both showed as disabled AND the proper toplevel account became disabled.

My CPanel config was particularly baroque (I was impressed that it worked as an import at all!) but I'm hoping the info here is enough to recreate the issue with a much simpler CPanel import.

Status: 
Active

Comments

konamacphee's picture
Submitted by konamacphee on Mon, 02/22/2016 - 14:37

PS the sub-server y.com that I was attempting to move out-from-under was the parked domain that also had its own proper mailboxes. (This was the only parked domain with mailboxes as well as mail aliases.)

Is there any way we could get a copy of the cPanel backup you tried to migrate? I'd like to try a test migration on one of our own systems, to see why Virtualmin was missing those forwarders.

konamacphee's picture
Submitted by konamacphee on Wed, 02/24/2016 - 04:56

I've also found that sub-servers created for parked domains that were sub-domains of the parent, rather than stand-alone domains, have some config issues.

The parent site is x.com; assume server username is x. Assume I had parked sub-domains of the form sub.x.com (ie a subdomain) and y.com (ie a different domain altogether).

These are the directories I find in /home/x/domains/y.com : cgi-bin etc fcgi-bin homes logs public_html tmp

These are the directories I find in /home/x/domains/sub.x.com : homes logs

The site on sub.x.com was therefore set up without its own php.ini file (no etc directory). Also - and here's where the trouble came in that led me to find the issue - it was picking up a php.ini file from a different sub-server (according to phpinfo()). This php.ini file came from the last sub-server to be found in /home/x/domains, so I'm guessing this was a fallback after not finding its own?

Since the cPanel backup format is basically undocumented, we have to reverse-engineer it from example backups :-(