Mutt Addressbook

Need an address book program for Mutt? Look no further than abook. Use your distribution’s package manager to install abook.

yum install abook

The Config

Edit your ~/.muttrc file to include a macro for abook

set alias_file=~/.mutt-alias
source ~/.mutt-alias
set query_command= "abook --mutt-query '%s'" macro index,pager A "<pipe-message>abook --add-email-quiet<return>" "add the sender address to abook"

If you have no ~/.mutt-alias, be sure to create one before running mutt.

touch ~/.mutt-alias
mutt

Walkthrough of Usage

To use the addressbook, hit ‘a’. Accept the given alias, or replace with your own.

Mutt Address Book

Confirm the address.

Mutt Address Book

Give the contact a name. The name can contain spaces.

Mutt Address Book

Accept the entry.

Mutt Address Book

Finally, confirm the alias file.

Mutt Address Book

After doing this a few times, it will become second nature to hit <Enter> through most of the steps.

Accessing Contacts

To access the mutt addressbook, hit <Tab> at the to, cc or bcc line. You will be presented with a list of aliases from your ~/.mutt-alias file.

Mutt Address Book

See the abook SourceForge.net page for more information.

Use Gmail with Mutt

Mutt is a powerful text email client that can be used to access Gmail over IMAPS. Here are the relevant settings for your .muttrc.

Enable header caching

set header_cache=~/.mutt_cache

Configure IMAP over SSL

set from="FNAME LNAME <USERNAME@gmail.com>"
set imap_user=USERNAME@gmail.com
set imap_pass=PASSWORD
set folder=imaps://imap.gmail.com
set spoolfile=imaps://imap.gmail.com/INBOX
set record=imaps://imap.gmail.com/Sent
set postponed=imaps://imap.gmail.com/Drafts
set timeout=10
set mail_check=5
mailboxes =INBOX

Configure SMTP AUTH over SSL

set smtp_url="smtps://USERNAME\@gmail.com:PASSWORD@smtp.gmail.com/"