1) I need to migrate some mbox imap email accounts from a shared webhosting provider to another one.

2) Both servers seem to use Devecot, as a telnet command on port 143 shows an identical response:


3) I don't know Dovecot version because I don't have access to "dovecot --version" command.

4) I can't use "doveadm-sync" because the command is not available on my shared hosting account.

5) I prefer to leave imapsync perl script as the last option because I want to preserve the UID.

So, I need to know what migration procedure can be adopted:

if I copy the /home/user/mail/ directory containing all email account from the source server to the destination server, can I expect to see all accounts working with all the emails transferred ?

Should I first create from cPanel all the email account with identical names and password on the destination server ?

Any suggestion will be much appreciated.

Thanks in advance!


If dsync is not available on the source server you can use fetch utility on the target one. Exact commandline is depend on the target configuraton so you have to dig in the given direction.

  • Before starting the 1:1 copy, should I first create the same "empty" email account with the same password as the source server ? Also, after the copy should I start some actions like deleting the index files ? – Mkgl Jun 18 '16 at 13:51
  • It's depends. dovecot can be configured in various ways, so you can force it to accept for delivery every message for your domain(s), even those with nonexistent localpart. autocreate/autosubscribe will force dovecot to create corresponding maildir (like /var/mail/%d/%n) and then, when you actually create an account for that user, he'll get the non-empty migrated maildir. But such trick need an accurate configuration to avoid unforseen consequencies. Migrating via fetch is non-destructive so if you fail you can try it again and again. – Kondybas Jun 18 '16 at 16:22
  • In short what done: 1) Create from cPanel the same email accounts existing on the old server. 2) Transfer the "tarred" mail folder from the old to the new server. 3) Start the webmail on the new mail server and check if the emails were available. 4) Switch incoming mail server on Outlook 2007 to see if the emails were available. For testing, on Outlook 2007 I've deleted a .pst cache file, forcing the client to download all emails again. The switch was absolutely transparent without any problem. All the emails were available. I hope something weird do not happen later. – Mkgl Jun 19 '16 at 16:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.