Difference between revisions of "Mutt"
Line 3: | Line 3: | ||
I use Mutt to read email. Mutt is 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 took a little bit more effort at the beginning, but after a while I much prefered it to anything "modern". I started using Mutt because I got tired of slow email clients like Outlook and Thunderbird. I just wanted my email to pop open instantly. Even when I kept Thunderbird running in the background it would take more than a blink for the window to restore when I needed it. | I use Mutt to read email. Mutt is 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 took a little bit more effort at the beginning, but after a while I much prefered it to anything "modern". I started using Mutt because I got tired of slow email clients like Outlook and Thunderbird. I just wanted my email to pop open instantly. Even when I kept Thunderbird running in the background it would take more than a blink for the window to restore when I needed it. | ||
− | Mutt is text-only so it can make modern mail seem a little tricky sometimes, but it handles MIME attachments and HTML quite well. Mutt can even read Word and PDF documents without much trouble. | + | Mutt is text-only so it can make modern mail seem a little tricky sometimes, but it handles MIME attachments and HTML quite well. Mutt can even read Word and PDF documents without much trouble. Below is documentation for my Mutt configuration. I configured it so that the key bindings are a little closer to Vim. |
− | + | A very good page that documents a more advanced Mutt configuration can be found at [http://www.spocom.com/users/gjohnson/mutt/ Gary Johnson's Mutt Page]. | |
== Abook == | == Abook == | ||
Line 68: | Line 68: | ||
set certificate_file=".mutt_known_hosts" | set certificate_file=".mutt_known_hosts" | ||
</pre> | </pre> | ||
+ | |||
+ | == ~/.mailcap file == | ||
+ | |||
+ | This helps Mutt to read a few other non-text MIME types common in file attachments. | ||
+ | |||
+ | <include src="http://www.noah.org/engineering/dotfiles/.mailcap" /> | ||
== My real muttrc file == | == My real muttrc file == |
Revision as of 14:13, 22 September 2008
I use Mutt to read email. Mutt is 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 took a little bit more effort at the beginning, but after a while I much prefered it to anything "modern". I started using Mutt because I got tired of slow email clients like Outlook and Thunderbird. I just wanted my email to pop open instantly. Even when I kept Thunderbird running in the background it would take more than a blink for the window to restore when I needed it.
Mutt is text-only so it can make modern mail seem a little tricky sometimes, but it handles MIME attachments and HTML quite well. Mutt can even read Word and PDF documents without much trouble. Below is documentation for my Mutt configuration. I configured it so that the key bindings are a little closer to Vim.
A very good page that documents a more advanced Mutt configuration can be found at Gary Johnson's Mutt Page.
Contents
Abook
For some reason I always forget that CTRL-T is used to access the Abook from the Mutt "To:" line.
Building Mutt
They 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. Note that the Ubuntu 8.04 mutt package provides version 1.5.17, so building Mutt from source is not necessary.
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"
~/.mailcap file
This helps Mutt to read a few other non-text MIME types common in file attachments.
<include src="http://www.noah.org/engineering/dotfiles/.mailcap" />
My real muttrc file
For my daily use I use a slightly more complicated muttrc file that tweaks usability to make it more Vim-like. Mutt key bindings are already pretty close to Vim, but there are a few other bindings that make Mutt feel even more like home. See the dotfiles page for more info about dotfiles. The following should be put in ~/.mutt/muttrc with 600 for permissions.
<include src="http://www.noah.org/engineering/dotfiles/.mutt/muttrc" />
mairix
This is an interesting Linux email indexer. What I really want is a big email database. Maybe I should just dump all my email into MySQL. http://www.rpcurnow.force9.co.uk/mairix/index.html