Power Up Your E-Mail with Mutt
E-mail—one of the Internet's first joys and evils. It brings us closer but forces us to weed through clutter, distractions and snake oil salesmen. Parsing and organizing the data is a tricky task. As with most jobs tricky and time-consuming, people marry a favorite tool. Presumably, you have an e-mail reader you hold dear to your heart. Nevertheless, I suggest you cheat on Thunderbird, Evolution or KMail for a day and experience the power of Mutt, the e-mail client underdog.
Mutt is a feature-rich, lightweight, text-based e-mail client. Yes, it's text-based. Don't let Mutt's simple presentation fool you. The text-based display is a feature, providing a customizable, concise viewport. The Mutt e-mail client will play nicely with remote IMAP, POP3 and SMTP servers. SSL connections also are supported. Whatever features Mutt does not provide, other tools, such as address books, Web browsers, document viewers and more, can be leveraged to enhance Mutt's innate abilities. So, why all the fuss when most e-mail clients can do the same? Mutt is faster, more customizable and less resource-intensive.
Need to sort quickly through hundreds of e-mail messages a day? Find that your current e-mail client takes up too much screen real estate? Maybe your e-mail client consumes too much memory? Do you want better e-mail threading for all those mailing lists to which you belong? Are you a system administrator who regularly needs a quick way to test e-mail servers? Tired of dealing with your laptop's mouse pad to read and send e-mail? Want to use Vim or Emacs to compose your e-mail? If any of these apply, Mutt will seduce you.
The first obvious advantage of Mutt is its small memory footprint. Below, I show the memory usage of KMail, Thunderbird, Evolution and Mutt on my system:
VIRT RES SHR %MEM COMMAND 156m 37m 19m 3.7 thunderbird-bin 161m 33m 19m 3.3 evolution 96352 23m 17m 2.3 kmail 14548 6092 3180 0.6 mutt
Mutt uses only a fraction of the memory used by most popular e-mail clients. So, if you are using older hardware, Mutt may speed up your computer by freeing some memory. Either way, Mutt will not hog your system's resources.
Another advantage of Mutt is the text-based display. For one, the interface is highly customizable. All fields and colors can be changed to meet your demands. Color new e-mail messages green and deleted messages red. Produce pretty, threaded message views. Anything is possible.
Mutt has it all and through a shell, no less. No longer will you need to open up IMAP access to your private server. Instead, ssh into the server and run Mutt.
Before I go into Mutt's other features, let's configure Mutt, so you can take a test drive. In this article, I focus on how to configure Mutt to work with an IMAP server. For my examples, I use Gmail's IMAP service. Because Gmail is a public, freely available service, everyone should be able to follow along. If you have another IMAP server you want to use, change the settings from my examples to match your IMAP server's configuration. If you are using Gmail, make sure you enable IMAP access to your account in Gmail's Settings→Forwarding and POP/IMAP.
First, install Mutt. I recommend using Mutt 1.5.17 or newer. Features I discuss here, such as IMAP header caching, are not available in older Mutt releases. Chances are, your distribution has the latest and greatest. So, use yum, apt-get or compile the source code from www.mutt.org. If your custom binaries ever produce warnings about unknown features, check that you have all necessary options enabled in the compile's configure step.
Before running Mutt the first time, let's configure your IMAP connection. Create and edit a ~/.muttrc file, and add the following configuration options (make sure to fill in your account specifics):
set from="YOUR NAME <USER@gmail.com>" set imap_user=USER@gmail.com set imap_pass=PASS
This sets your From line and IMAP user login. If you are not comfortable with your password being in plain text on the filesystem, do not set imap_pass in your ~/.muttrc. If imap_pass is not set, you will be prompted for a password when you execute Mutt.
Next, set your folder, the default location of your mailboxes. You also might want to set the spoolfile to your Gmail Inbox, so that Mutt opens it automatically:
set folder=imaps://imap.gmail.com set spoolfile=imaps://imap.gmail.com/INBOX
Then, configure Mutt to save sent mail, or your record, into a Gmail folder named Sent. You also might want to configure a Draft, or postponed, folder:
set record=imaps://imap.gmail.com/Sent set postponed=imaps://imap.gmail.com/Drafts
Make sure to enable header caching, or Mutt will have to download all of your Inbox's headers upon each execution:
Finally, you need to configure smtp.gmail.com as your SMTP server. By default, Mutt delivers e-mail using /usr/sbin/sendmail -oem -oi. In your case, use Gmail's SMTP server so that the e-mail envelope looks legitimate. Otherwise, your message might be flagged as spam for not originating from gmail.com:
Again, leave out :PASS to increase security and enable a password prompt for each message sent.
Although these are the basics, the .muttrc file has the potential for a slew of options. Listing 1 is my entire .muttrc with some additional tweaks. Many of the options are just that, optional. The muttrc(5) man page explains them all, so be sure to give it a look.
|Happy Birthday Linux||Aug 25, 2016|
|ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs||Aug 24, 2016|
|Updates from LinuxCon and ContainerCon, Toronto, August 2016||Aug 23, 2016|
|NVMe over Fabrics Support Coming to the Linux 4.8 Kernel||Aug 22, 2016|
|What I Wish I’d Known When I Was an Embedded Linux Newbie||Aug 18, 2016|
|Pandas||Aug 17, 2016|
- Download "Linux Management with Red Hat Satellite: Measuring Business Impact and ROI"
- Happy Birthday Linux
- Updates from LinuxCon and ContainerCon, Toronto, August 2016
- ContainerCon Vendors Offer Flexible Solutions for Managing All Your New Micro-VMs
- What I Wish I’d Known When I Was an Embedded Linux Newbie
- New Version of GParted
- Tor 0.2.8.6 Is Released
- NVMe over Fabrics Support Coming to the Linux 4.8 Kernel
- All about printf
With all the industry talk about the benefits of Linux on Power and all the performance advantages offered by its open architecture, you may be considering a move in that direction. If you are thinking about analytics, big data and cloud computing, you would be right to evaluate Power. The idea of using commodity x86 hardware and replacing it every three years is an outdated cost model. It doesn’t consider the total cost of ownership, and it doesn’t consider the advantage of real processing power, high-availability and multithreading like a demon.
This ebook takes a look at some of the practical applications of the Linux on Power platform and ways you might bring all the performance power of this open architecture to bear for your organization. There are no smoke and mirrors here—just hard, cold, empirical evidence provided by independent sources. I also consider some innovative ways Linux on Power will be used in the future.Get the Guide