cPanel-to-DirectAdmin conversion tool

Ah, I didn't realize DA was using Maildir now. cPanel uses Maildir too, so it is just a matter of moving the cPanel files to the right folder.

My DA server is still using mbox and locate doesn't return anything for Maildir. So to implement support in this tool, we'll need to know where exactly the Maildir data should be put in a DA user backup. After I know that, adding support should be easy. I think anyone with a copy of DA using Maildir can answer that--or I could upgrade my server later today and find out. :)

Cheers, Phil.

Cpanel only uses Maildir if the client has upgraded to Maildir from Mbox. But there are hundreds if not thousands of cpanel installations that have never upgraded to Maildir. I should know, i have seen many cpanel installations that we administer that are still at Mbox.
 
Dovecot is not installed by default.
DirectAdmin said the files should be copied into /home/username/imap/domain.com/username/Maildir. Easy enough? :)

This tools works by converting cPanel backups to DirectAdmin backup format. By design, it doesn't interact with the cPanel or DirectAdmin file system itself.

I need to know where in a DirectAdmin backup the Maildir data should be put. I'm guessing it might be ./backup/DOMAIN/email/data/imap/Maildir, but this needs to be confirmed either by DA or by someone creating a backup on a Dovecot system.

Phil.
 
I think the main problem here is that Maildir data from cPanel will be ignored when restored to a DirectAdmin using mbox, and the same for mbox cPanel backups restored to a Maildir DA.

Ideally, this tool would prompt which format the DA backups should be created with, and it would then convert formats if the data in the cPanel backup is something different. However, I think we could get away with only having the option to convert to Maildir from mbox. I can't see implementing support to convert to mbox when DA can simply be upgraded to use Maildir.

In reality though, I'm not sure any conversion is necessary. Conversion is only useful if you have no control over the source cPanel machine. Otherwise, you could simply upgrade cPanel to Maildir before creating the cPanel backups, and then there would be no problem restoring them to a Maildir DirectAdmin.

Anyway, as soon as we know where Maildir data belongs in a DA backup file, it will be easy to change this tool to include CP Maildir data. As for conversion to/from mbox, I'm not sure what will happen there--that's a bit more of a task.

Phil.
 
Last edited:
Im going to upgrade tonight, so ill let you know how it goes and then i hope ill be able to idenify first hand what goes where etc.
 
Well someone's oversimplified the structure for DA servers:

For virtual users:
Code:
/home/USERNAME/imap/DOMAIN.NAME/mailname/Maildir/DIR-STRUCTURE
where DIR-STRUCTURE means directories such as cur, new, tmp, etc.

For site owner users:
Code:
/home/USERNAME/Maildir/DIR-STRUCTURE

Jeff
 
The upgrade the other night went very well.

I left it for a couple of days to make sure everything is stable and now im trying to upload the old email files from the cpanel server into what should be the right directory - its only part way through the process, but I thought i would be able to see something by now in webmail....so far it hasnt worked.
 
FYI - i couldnt get the emails to work...
Nor do you give us enough information to help you get it to work.
Have you created a domain on the DA server and checked to see if the ownership and permissions are the same for mailboxes DA created as they are on the mailboxes you've moved?

Jeff
 
Hello,

Just to give everyone an update--I talked to DA recently and John was able to answer my questions about the DA backup format. I plan to make some changes to this tool later this week. The changes will enable cPanel Maildir to DirectAdmin Maildir conversion.

Additionally, this tool will continue to support cPanel mbox to DirectAdmin mbox conversion, but cross-format (i.e., cPanel mbox to DirectAdmin Maildir) conversion support will come at a later date.

Phil
 
Sorry, I was quite tired at the time.

I have installed Dovecot and I uploaded the old email files to the appropriate folder:

/home/username/imap/domain.com/username/Maildir

and then checked the email account that Id uploaded to and they didnt appear. I presume this means I actually need to do some conversion on the emails themselves aswell as upgrade to use Dovecot.

Thanks!
 
Back
Top