Difference between revisions of "Mutt"

From Noah.org
Jump to navigationJump to search
Line 1: Line 1:
 
[[Category:Engineering]]
 
[[Category:Engineering]]
 +
I use Mutt to read email. It's a command-line email client. It's super fast and works anywhere I can get to a shell. It's like Vim for email. It takes a little bit more effort to begin with, but after a while I much prefer it to anything "modern". I started using Mutt because I got tired of slow email clients like Outlook and Thunderbird.
  
I use Mutt to read email. It's a command-line email client. It's super fast and works anywhere I can get to a shell.
+
Mutt is text-only so it can make modern mail seem a little tricky sometimes, but it handles MIME attachments and HTML quite well. It can even read Word and PDF documents in Mutt without any trouble.
It's like Vim for email. It takes a little bit more effort to begin with, but after a while I much prefer it to
 
anything "modern". I started using Mutt because I got tired of slow email clients like Outlook and Thunderbird.
 
 
 
Mutt is text-only so it can make modern mail seem a little tricky sometimes, but  
 
it handles MIME attachments and HTML quite well. It can even read Word and PDF documents in Mutt without any trouble.
 
  
 
Below I document my Mutt configuration. I configured it so that the key bindings are a little closer to Vim.
 
Below I document my Mutt configuration. I configured it so that the key bindings are a little closer to Vim.

Revision as of 17:03, 14 February 2008

I use Mutt to read email. It's a command-line email client. It's super fast and works anywhere I can get to a shell. It's like Vim for email. It takes a little bit more effort to begin with, but after a while I much prefer it to anything "modern". I started using Mutt because I got tired of slow email clients like Outlook and Thunderbird.

Mutt is text-only so it can make modern mail seem a little tricky sometimes, but it handles MIME attachments and HTML quite well. It can even read Word and PDF documents in Mutt without any trouble.

Below I document my Mutt configuration. I configured it so that the key bindings are a little closer to Vim.

Building Mutt

They finally added built-in SMTP support in version 1.5.15. I enable SMTP support so I can use a mail relay instead of relying on sendmail.

apt-get install libncurses5-dev
./configure --enable-pop --enable-imap --enable-smtp --enable-hcache --with-ssl
make
make install

Mutt error

If you get an error like this then you forgot to use --enable-ssl in your configure step.

Error in /home/user/.mutt/muttrc, line 23: certificate_file: unknown variable

The configure help doesn't show this option, but certificates wouldn't work without it for me.

Basic .muttrc or ~/.mutt/muttrc

This is a .muttrc. This is nothing fancy. This seems to be the minimum to get Mutt working with IMAP. For more documentation go to Mutt documentation.

set mbox_type=maildir
set editor="vim"
# I like to see all my mail headers in my editor:
set edit_headers=yes
# don't wait for sendmail to finish (this runs sendmail in the background)
set sendmail_wait=-1
# this prevents Mutt from endlessly asking when you quit:
#     "Move read messages to ~/mbox? ([no]/yes):"
set move=no
# this prevents Mutt from endlessly asking:
#     "~/Mail does not exist. Create it? ([yes]/no):"
set folder=""
# if you use virtual mail hosts then Maildir might not
# be in the default location... try looking in:
# /home/vpopmail/domains/example.com/$USER/Maildir/
set spoolfile=~/Maildir/

# IMAP
# For IMAP connections use the following settings.
# Some settings replace those used above for folder and spoolfile.
# Note that the full mail username is "username@example.com" and
# the server name is "localhost". If you wanted to connect to a
# remote server the full URL might be something like:
#     imap://username@example.com@example.com
set folder="imaps://username@example.com@localhost"
set spoolfile="imaps://username@example.com@localhost/INBOX"
set imap_pass="my_stupid_password"
set certificate_file=".mutt_known_hosts"

My real muttrc file

I actually use a more complicated ~/.mutt/muttrc file that tweaks usability to make it more Vim-like. Mutt key bindings are already pretty close to Vim. See my dotfiles page.

<include src="http://www.noah.org/engineering/dotfiles/.mutt/muttrc" />