Moving email archives to Notmuch with Ghostty

I’n not sure this is a cool workflow, but didn’t know where else to post it.

I have, for a very long time, wanted a way to take my emails off my mailserver and store locally, but still be able to search and forward or reply to the email if necessary. To this end I have spend a few days with Claude AI to achieve this.

I have now completed this added a Craft Publish link to the instructions on what I did. Please note that this was created for my particular context. I post it here as you may find it as a good starting point for your own journey should you choose to do so.

I’ve had email for 10 years in Devonthink, EagleFiler, Maildir (old emacs) and Mailsteward. This has created a lot of duplication. Once I had imported these to Notmuch it reported 167K files. However it showed only 92K emails. Notmuch’s dedupe removed in 75K emails in about 10-15min. My email archive is now 17GB, is easy to backup and more importantly ease to search. The guide helped me setup scripts to do simple searches such as:

  • Find meeting minutes from December: msearch subject:"minutes" date:2025-11..2025-12

I then run openeml filepath and it opens in mail.

Search on 92k emails is very fast on my m1 mbp. I have now deleted my Devonthink, Eaglefiler and Maildirs and recovered a lot of space. I’m keeping mailsteward for the moment to see how this works over time. I can also transfer this setup easily to linux if I move there in the future.

This set up is for archive purposes only. I’m not running it as my daily email client. For this I continue to use Mailmaven. It means I only really need emails dating back a year in Mailmaven. Everything else goes inthe Notmuch email archive.

Craft Link: Email Archive Migration Guide

Please note that this file may change as I adapt it further for my needs. I did want to attach an md file but the forum won’t permit this.

2 Likes

Thanks!

You kinda “buried the lead” - Had not heard about the utility Notmuch until now.

I have Devonthink but have never used it to archive email. (Been on my “to do” list for ages.)

How would you compare using Devonthink (which you have stopped doing) to Notmuch or other archiving options?

It’s too early to say really. I’ve never been much of a terminal guy and only used it when necessary. Notmuch has amazed me at what can be done in the terminal.

I can be in and out of Notmuch before I’m up and running in Devonthink. Mailsteward is preferable to me than DEVONthink because it’s also faster (and cheaper).

I’m still using DEVONthink but no longer for email archiving. I’ve just installed yazi in the terminal which may become my new file manager and replace the remainder of my DEVONthink usage.

I think the one thing this has taught me is how quickly you can eat up your disk space with the same files because you backup with different apps. It’s well worth setting aside some prime time to properly develop your strategy.

I also think that AI is going to change the scene here. The migration document was largely the work of Claude AI with me bombarding Claude with questions and how to’s. I couldn’t have done this without Claude.