# Transferring email from vestacp to cpanel server?



## GaleDribble (Oct 20, 2014)

I have a server running vestacp that is used for email only for one domain name, but I recently setup up cpanel somewhere else that manages my email for my other domain names. I want to transfer the email from the vestacp server to the cpanel one but am not sure how. Is there anyway I can download the mail to the new server from the old one?


----------



## wlanboy (Oct 20, 2014)

Another question would be "how can I migrate my emails from selfhosted VestaCP to the dirty cheap BuyVM SharedHosting offer" 

I would use ImapSync for the email part: http://imapsync.lamiral.info/README


----------



## nunim (Oct 20, 2014)

For individual IMAP accounts, you can copy the relevant sent, deleted, cur, etc folders to the mail directory of your cPanel account or you can use ImapSync as @wlanboy suggested.

I've used it many times for email migrations where I did not have access to the source files, it does a good job with the following caveats:

1. You need the passwords for both sides, this isn't an issue in this case.

2. It transfers each mail individually so it can take some time for large mailboxes.  I recommend using --useuid flag.

3. Some flags are not copied, i.e. forwarded


----------



## AlphaNine_Vini (Oct 20, 2014)

You can do a sync to the Imap. That would be the best way to do it. i recommend to contact your host if they dont allow to do that.


----------



## raj (Oct 20, 2014)

Another easy way is to open Thunderbird with both accounts.  Create the same folders in the new account as the old account. Then literally drag and drop all the email from one account into the other.  I've done that with success.

For example, inbox->inbox, then sent->sent, ....


----------



## bizzard (Oct 20, 2014)

raj said:


> Another easy way is to open Thunderbird with both accounts.  Create the same folders in the new account as the old account. Then literally drag and drop all the email from one account into the other.  I've done that with success.
> 
> For example, inbox->inbox, then sent->sent, ....


It works for smaller accounts. But those with GB's of mails, its a pain and uses your connection's bandwidth.

ImapSync is the best option and you could run it from your VestCP box to sync with the mail account in cPanel. The configuration is pretty simple.


----------



## wlanboy (Oct 21, 2014)

bizzard said:


> It works for smaller accounts. But those with GB's of mails, its a pain and uses your connection's bandwidth.
> 
> ImapSync is the best option and you could run it from your VestCP box to sync with the mail account in cPanel. The configuration is pretty simple.


Second that.

ImapSync can be called from your new server - so you don't have to use your own internet connection.


----------



## George_Fusioned (Oct 21, 2014)

Already done this in the past once, and had no problems at all:
 
- Create the email accounts in cPanel
- scp/rsync everything from VestaCP /home/[username]/mail/[domain]/ to cPanel /home/[username]/mail/[domain]/
- From WHM run "Repair Mailbox permissions"

Done.


----------

