Mutt is an advanced email client for *nix systems that runs in a terminal . Here’s how you can use mutt on Mac OS X [Snow] Leopard and configure for GMail account with IMAP.
All mail clients suck. [mutt] just sucks less.
First download and install MacPorts. Open a terminal window and install Mutt 1.5.20 using the following command.
1 |
sudo port install mutt-devel +compress +date_conditional +deepif +gdbm +gpgme +headercache +idn +sidebar +smtp +ssl +trash +sasl |
Now open up your favorite editor to create ~/.muttrc – You can use the following muttrc as a starter or you can use muttrcbuilder to create the file and copy it to your ~/.muttrc file.
Make sure that you create the ~/.mutt/cache and ~/.mutt/certificates before you start mutt.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
#account settings set from="YOUR_GMAIL_ADDRESS" set realname = "REAL_NAME" set imap_user = "YOUR_GMAIL_ADDRESS" set imap_pass = "PASSWORD" set smtp_url = "smtp://GMAIL_USERNAME@smtp.gmail.com:587" set smtp_pass = "GMAIL_PASSWORD" set folder = "imaps://imap.gmail.com:993" set spoolfile = "+INBOX" set postponed = "+[Gmail]/Drafts" set trash = "imaps://imap.gmail.com/[Gmail]/Trash" set record = "+[Gmail]/Sent Mail" set header_cache =~/.mutt/cache/headers set message_cachedir =~/.mutt/cache/bodies set certificate_file =~/.mutt/certificates set move = no #Stop asking to "move read messages to mbox"! set imap_keepalive = 900 # Header related stuff ignore "Authentication-Results:" ignore "DomainKey-Signature:" ignore "DKIM-Signature:" hdr_order Date From To Cc ignore * unignore from: date subject to cc unignore x-mailing-list: posted-to: unignore x-mailer: # Sorting, Markers etc. set markers=no # don't put '+' at the beginning of wrapped lines set pager_index_lines= 10 # how large is the index window? set sort = 'threads' set sort_aux = 'last-date-received' # Set which Editor to use for composing Emails. set editor= '/usr/bin/emacs' # set up the sidebar set sidebar_width=24 set sidebar_visible=yes set sidebar_delim='|' set sidebar_sort=no # which mailboxes to list in the sidebar, # you can add your Labels in Gmail to the Sidebar. mailboxes =All Mail =INBOX =Drafts =Sent Mail =Trash # color of folders with new mail color sidebar_new yellow default #Sidebar Navigation bind index CP sidebar-prev bind index CN sidebar-next bind index CO sidebar-open bind pager CP sidebar-prev bind pager CN sidebar-next bind pager CO sidebar-open # b toggles sidebar visibility macro index b 'toggle sidebar_visible' macro pager b 'toggle sidebar_visible' # Remap bounce-message function to "B" bind index B bounce-message #make mutt colorful! color attachment brightmagenta default color error brightred default color hdrdefault red default color indicator brightyellow red color markers brightcyan default color message brightcyan default color normal default default color quoted brightblue default color search default green color signature red default color status yellow blue color tilde magenta default color tree magenta default |
Here’s how it is going to look like:
Some useful commands to get started:
? - Help
b - Toggle Side Bar
m- New Email
q- Close current 'pane' or Quit
c - Change to a new folder
y - Send (After composing the message)
Hi Vijay – A quick thank you for this excellent article which helped me enormously in setting up mutt on OSX.
Perhaps you can give me a bit of advice? I have more than one IMAP account I want to get mail from – do I have to go down the fetchmail route or do you think I can sort it through the muttrc file and use hooks?
Cheers
Andrew
Hi Vijay – A quick thank you for this excellent article which helped me enormously in setting up mutt on OSX.
Perhaps you can give me a bit of advice? I have more than one IMAP account I want to get mail from – do I have to go down the fetchmail route or do you think I can sort it through the muttrc file and use hooks?
Cheers
Andrew
@Andrew: You can use offlineimap to fetch mails from IMAP server.
Hi Vijay, I have couple of questions regards the settings.
1) where to save the Muttrc file ? (Is it in root directory cd /) ??
2) I am confused with this line ” Make sure that you create the ~/.mutt/cache and ~/.mutt/certificates before you start mutt.” Does that mean I have to create a folder name “Cache and Certificates” in my root directory ?
Hi Tri,
1. You need to put it in your home directory –
2. Yes, you need to create the directories ~/.mutt/cache and ~/.mutt/certificates – ‘~’ means home directory.
e.g. my home directory is /Users/vijaykiran, so I have /Users/vijaykiran/.mutt/cache and /Users/vijaykiran/.mutt/certificates.
Hi Vijay,
I really appreciate your reply. I will try this and will update once issue is resolved :)
Regards,
Vj