Dom Harrington

Migrating from Proton Mail to FastMail


I had been using Proton Mail for my email needs for several years. However, it has several limitations that prompted me to consider a change:

  • No CalDAV/CardDAV support for calendar and contacts syncing
  • Lack of support for replying to emails with wildcard email addresses

I have appreciated Proton Mail's strong focus on privacy and security and it is a shame to leave a service that aligns so well with my values. This is one of the pros of using a custom domain for email - I can switch providers without changing my email address. I decided to explore other options that might better suit my workflow and after some research and I chose to migrate to FastMail.

There are some official docs to help with the migration process but I found them to be a bit lacking in detail, so I wanted to document my own experience here.

Step 1: Export Emails from Proton Mail

I used the official Proton Mail Export Tool to export my emails. This tool allows you to export your emails in the '.eml' format, which is widely supported by email clients.

Step 2: Import Emails into FastMail

FastMail (in theory) supports importing '.eml' files directly. However, I found that when dragging in the ~7000 or so emails into the web browser, it locked up completely and I had to force quit Firefox. I decided instead to use a local email client to facilitate the import. I am already using Mozilla Thunderbird as my email client for Proton Mail, so to keep some isolation I decided to use the Mail app on my Mac for this step.

Firstly, I had to setup my Mac Mail app to connect to FastMail using IMAP. Docs for this are here and it was very easy to do. I could not find an easy way to bulk import '.eml' files into Mac Mail, so instead what I did was go to File -> Import Mailboxes and selected "Import data from: Apple Mail" and pointed it to the folder of '.eml' files exported from Proton Mail. This took a while.

Annoyingly this created a new folder under "On My Mac" called "Import" in Mac Mail with all my emails in it. Rather than being a flat folder of emails, it had created a new folder for each individual email - not ideal.

ChatGPT suggested a solution to flattening these folders using AppleScript, which is shown below:

tell application "Mail"
	-- Replace this with the name of your parent mailbox
	set parentMailboxName to "Import"

	-- Get the parent mailbox
	set parentMailbox to mailbox parentMailboxName

	-- Get all submailboxes
	set subMailboxes to mailboxes of parentMailbox

	repeat with subM in subMailboxes
		-- Get all messages in the subfolder
		set theMessages to messages of subM

		-- Move each message to the parent folder
		repeat with msg in theMessages
			move msg to parentMailbox
		end repeat

		-- Delete the now-empty subfolder
		try
			delete subM
		end try
	end repeat
end tell

I left this to chug along until it finished and resulted in a single "Import" folder containing all of my emails.

Finally, I just had to drag the entire "Import" folder from Mac Mail into the FastMail Archive folder in the Mail app. This took a while but eventually all my emails were imported successfully!

Step 3: Update DNS Settings

All that's left to do now is update my domain's DNS settings to point to FastMail's servers. FastMail has great instructions for how to do this in-product here. I've not actually done this step yet with my primary custom domain, as I wanted to ensure everything was working correctly first, but I have tested it with a secondary domain and it worked flawlessly.