If you're not a fan of e-mail clients with fancy graphical user interfaces, or you just like to be able to quickly read some mail over an SSH connection, the class of console-based mail clients might be for you.
Mutt is one of the current console-based mail clients that's still under active development and has a vast crowd of active supporters (and users). It is powerful, highly customisable, small and efficient.
While Mutt was originally designed to read mail from the local mbox mail spool
(e.g.
Starting your Mutt adventure simply requires you to emerge it. (How else.) Unfortunately, Mutt has a lots of options, which enable or disable certain functionalities of Mutt. We now briefly discuss the most important USE-flags that you may want to enable based on your intended usage of Mutt. Please note that enabling most of them won't harm your Mutt, but may make it do more than an experienced Mutt user would like.
% emerge -pv mutt [ebuild N ] mail-client/mutt-1.5.21-r1 USE="gdbm gpg imap mbox nls nntp \ sidebar smime smtp ssl -berkdb -crypt -debug -doc -gnutls \ -idn -pop -qdbm -sasl -tokyocabinet"
First off, for newcomers, the
While IMAP is important for reading mail, sending mail requires a mail server.
Mutt can talk to a mail server that exists on the local system, but often that's
not the case, or simply not a good solution for e.g. laptop users that often
travel around. Mutt comes with SMTP support, that's enabled by the
Both IMAP and SMTP mostly go over encrypted channels these days, hence if you
enabled any of both, it is wise to also enable either of the
Last but not least, there is the
After you emerged mutt with your USE-flags of choice, the only necessary step is
to create a
# character set on messages that we send set send_charset="utf-8" # if there is no character set given on incoming messages, it is probably windows set assumed_charset="iso-8859-1" # make sure Vim knows mutt is a mail client and that we compose an UTF-8 encoded message set editor="vim -c 'set syntax=mail ft=mail enc=utf-8'" # just scroll one line instead of full page set menu_scroll=yes # we want to see some MIME types inline, see below this code listing for explanation auto_view application/msword auto_view application/pdf # make default search pattern to search in To, Cc and Subject set simple_search="~f %s | ~C %s | ~s %s" # threading preferences, sort by threads set sort=threads set strict_threads=yes # show spam score (from SpamAssassin only) when reading a message spam "X-Spam-Score: ([0-9\\.]+).*" "SA: %1" set pager_format = " %C - %[%H:%M] %.20v, %s%* %?H? [%H] ?" # do not show all headers, just a few ignore * unignore From To Cc Bcc Date Subject # and in this order unhdr_order * hdr_order From: To: Cc: Bcc: Date: Subject: # brighten up stuff with colours, for more colouring examples see: # http://aperiodic.net/phil/configs/mutt/colors color normal white black color hdrdefault green default color quoted green default color quoted1 yellow default color quoted2 red default color signature cyan default color indicator brightyellow red color error brightred default color status brightwhite blue color tree brightmagenta black color tilde blue default color attachment brightyellow default color markers brightred default color message white black color search brightwhite magenta color bold brightyellow default # if you don't like the black progress bar at the bottom of the screen, # comment out the following line color progress white black # personality settings set realname = "Andrew Dalziel" set from = "andy@mail.server" alternates "andrew@mail.server|andrew.dalziel@mail.server" # this file must exist, and contains your signature, comment it out if # you don't want a signature to be used set signature = ~/.signature # aliases (sort of addressbook) source ~/.aliases # IMAP connection settings set mail_check=60 set imap_keepalive=300 # IMAP account settings set folder=imaps://andy@imap.mail.server/ set spoolfile=imaps://andy@imap.mail.server/ set record=imaps://andy@imap.mail.server/Sent set postponed=imaps://andy@imap.mail.server/Drafts # use headercache for IMAP (make sure this is a directory for performance!) set header_cache=/var/tmp/.mutt # mailboxes we want to monitor for new mail mailboxes "=" mailboxes "=Lists" # mailing lists we are on (these are regexps!) subscribe "gentoo-.*@gentoo\\.org" # SMTP mailing configuration (for sending mail) set smtp_url=smtp://mail.server/
The example
One of the features that Mutt has that is still not in today's most savvy email
clients is the ability to display attachments inline through some viewer. The
auto_view directive in the .muttrc file tells Mutt which attachments based on
their MIME-type it should view inline. To figure out how to do that, Mutt uses
mailcap files to lookup how to display a certain MIME-type. Usually the system
wide mailcap file isn't sufficient here, so you better start a
application/msword; antiword '%s'; copiousoutput; description=Word Document; nametemplate=%s.doc application/pdf; pdftotext '%s' -; copiousoutput; description=PDF Document; nametemplate=%s.pdf
Above
Mutt is a very versatile console email client. If you like the concept, Mutt
can be altered to behave in nearly any way through its configuration. Search
the web to find others explaining how they did "it", or find one of the many
patches that exist to make Mutt do even more. Gentoo applies a couple of very
popular patches to Mutt, so make sure to check