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.
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:
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:
Let’s get started.
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:
In the event that you have a domain with email addresses you want to act as an alias to another you own (e.g., “email@example.com” to “firstname.lastname@example.org”), you’ll need to take another few additional steps:
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.
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:
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:
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:
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.
10followed by a space, followed by the “Priority 10” MXRoute server.
20followed by a space, followed by the “Priority 20” secondary MXRoute server.
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.
If you have additional domains to migrate, repeat as needed.
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).
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:
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
--passfile options instead of sending your passwords through in the clear. After successful installation of imapsync…
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.
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.
email@example.com: The email address in question that you’re migrating.
password2: These are the file names for the passfiles you created in Step 5.1.
--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.
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 firstname.lastname@example.org --passfile1 password1 --host2 mxroute.mailserver.com --port1 993 --ssl2 --user2 email@example.com --passfile2 password2 --noexpunge
Depending on how much email there is to be migrated, this may take a while.
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:
Repeat for any additional domains. Whee!
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:
And with that, you’re done!
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! ↩
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). ↩
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). ↩