HOWTO: Migrate Your Email From DreamHost to MXRoute

27 March 2017 Update: A huge thanks to Rena from Renaissance Geek for pointing out that I had forgotten to include the important step to delete all the email addresses from DreamHost as part of this process. As she indicated to me, if you don’t do this users could still be able to access their DreamHost accounts and craziness (not hilarity) could ensue.

Consequently, I added email removal as the new Step 6. You’ll note that this addition gets a little hairball because you need to switch the MX routing back to DreamHost briefly in order to be able to delete the accounts – but at least this way you/your users shouldn’t miss incoming email along the way.


In the event that you’re dissatisfied with the performance of DreamHost’s email service for your domain(s), you might want to check out MXRoute.1

While I’m happy with DreamHost’s web hosting and DreamObjects service, I’ve been a little underwhelmed lately with stability and performance of the bundled email services. As I was trying to diagnose an email issue, MXRoute’s reviews and tagline (“Because you’re tired of email being an afterthought”) caught my attention. They’re a small company that’s exclusively dedicated to email hosting with the same unlimited domains & email addresses you’ll find bundled from web hosting providers with very reasonable storage-based pricing tiers.

While the switchover process is fairly simple in terms of number of steps involved, there are a couple of caveats that led me to put together this guide for other people who haven’t actively managed a mail server in the past. At this point, all the usual disclaimers apply: do the following at your own risk, I’m not responsible for lost data/borked email servers/delivery, etc., etc. The only thing I can say is that these are the steps I undertook that worked for me; your mileage may vary.

Now that we’ve got that out of the way…

Once you’ve signed up with MXRoute, the steps are broken down as follows:

  1. Add Domain(s) to MXRoute
  2. Add Email Address(es) to MXRoute
  3. Update the MX Record(s) With DreamHost
  4. Update Email Clients with MXRoute Information
  5. Synchronize DreamHost’s and MXRoute’s IMAP Servers for Each Email Address
  6. Delete All Dreamhost Email Accounts
  7. Add Email Filter(s) with MXRoute for Plus Aliases

Steps 5 and 6 are technically optional as you can easily stop at Step 4 and pull/send email quite happily using MXRoute. That said, I assume that (A) you’re using IMAP and not POP and (B) you’ll want your legacy email to be accessible on MXRoute and not DreamHost.

Step 7 is also optional for a couple of reasons:

  • The “+” alias trick that DreamHost borrowed from Gmail isn’t really documented by the former so I’m not sure how many DreamHost users actually use it (I only found out about it by asking DreamHost Support if they had any plans to add similar functionality).
  • MXRoute handles “+” aliases (or “plus aliases”) differently than DreamHost, which some people might appreciate; Step 7 is only needed to replicate the DreamHost/Gmail behavior.

Let’s get started.

Step 1: Add Domain(s) to MXRoute link intact

If you’re only working with one domain, this is done as part of the registration flow when you sign up with MXRoute. If you have additional domains you want to migrate, you can do so as follows:

  1. Log into your primary MXRoute Control Panel.
  2. Navigate to “My Services” under the “Services” menu. On the new page, click on your domain.
  3. When the “Product Details” page loads, click on “Login to cPanel” from the “Actions” menu on the left. This will load cPanel a new window or tab, which is where you make all of your technical changes.

    Excerpted screenshot of MXRoute 'Product Details' page

  4. Under the “Domains” section on the cPanel homepage, select “Addon Domains”.

    Excerpted screenshot of MXRoute cPanel page

  5. Under “Create an Addon Domain”, enter the additional domain you wish to add under “New Domain Name” – when you tab out of the field, it will prepopulate the “Subdomain” and “Document Root” fields (don’t change any of this).

    Excerpted screenshot of MXRoute 'Create an Addon Domain' feature

  6. Click the “Add Domain” button.
  7. Once complete, it will load a new page indicating the new addon domain has been created.

