Migrate to a new e-mail server while keeping your existing address

While switching e-mail provider (from provider A to B), you might want to keep the same address ([email protected]), and copy all your existing e-mails to your new server B. imap-backup can do that too!

It is best to use imap-backup migrate and not imap-backup restore here because migrate simply copies emails to folders with the same name as the ones they were downloaded from, while restore changes the names of restored folders if folders with the same name already exist on the destination server.

  1. Backup your e-mails: use imap-backup setup to setup connection to your old provider A, then launch imap-backup backup.
  2. Actually switch your e-mail service provider (update your DNS MX and all that...).
  3. As both the source and the destination have the same address, you need to manually rename your old account first:

    1. Modify your configuration file manually (i.e. not via imap-backup setup) and rename your account to [email protected]:

        "accounts": [
      -     "username": "[email protected]",
      +     "username": "[email protected]",
            "password": "...",
      -     "local_path": "/some/path/.imap-backup/mymail_domain.com",
      +     "local_path": "/some/path/.imap-backup/mymail-old_domain.com",
            "folders": [...],
            "server": "..."
    2. Rename the backup directory from mymail_domain.com to mymail-old_domain.com.

  4. Set up a new account giving access to the new provider B using imap-backup setup.

  5. Now you can use imap-backup migrate, optionally adapting delimiters and prefixes configuration if need be:

    imap-backup migrate [email protected] [email protected] [options]