Mutt with Gmail

“All mail clients suck. This one just sucks less.”
   — Michael Elkins, Mutt creator

Mutt is a console-based email client, or mail user agent. It does
not send or retrieve emails. In order to send or retrieve emails,
one needs a mail transport agent, or MTA, and a mail retrieval
agent, or MRA. One popular configuration uses msmtp and

However, this entry will discuss using Gmail to send and retrieve
messages through the IMAP protocol. This keeps emails
synchronized across all running email clients.

Install mutt.

# pacman -S mutt

Create the mutt configuration file replacing NAME, EMAIL, and PASSWORD.

$ nano ~/.muttrc

# IMAP configuration

set realname="NAME"
set from="NAME "
set imap_user=EMAIL
#set imap_pass=PASSWORD
set folder=imaps://
set spoolfile=+INBOX
set record="+[Gmail]/Sent Mail"
set postponed=+[Gmail]/Drafts
set trash=+[Gmail]/Trash

set header_cache=~/.mutt/cache/headers
set message_cachedir=~/.mutt/cache/messages
set certificate_file=~/.mutt/certificates

mailboxes =INBOX

# SMTP Configuration

set smtp_url=smtps://EMAIL\
set ssl_force_tls=yes

set editor=nano

# Display

# color object foreground background
color status white blue
color index green default ~N
color index red default ~D
color index brightmagenta default ~T
color index brightyellow default ~F
color header green default "^Subject:"
color header yellow default "^Date:"
color header yellow default "^To:"
color header yellow default "^CC:"
color header yellow default "^Bcc:"
color header yellow default "^From:"
color header red default "^X-.*:"

Run mutt.

$ mutt
About these ads
This entry was posted in linux and tagged . Bookmark the permalink.

4 Responses to Mutt with Gmail

  1. noah says:

    offlineimap is nice, faster, redundant, python . . .

  2. Noah says:

    set editor=nano

    that made me laugh

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s