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

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 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 <>"
set imap_pass=PASSWORD
set folder=imaps://
set spoolfile=imaps://
set record=imaps://
set postponed=imaps://
set timeout=10
set mail_check=5
mailboxes =INBOX

Configure SMTP AUTH over SSL

set smtp_url="smtps://USERNAME\"