In the event that you have a domain with email addresses you want to act as an alias to another you own (e.g., “joe@example.com” to “joe@thisismyexampledomain.com”), you’ll need to take another few additional steps:

  1. From the cPanel homepage, click on “Aliases” under the “Domains” section.
  2. On the newly loaded page, enter the domain that will serve as the alias in the “Domain” field under “Create a New Alias” (e.g., “example.com”).
  3. A new page will load relaying a success message. Click the “Go Back” link at the bottom.
  4. Under the “Remove Aliases” section, click the “Manage Redirection” link.
  5. On the newly loaded page, add the destination domain (e.g., “http://thisismyexampledomain.com”) and click the “Save” button.

Step 2: Add Email Address(es) to MXRoute link intact

Another suggestion Rena from Renaissance Geek offered was if you’re doing this on behalf of clients, you might want to consider instituting new passwords for each email account to prevent them from logging into Dreamhost’s servers after the change to MXRoute goes live.

Step 2.1: Email Address(es) link intact

In the event you have multiple email addresses, you can make them one-at-a-time or bulk-upload a CSV/Excel spreadsheet. To do it one-at-a-time:

  1. From the cPanel homepage, click on “Email Accounts” under the “Email” section.
  2. On the newly loaded page, enter the domain that will serve as the alias in the “Domain” field under “Create a New Alias” (e.g., “example.com”).
  3. On the new “Add Email Account” page, enter in all the details (be sure to remember to use and save a new password for each), and click “Create Account”.

Excerpted screenshot of MXRoute 'Add Email' feature

To bulk-upload:

  1. In Excel, create a new spreadsheet: The first column should be the email address, the second column the password, and (optionally) the third column the quota. Save as a (legacy) .xls file (I personally had problems with trying .csv).
  2. From the cPanel homepage, click on “Address Importer” under the “Email” section.
  3. On the newly loaded page, select “Email Accounts” in Step 1, click the “Browser” button under Step 2 to select your .xls file, and click the “Next” button. (Unless you added a header row, be sure to deselect “Treat first row as column headers” before hitting the button).

    Excerpted screenshot of MXRoute 'Address Importer' feature

  4. You will then be presented with what the feature thinks should be the email addresses, passwords, and quotas (if applicable). Once you confirm, click the “Next” button and you’ll be all set.

Step 2.2: Email Forwarder(s) / Forwarding-Only Addresses link intact

In the event you have (or want) email forwarders that will relay emails sent to an alias to an actual email address, you can make them one-at-a-time or bulk-upload a CSV/Excel spreadsheet. To do it one-at-a-time:

  1. From the cPanel homepage, click on “Forwarders” under the “Email” section.
  2. On the newly loaded page, click the “Add Forwarder” button.
  3. On the newly loaded page, enter the forwarding email address info, the destination address info, and click the “Add Forwarder” button.

Excerpted screenshot of MXRoute 'Add a New Forwarder' feature

To bulk-upload:

  1. If you have them pre-configured in DreamHost, log into your DreamHost Panel and navigate to the (Panel > Mail > Manage Email) page.
  2. Click the “Bulk-Edit Forwarding-Only Addresses” button.
  3. On the newly loaded page, copy the entire “Now editing” text field and paste into an Excel spreadsheet. The first column should be the forwarding email address and the second column the destination address it should forward to. Save as a (legacy) .xls file.
  4. From the cPanel homepage, click on “Address Importer” under the “Email” section.
  5. On the newly loaded page, select “Forwarders” in Step 1, click the “Browser” button under Step 2 to select your .xls file, and click the “Next” button. (Unless you added a header row, be sure to deselect “Treat first row as column headers” before hitting the button).

    Excerpted screenshot of MXRoute 'Address Importer' feature

  6. You will then be presented with what the feature thinks should be the forwarding- and destination-addressed. Once you confirm, click the “Next” button and you’ll be done.

Step 3: Update the MX Record(s) with DreamHost link intact

Before you pull the trigger and make things all official, you’ll want to make note of the specific DreamHost email server(s) that are hosting your email address account(s) in the event you want to migrate your email from DreamHost to MXRoute. Please see this DreamHost help document to learn how to find your DreamHost mail server.

Once you have that information, log into your DreamHost Panel and navigate to the (Panel > Mail > Custom MX) page. Click the “Edit” button with the gear icon next to the domain you want to move to MXRoute:

Excerpted screenshot of DreamHost default configuration on 'Custom MX' page

Once the new page loads, scroll down to the bottom where it says “Custom MX Records”. You’ll need to enter the MX record information provided in your introductory “Important Account Information” email sent to you by MXRoute.

Excerpted screenshot showing DreamHost 'Custom MX Records' feature

  1. Replace the first MX Record line with 10 followed by a space, followed by the “Priority 10” MXRoute server.
  2. Enter in the second MX Record line 20 followed by a space, followed by the “Priority 20” secondary MXRoute server.
  3. Deselect “I will still check my email at DreamHost”.
  4. Click the “Change this domain to use custom MX records now!” button.

Once complete, DreamHost will redirect you back to the Custom MX page indicating success and when you can expect your changes to go live. Much like updating your domain’s DNS information, it will usually take a few hours for the MX changes to propagate across the Internet.

You’ll notice that the listing’s description for the domain you just updated will change appropriately.

Excerpted screenshot of DreamHost 'Custom MX' page showing account with non-DreamHost MX configuration

If you have additional domains to migrate, repeat as needed.

Step 4: Update Email Client(s) with MXRoute Information link intact

Once you’ve confirmed that the MX record changes have propagated throughout the Internet (such as by comparing the same email account on both DreamHost and MXRoute webclients), go ahead and update the servers to point to MXRoute in your email client(s) – along with the new password(s).

Step 5: Synchronize DreamHost’s and MXRoute’s IMAP Servers for Each Email Address link intact

You have a couple of options of getting all your pre-existing email onto MXRoute, including paying MXRoute $10 to do it for you.2 Fortunately, there are some DIY options including some free ones, like the two I tried: mnIMAPSync and imapsync. Some caveats:

  1. mnIMAPSync is a commandline Java solution, which may make a difference depending on your feelings about Java; if you decide to go this route, it will require installing the Java SDK.
  2. If you clicked through already, you’ll note that imapsync’s creator actually charges €50 for it. Fortunately, he does provide a free opensource version of imapsync. If you’re a Mac user, there is a version of imapsync on Homebrew.
  3. Technically, I synchronized before updating the MX records (being overly cautious, don’t you know). While it gave me greater peace of mind, I did need to run each migration again after the MX changes propagated in order to catch any mail that was received by DreamHost before MXRoute took over. If you’re of a similar mindset, you can this too but I don’t see a really good reason to do it this way (other than calming nerves and/or having the vast majority of your legacy email immediately available to you on MXRoute after the MX information propagates).

While mnIMAPSync worked fine, the in-progress feedback was a little on the terse side for me… especially compared against the very verbose feedback you get from imapsync.

Assuming you also choose to use imapsync, I recommend using the --ssl and --passfile options instead of sending your passwords through in the clear. After successful installation of imapsync…

Step 5.1: Create Two “passfile” Files for Each Address link intact

Using the commandline, cd into a working directory (or mkdir one, then cd into it) where you plan to create the files (and for imapsync to write its log files). Once there, create the first passfile (e.g. touch password1 (or, if you have more than one email address to migrate, something more specific and unique for each)), enter your DreamHost password for the email account on the first line (e.g., nano password1) and save. Repeat for the second passfile (e.g. password2) and enter your MXRoute password for the email account.

Step 5.2: Run the Migration link intact

Without moving out of the working directory that contains the passfiles, enter the following command with the appropriate changes:

  • dreamhost.mailserver.com: Remember in Step 3 how you were to make note of the DreamHost email server(s) that host your email address(es)? You’ll want to enter that here.
  • mxroute.mailserver.com: Enter the mail server information that came in the aforementioned introductory account information email from MXRoute.
  • you@example.com: The email address in question that you’re migrating.
  • password1 and password2: These are the file names for the passfiles you created in Step 5.1.
  • --port1 993, --ssl1, --port2 993, --ssl2: These are the configurations needed to force the entire migration through SSL.
  • --noexpunge: This prevents imapsync from deleting the email from the DreamHost server. If you’re a little more carefree with your past email then me, feel free to leave this option off.
  • There are plenty of additional options available in imapsync, so feel free to explore if you want to get fancier.

Note: The command below is all one line; excuse the (visible) line breaks, but there should be no line breaks when you enter this command in the commandline.

imapsync --host1 dreamhost.mailserver.com --port1 993 --ssl1 --user1 you@example.com --passfile1 password1 --host2 mxroute.mailserver.com --port1 993 --ssl2 --user2 you@example.com --passfile2 password2 --noexpunge

Depending on how much email there is to be migrated, this may take a while.

Step 6: Delete All DreamHost Email Accounts link intact

If you try going to the Panel > Mail > Manage Email page on DreamHost at this point, you’ll note that only the forwarding email address feature is available. This is because when you deselected “I will still check my email at DreamHost” back on the Custom MX Records page in Step 5, access to all the email accounts within the domain(s) you migrated have been effectively hidden from view.

If you’re just migrating your own accounts (and don’t have strong feelings about your historical email on DreamHost’s servers) or have issued new passwords for use on your clients’ accounts on MXRoute (and they don’t have strong feelings either), you could skip this step.

But in the interest of completeness, here’s the kinda-hairball part you’ll need to do to actually delete those accounts off DreamHost:

  1. Go back to the Panel > Mail > Custom MX page.
  2. Re-select “I will still check my email at DreamHost” for the migrated domain.
  3. Click the “Update your custom MX records now!” button.
  4. Head back to the Panel > Mail > Manage Email page and quickly delete all the email accounts.
  5. Go back to the Panel > Mail > Custom MX page, and re-deselect “I will still check my email at DreamHost” for the migrated domain.
  6. Click the “Update your custom MX records now!” button (for hopefully the final time).

Repeat for any additional domains. Whee!

Step 7: Add Email Filter(s) with MXRoute for Plus Aliases link intact

Now that you’re up to speed on the super-convenient plus alias email trick and how it can help you manage new email signups (as well as monitor for spam), you should be aware that MXRoute handles any email sent to an address with a plus alias very differently from Gmail and DreamHost – in such a way that you could completely miss seeing any emails sent to the aliases! Specifically, MXRoute will automatically create a new server-side mailbox for each alias, so you will NOT see those emails in your inbox!

On one hand, it’s pretty handy if you only have a few plus aliases and want to easily see if there’s any spam abuse happening on them (in which case, you’d likely avoid implementing this step). On the other, if you actively use plus aliases as you sign up for new newsletters or services, it quickly becomes a management nightmare as you’ll need to go through each alias mailbox to act on each email sent to them.3

Fortunately, reverting the plus alias behavior to be consistent with Gmail and DreamHost just takes a simple server-side email filter:

  1. Under the “Email” section on the cPanel homepage, select “Email Filters” (or, if you have multiple email addresses that you plan on using with plus aliases, consider opting for “Global Email Filters” instead).
  2. Click on “Manage Filters” with the wrench icon next to the email address you want to configure.

    Excerpted screenshot of MXRoute 'Email Filters' feature

  3. On the new page that loads, click the “Create a New Filter” button.
  4. Configure as follows:
    1. Enter an appopriate name for the “Filter Name” (e.g., “Redirect Plus Aliases to Inbox”).
    2. Change the left “Rules” dropdown menu to “To”.
    3. Leave the right “Rules” dropdown menu as “contains”.
    4. Enter a single “+” in the text field.
    5. Change the “Actions” dropdown menu to “Deliver to Folder”.
    6. Hit the newly-appeared “Browse” button and select “INBOX”.
    7. Click the “Create” button.

Excerpted screenshot of MXRoute 'Create New Email Filter' feature

  1. Once you get the “success” confirmation, click the “Go Back” link at the bottom of the page.
  2. You will then see a new “Filter Test” section at the bottom of the email address’s filter page - where you can then edit and test to confirm it’ll work as expected.

Excerpted screenshot of MXRoute 'Filter Test' feature

And with that, you’re done!


  1. Disclaimer: That’s an affiliate link for your convenience and to help with the care and feeding of this server. Thanks in advance if you use it to sign up! 

  2. It’s not clear from the documentation whether this migration service pricing is per domain, per email account, or one-time for all domain(s) and account(s). 

  3. It’s even more of a headache if you choose to use MXRoute’s webmail client as new plus alias mailboxes by default aren’t exposed within the client; you need to actively turn on the mailbox visibility in the settings before you’ll see it (and the email within).