Summary
Not a fan of webapps for email but find traditional mail clients too bulky and slow? Try a more minimalist approach, sending and receiving your email from the command line with Mutt.
An Introduction to Mutt
Muttis a text-based email client with a colorful slogan: “All mail clients suck. This one just sucks less.”
Though it is far from the first text-based email client, it is fairly long-running, with the project having kicked off in 1995. The project was written from scratch, though the interface was originally based on the ELM email client, first released in 1986, and updated with features from other clients like PINE.
Despite its age, Mutt has kept up with the times, at least in terms of supporting technology like PGP and support for message threading. That said, development has slowed in terms of features.
If Mutt development is too slow for you,NeoMuttrolls in many patches that haven’t made it to Mutt yet, like a sidebar for navigating between folders, for example. NeoMutt can even read your Mutt configuration file, though this won’t work the other way around if you use NeoMutt-specific features.
The Advantages of Command Line Email
One of the biggest advantages of using a command-line email client like Mutt is the speed. For whatever reason, most traditional email clients feel slow on even the fastest computer.Thunderbird has improved massivelyrecently, but even then, it doesn’t hold a candle to the sheer speed of Mutt at moving through a packed inbox.
Mutt is, like many command line tools, eminently customizable. For example, if you’re aNeovim fan, it’s easy to configure the app to use that editor to handle any text input in Mutt.
Similarly, while a basic setup can get you connected to your mail server, you can also use other tools likeisyncandmstmpto read and reply to your email offline, then sync it all later. If you frequently catch up on email on a train or anywhere else with spotty Wi-Fi, this can be a great feature.
You can integrate other tools as well. If you’re storing your email offline, you can easily search it with a tool likenotmuch, which you can integrate directly into Mutt.
Getting Started With Mutt
It’s not likely you’ll already have Mutt installed, but it’s available in the software repositories of most popular Linux distributions. NeoMutt is also commonly available, but not as reliably as Mutt.
To install Mutt on Debian, Ubuntu, or similar systems, run the following:
On Fedora and similar distributions, run:
On Arch and Arch-based distributions, run the following:
Now you’ll need to create a few directories. Run the following commands, one line at a time:
Now, you’ll need to set up your configuration file. This is where things can get complicated, as it varies based on your mail provider, how many accounts you want to set up, and a variety of other factors.
The basic configuration below comes from theMUO guide to Mutt with Gmail, and is enough to get you up and running if you use Gmail. Create the file~/.mutt/muttrcin your favorite text editor and add the following:
Save the file, and run the command:
You may not see anything at first, but the app should load and start displaying your email. Of course, if you use another email provider, you’ll need to look up your specific server information, and you’ll need to use your correct login info.
If you’re going to use Mutt frequently, it’s a good idea to use a utility likepassto securely store your password and call that from your Mutt config, but that’s beyond the scope of this article.
Mutt displays the keys for its most commands right on the screen, so you should be able to find your way around. That said, if you try to open an email that features emails or images, you may be puzzled about what you see. Mutt doesn’t handle graphics, but we can handle that. At least, somewhat.
What About Images and Graphics?
While Mutt can’t directly display HTML email, it can do two things: filter them through a text-based web browser or open them in a traditional web browser like Firefox. My personal solution is to opt for both.
First, open~/.mutt/muttrcagain and add the following line:
To install on Debian, Ubuntu and similar distros:
For Fedora, etc.:
On Arch-based distributions, run:
Now, open~/.mutt/mailcapin thetext editor of your choiceand add the following lines:
If you want to use a browser other than firefox, replacefirefoxin the first line above.
Save the file and exit. Now, when you open an HTML email in mutt, it will attempt to display it. If you prefer, you can hit thevkey thenmto open the message in a web browser.
Replying to HTML messages is more of a mess. Depending on the editor you’re using to write your replies, the HTML message may not be formatted correctly when you reply. If this is important, you may want to run some tests before you use Mutt for essential email communications.
Who Is Mutt For?
If you’ve read through this article and you’re still interested, it seems like Mutt is for you. The text-first design imposes certain limitations, but if you mainly deal with plain text emails and find the workarounds for viewing emails with graphics acceptable, the speed of Mutt’s workflow is hard to ignore.
Mutt is also a great choice if you already spend most of your time in the terminal already. If you do all of your writing in Vim, being able to use the same editor for composing emails makes a lot of sense, as all theediting shortcuts you already know from Vimapply.
That said, if you need to send HTML or email with embedded images, Mutt isn’t a viable choice. It’s also not great if you frequently need to read emails with heavy HTML formatting or images, though you can deal with this by viewing messages in a web browser as mentioned above.
Finally, it’s worth instead considering the question, “whatis Mutt for?” As an example, I use Mutt more for processing email—deleting, archiving, and filing email—than I do for reading or sending email. If you find it perfect for one task but not others, feel free to keep using it as a utility, rather than your only mail app.