Skip to main content

My mutt setup

mutt is a small but very powerful text-based mail client for Unix operating systems. It is fast and powerful, but not very easy to install and set up on Mac OS X. This post will mainly function as a note to myself about what I did to get mutt, offlineimap and msmtp to work with Google Apps on OS X.

  1. Installation
  2. Configuration
  3. Useful tips for mutt

Installation

There are several components involved in my mutt setup. This section will describe in detail how to install each one of them.

Installing Homebrew

The easiest way to install mutt is to use Homebrew - The missing package manager for OS X. At the time of writing, the official documentation of Homebrew says this is the way to install it:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Please consult the current documentation of Homebrew before installing. Also note that Homebrew requires ruby.

Installing offlineimap

Once you have Homebrew installed, it's time to move on to installing offlineimap. offlineimap is a software that lets you download your mailbox as a local Maildir folder. It basically synchronizes your mailbox to your local harddrive. This will make your email experience very fast and also lets you browse your email when being offline.

With Homebrew, installing offlineimap is very easy:

brew install offlineimap

Installing msmtp

msmtp is an SMTP client that allows you to send email using your email provider's SMTP server. When you send an email, mutt will trigger msmtp to deliver the mail to Gmail's SMTP server.

Again, using Homebrew, the installation is super easy:

brew install msmtp

Installing mutt

Now to the more difficult part. I've struggled to install mutt on Mac OS X using Homebrew because of some errors saying the ncurses library is missing. Some recommend building mutt against the S-Lang library instead, but this guide will explain how to build against ncurses.

Generally, you should be able to install mutt using Homebrew, like this:

brew install mutt

In my setup I've also included a nice addon: The sidebar patch. This gives you a folder list on the left side of the screen, like this:

mutt with the sidebar patch

To be able to install The sidebar patch, you need to edit the brew formula for mutt:

brew edit mutt

This will open an editor with the mutt formula, and you'll need to add a few lines to it. To begin with, you need to add an option called with-sidebar-patch, like this:

option "with-sidebar-patch", "Apply sidebar patch" # <- Add this line
option "with-debug", "Build with debug option enabled"
option "with-trash-patch", "Apply trash folder patch"
option "with-s-lang", "Build against slang instead of ncurses"
option "with-ignore-thread-patch", "Apply ignore-thread patch"
option "with-pgp-verbose-mime-patch", "Apply PGP verbose mime patch"

Then you'll need to add the actual patch information to the file. Add these lines close to the other lines looking similar:

patch do
  url "https://raw.github.com/nedos/mutt-sidebar-patch/master/mutt-sidebar.patch"
end if build.with? "sidebar-patch"

Now, try installing mutt using the following command:

brew install mutt --with-sidebar-patch --with-pgp-verbose-mime-patch

Note: The --with-pgp-verbose-mime-patch is only necessary if you plan on using PGP and want to be able to change the filename of the signature attachment.

If you get an error complaining about the missing ncurses library, you can try this before running the above command:

brew install ncurses
brew doctor
brew link ncurses

If the last command fails, try this instead:

brew link ncurses --force

Now, you can again try to install mutt using Homebrew:

brew install mutt --with-sidebar-patch --with-pgp-verbose-mime-patch

Hopefully, you've now managed to install all the necessary applications needed to continue with the configuration.

Configuration

Next steps

Here are a few things you can do:

2026

September

  • Note

    As quite evident by looking at my brand new reading page, I haven't read very much this year. Going forward I will do my very best to finish the books I'm currently reading and find some new exciting books to read. Currently only finished three, the goal is 10!

  • Note

    I just ordered a Fairphone 6+, Fairbuds and Fairbuds XL.

    I have an iPhone 17 as my daily driver, but I couldn't help but order this phone and headsets once I became aware it was a thing.

    My plan is to switch to all of these things, replacing my iPhone 17, AirPods Pro 3 and Bose QuietComfort Ultra. These will either be sold or given to someone who needs them.

    The initiative is great and their values even better. We need companies trying to counter the enormous pressure laid upon all of us to keep buying stuff all the time.

    I will post a thorough review of these items once I've used them for a while.

  • Tømmerneset rock carvings

2025

April

  • Note

    I will be posting changes to my website simply as notes tagged with changelog. This is the very first changelog of this site, and it summarizes the most important changes I've done since I started wiping the dust of this site in April this year.

    • I've added a Buttondown newsletter integration. Whenever I publish a new post on my blog, an email will be sent to my subscribers.
    • I've added a «Reply by email» button to all content. Do not hestitate to contact me if you have comments or feedback. Getting feedback is a big part of why I blog in the first place — I enjoy hearing from readers and being part of a thoughtful exchange now and then.
    • I've added a Search feature using Pagefind. It's not yet fully configured or customized, but it's working.
    • Added links to previous and next post, note and link.
    • Added a 404 page.
    • Reduced the size of uncompressed resources being loaded on the front page to 66 kB. Submitted a PR to be added to the 512kb.club website.
  • Our dog: Kento
  • Note

    This is the very first note on my new website. It's a GREAT note.

    It doesn't say much, but still – it marks the beginning of a new note-hosting era for this website.

  • Back to basics – again..