Configuring and Using Mutt
Total Page:16
File Type:pdf, Size:1020Kb
Configuring and Using Mutt Ryan Curtin LUG@GT Ryan Curtin Configuring and Using Mutt - p. 1/21 Goals » Goals By the end of this presentation, hopefully, you should be able Introduction to: Basic Usage Know the differences between Mutt, Pine, and other CLI Making a muttrc mailreaders Questions and Comments? Know the capabilities of Mutt Configure Mutt to connect to GT PRISM accounts (IMAP) Configure Mutt to make parsing through mail easy Know basic Mutt commands Write a basic, working .muttrc Know where to find further reference on Mutt Ryan Curtin Configuring and Using Mutt - p. 2/21 What is Mutt? » Goals Mutt is a “small, but very powerful text-based mail client for Introduction Unix operating systems” » What is Mutt? » Why should I use mutt? » Comparison with Pine Based largely on the elm mail client » What else is out there? Highly customizable; keybindings, macros Basic Usage Features to support mailing-lists (list-reply) Making a muttrc Questions and Comments? IMAP, POP3 support MIME, DSN, PGP support Ryan Curtin Configuring and Using Mutt - p. 3/21 Why should I use mutt? » Goals Lightweight, fast, and simple Introduction » What is Mutt? » Why should I use mutt? Can run inside a screen session » Comparison with Pine » What else is out there? No need for an annoying mouse Basic Usage Making a muttrc It looks cool Questions and Comments? Ryan Curtin Configuring and Using Mutt - p. 4/21 Comparison with Pine » Goals Mutt is lighter (and presumably faster) Introduction » What is Mutt? » Why should I use mutt? Mutt supports more authentication methods » Comparison with Pine » What else is out there? Mutt has better encryption (PGP/MIME/OpenPGP) Basic Usage Making a muttrc Mutt is still in active development (Pine stopped at 4.64; Questions and Comments? development moved to Alpine) Ryan Curtin Configuring and Using Mutt - p. 5/21 What else is out there? » Goals pine / alpine Introduction » What is Mutt? » Why should I use mutt? gnus (runs in emacs) » Comparison with Pine » What else is out there? nmh Basic Usage Making a muttrc slrn - a newsreader Questions and Comments? mutt-ng - fork of mutt, supports NNTP Ryan Curtin Configuring and Using Mutt - p. 6/21 Reading Mail » Goals The important commands: Introduction Basic Usage » Reading Mail (up/down arrows) select message » Reading a message » Searching mail PgUp / PgDn page up / down Making a muttrc Enter select message Questions and Comments? r reply to selected message g group reply m begin composing mail q quit / return to message listing d delete message u undelete message F flag message $ commit changes (if IMAP) ? help Ryan Curtin Configuring and Using Mutt - p. 7/21 Reading a message » Goals Useful commands when you are looking at a message: Introduction Basic Usage » Reading Mail Enter scroll down a line » Reading a message » Searching mail Backspace scroll up one line Making a muttrc PgUp / PgDn scroll up/down a page Questions and Comments? Space next message h view full headers a create alias from a sender / search within message ˆ jump to top of message v show attachments Ryan Curtin Configuring and Using Mutt - p. 8/21 Searching mail » Goals Mutt supports regular expressions in its searches. To search Introduction through messages use / or use l to limit messages. More Basic Usage complicated queries: ˜f [email protected] matches all » Reading Mail » Reading a message » Searching mail messages from [email protected] Making a muttrc ˜A all messages Questions and Comments? ˜b in message body (careful!) ˜f from ˜t to ˜l mailing list ˜F flagged messages ˜N new messages ˜d date (accepts a range) ˜Q replied-to messages ˜s in subject line Ryan Curtin Configuring and Using Mutt - p. 9/21 Basic configuration » Goals Basic Mutt setup: Introduction Basic Usage set from=’[email protected]’ Making a muttrc set realname="Ryan Curtin" » Basic configuration » Configuring mutt for IMAP set use_form=yes » Configuring mutt for POP3 » Configuring mutt for local mail set sort=threads » Setting up header caching » Setting up outgoing mail set sort_aux=last-date-received » Colors! » Setting up hooks set visual="vim" » Dealing with attachments set editor="vim" » Other things you can configure » Links set signature=/usr/bin/fortune| Questions and Comments? Ryan Curtin Configuring and Using Mutt - p. 10/21 Configuring mutt for IMAP » Goals Here is an example of how Mutt can be configured to connect Introduction to GT PRISM IMAP accounts. Setup for other IMAP servers Basic Usage will be very similar. Making a muttrc » Basic configuration » Configuring mutt for IMAP set spoolfile=imaps://imap.mail.gatech.edu/INBOX » Configuring mutt for POP3 » Configuring mutt for local mail set folder=imaps://imap.mail.gatech.edu/INBOX » Setting up header caching » Setting up outgoing mail set imap_user=gth671b » Colors! » Setting up hooks set imap_keepalive=40 » Dealing with attachments » Other things you can configure set imap_servernoise=yes » Links Questions and Comments? Also useful is imap_authenticators if you want to specify the methods of authentication mutt will try. Ryan Curtin Configuring and Using Mutt - p. 11/21 Configuring mutt for POP3 » Goals Simple configuration to connect to a POP3 mailserver: Introduction Basic Usage set pop_host=pops://pops.server.com/ Making a muttrc set pop_user=username » Basic configuration » Configuring mutt for IMAP set pop_reconnect=yes » Configuring mutt for POP3 » Configuring mutt for local mail set pop_checkinterval=1 » Setting up header caching » Setting up outgoing mail set pop_delete=yes » Colors! » Setting up hooks » Dealing with attachments » Other things you can configure Similar to IMAP, a pop_authenticators option also exists. » Links Questions and Comments? Ryan Curtin Configuring and Using Mutt - p. 12/21 Configuring mutt for local mail » Goals For local mail (some of these options may be unnecessary): Introduction Basic Usage set mbox_type=(mbox | Maildir | MH | MMDF) Making a muttrc » Basic configuration set spoolfile=/path/to/spool/ » Configuring mutt for IMAP » Configuring mutt for POP3 - spoolfile is only necessary if $MAIL is not correct » Configuring mutt for local mail » Setting up header caching » Setting up outgoing mail set mbox=/saved/mail/dir/ » Colors! » Setting up hooks » Dealing with attachments » Other things you can configure » Links Questions and Comments? Ryan Curtin Configuring and Using Mutt - p. 13/21 Setting up header caching » Goals Mutt (since 1.5.7) supports header caching by default. Introduction Basic Usage set header_cache=/location/of/header/cache/ Making a muttrc » Basic configuration » Configuring mutt for IMAP Mutt must be compiled with the --enable-hcache option » Configuring mutt for POP3 » Configuring mutt for local mail passed to the configure script. » Setting up header caching » Setting up outgoing mail » Colors! » Setting up hooks » Dealing with attachments » Other things you can configure » Links Questions and Comments? Ryan Curtin Configuring and Using Mutt - p. 14/21 Setting up outgoing mail » Goals Mutt is not an MTA; you must configure your own for Mutt to Introduction use Basic Usage Making a muttrc set sendmail=/location/of/mta » Basic configuration » Configuring mutt for IMAP » Configuring mutt for POP3 » Configuring mutt for local mail An example with nbsmtp: » Setting up header caching » Setting up outgoing mail » Colors! set sendmail="/usr/bin/nbsmtp -d gmail.com -h » Setting up hooks » Dealing with attachments smtp.gmail.com -f [email protected]" » Other things you can configure » Links sendmail /usr/bin/sendmail Questions and Comments? defaults to Ryan Curtin Configuring and Using Mutt - p. 15/21 Colors! » Goals Formatting: Introduction color object foreground background [ regexp ] Basic Usage Making a muttrc Some examples: » Basic configuration » Configuring mutt for IMAP » Configuring mutt for POP3 color index brightyellow default "˜s Package Receipt » Configuring mutt for local mail » Setting up header caching Notification" » Setting up outgoing mail » Colors! color index green default "˜t » Setting up hooks » Dealing with attachments lug-(announce|chat)@lists.lugatgt.org" » Other things you can configure » Links color body green default "(ftp|http)://[ˆ ]+" Questions and Comments? color quoted red default color signature cyan default Ryan Curtin Configuring and Using Mutt - p. 16/21 Setting up hooks » Goals [X]-hook: Execute an action when doing [X] Introduction [X]-hook regexp command Basic Usage Types of hooks: send-hook, charset-hook, fcc-hook, Making a muttrc » Basic configuration fcc-save-hook, folder-hook, mbox-hook, iconv-hook, » Configuring mutt for IMAP » Configuring mutt for POP3 message-hook, pgp-hook, save-hook, send-hook » Configuring mutt for local mail » Setting up header caching » Setting up outgoing mail » Colors! Some examples: » Setting up hooks » Dealing with attachments » Other things you can configure folder-hook junk set sort=threads » Links Questions and Comments? send-hook ’˜t gatech.edu’ ’set realname="George P. Burdell"’ message-hook ’˜f [email protected]’ ’color body brightyellow default’ Ryan Curtin Configuring and Using Mutt - p. 17/21 Dealing with attachments » Goals v - view attachments Introduction The .mailcap file specifies external commands mutt will use Basic Usage to view attachments. Making a muttrc » Basic configuration To set up mutt for HTML mail: » Configuring mutt for IMAP » Configuring mutt for POP3 » Configuring mutt for local mail » Setting up header caching In .mailcap: » Setting up outgoing mail » Colors! text/html; links %s; nameplate=%s.html » Setting up hooks » Dealing with attachments »