March 20, 2010
Dealing With Mail in Mutt
Possibly I'm old school, but I still use the command-line mail client mutt to handle my mail. One of mutt's advantages is the wide range of keyboard commands you can use to do various useful tasks. Here's a selection of the ones I use regularly.
- T: Toggles the visibility of quoted text (any line beginning >). Useful when people haven't trimmed their quotes.
- l: The limit command. l WORD will show only
messages whose From or Subject lines contain WORD. Regular expressions
are accepted, and you type l all to view all messages again.
Even more usefully, there's a set of mutt-specific
patterns prefixed with ~, including:
- ~N: All new messages.
- ~p: All messages addressed directly to you (e.g., not mailing lists).
- ~F: All flagged messages (flag a message by hitting F when it's highlighted in the message index).
- ~b WORD: All messages with WORD in the body.
- T: Tag messages matching a pattern. To mark all new messages
as read, use this key sequence:
T ~N ; N ^T ~T
This tags all new (~N) messages, toggles the New flag (N) on all tagged messages (;), and then untags (^T) all messages matching the 'tagged' pattern (~T). I use this a lot when looking at folders with auto-saved messages. - Finally: Not a keystroke but a setting in your .muttrc. This
line:
save-hook example.co.uk =example
means that when you save a message with a From line anywhere in example.co.uk, you'll be automatically prompted to save it to the folder 'example'. This can be a big time-saving for regular correspondents. Also check out fcc-hook and fcc-save-hook.
Juliet Kemp has been messing around with Linux systems, for financial reward and otherwise, for about a decade. She is also the author of "Linux System Administration Recipes: A Problem-Solution Approach" (Apress, 2009).
Networking Solutions
- 1 Linux Server Management Nightmare: Attack of the Killer Penguins
- 2 Top 10 Open-Source Server Technologies You Need to Know
- 3 10 Coolest Features in Windows Server 2008
- 4 Getting Started With EFT Server -- A More Secure FTP Server Option
- 5 Making Linux Server Directories More Readable, Add to Perl's @INC Array



Windows Server 2008 R2 provides enhanced management control over resources across the enterprise. Downlaod this PDF to learn more.