Power Up Your E-Mail with Mutt
So, what is all this tagging about? Mutt allows you to tag messages that you then can act on in one fell swoop. Think of it as a batch queue. Press T to tag messages into the queue, or use T to tag using regular expression matching. Then, use ; to prefix any command normally available to a single message, and all tagged messages will be affected in a batch.
Once messages are tagged, press ;-D to delete all tagged messages, ;-F to flag and so on. Again, pressing ? shows all available keystrokes. Imagine how quickly you now can delete the hordes of unread mailing-list messages.
Now, let's send a test message using the Gmail SMTP server. Press M to compose an e-mail message. Fill in the To: line, then the Subject: line. Your e-mail editor opens automatically. Write your message, save and quit. You will see a page that allows you to edit the Cc, Bcc and other fields. Finally, press Y to send the message.
Need an address book? No problem. By default, Mutt has support for alias, or contact, files. To start using aliases, create an empty ~/.mutt-alias file, then source and reference it inside your ~/.muttrc. Press A to save contacts while using Mutt. You can access contacts using Tab from the To, Cc or Bcc entry fields:
source ~/.mutt-alias set alias_file=~/.mutt-alias
Alternatively, you can use abook. By design, the abook address book program integrates with the Mutt e-mail client. Install abook using your standard distribution tools, or compile the source code available at abook.sourceforge.net.
Set up a macro for A that calls abook. Macros are powerful tools in Mutt. They can pipe data into shell scripts or executables and allow for the customization of any keystroke:
set query_command= "abook --mutt-query '%s'" macro index,pager A "<pipe-message>abook --add-email-quiet<return>"
With the new macro in place, press A to add a contact into your address book. You can query the abook contacts using Q.
Like most Linux power tools, Mutt is specialized. It manages e-mail very well and lets other programs worry about most of the rest. Editors and spell-checkers live outside of Mutt.
I prefer to use Vim. But, do you want to use GNU Emacs, GNU nano or another editor? Simply set it as your editor inside ~/.muttrc. By default, Mutt uses the $EDITOR environment variable if no editor is defined.
For spell-checking, I like Vim's spell-check as-you-type feature. Use these settings in your ~/.vimrc to underline misspelled words in red:
set spell set spell spelllang=en_us set spellfile=~/.vim/spellfile.add highlight clear SpellBad highlight SpellBad term=standout ctermfg=1 highlight SpellBad term=underline cterm=underline highlight clear SpellCap highlight SpellCap term=underline cterm=underline highlight clear SpellRare highlight SpellRare term=underline cterm=underline highlight clear SpellLocal highlight SpellLocal term=underline cterm=underline
Once Vim's spell-checking is enabled, you have these options available to you when your cursor is over a misspelled word:
zg to add a word to the word list.
zw to reverse.
zug to remove a word from the word list.
z= to get list of possible spellings.
Mutt has too many interesting features to outline in the scope of one article. However, one last feature I want to share with you is the bounce command. Bounce lets you resend a message to a new recipient. The message arrives at the new recipient from the original sender, not the bouncer. Why is this useful? Well, what if a ton of e-mail was sent to your work address instead of your personal e-mail address? Don't just forward the messages in bulk—bounce them. First, tag all the messages you want to bounce by pressing T and providing a regex search string that matches your selection. Use the sender's name, for example. Then, act on the queue by pressing B. Fill in your personal e-mail address, and press Enter to execute the bounce.
- Readers' Choice Awards 2013
- AIDE—Developing for Android on Android
- Best. Cake. Ever.
- Two Pi R
- The Geek's Guide to the Coolest 2013 Holiday Gifts
- Non-Linux FOSS: Let's Make Music Together
- A Handy U-Boot Trick
- Raspberry Pi: the Perfect Home Server
- RSS Feeds
- Tech Tip: Really Simple HTTP Server with Python
- Thanks for clearing that up.
15 min 54 sec ago
- Nice coding on the cake. I
11 hours 47 min ago
- Baker's identity
16 hours 37 min ago
- Uber jealous
21 hours 34 min ago
- Reality is disapointing
1 day 8 hours ago
- Máy sấy quần áo
1 day 10 hours ago
- Services on GlusterFS
1 day 11 hours ago
- Reply to comment | Linux Journal
1 day 12 hours ago
- Definitely cool stuff here
1 day 13 hours ago
- thanks for the information
1 day 14 hours ago