Version 4 (modified by MichaelRay, 4 years ago) (diff)

!escape title (again) and add spaces for new wikiml in last fix


This is a quick guide to setting up mutt to work with GMail's new IMAP interface.

Essentials: configuration options

  set imap_user = ''
  set imap_pass = 'yourpassword'

  set spoolfile = imaps://
  set folder = imaps://
  set record="imaps://[Gmail]/Sent Mail"
  set postponed="imaps://[Gmail]/Drafts"

You probably want to

  set `record=""`

if you're using the GMail SMTP server, as it handles saving the sent mail anyway.

You can also set the mbox:

  set mbox="imaps://[Gmail]/All Mail"

...which means that when you exit mutt, it will prompt you to archive your read messages.

If you are using the trash_folder patch

  set trash="imaps://[Gmail]/Trash"

You can change folders using the change-folder command, but you'll need to hit <space> to view the files instead of just changing folders.

Web keyboard shortcut macros

  bind editor <space> noop
  macro index,pager y "<save-message>=[Gmail]/All Mail<enter><enter>" "Archive"
  macro index,pager d "<save-message>=[Gmail]/Trash<enter><enter>" "Trash"
  macro index gi "<change-folder>=INBOX<enter>" "Go to inbox"
  macro index ga "<change-folder>=[Gmail]/All Mail<enter>" "Go to all mail"
  macro index gs "<change-folder>=[Gmail]/Starred<enter>" "Go to starred messages"
  macro index gd "<change-folder>=[Gmail]/Drafts<enter>" "Go to drafts"

You need the "noop" bind so that the line editor accepts IMAP folders with spaces in their names. The gi, ga, gs and gd shortcuts help get around the "navigation quirks" mentioned above too.