Skip to content

Instantly share code, notes, and snippets.

@markjlorenz
Last active July 25, 2021 18:16
Show Gist options
  • Save markjlorenz/8778724 to your computer and use it in GitHub Desktop.
Save markjlorenz/8778724 to your computer and use it in GitHub Desktop.
Notes on getting Mutt running on OSX
  • brew install mutt
  • setup an app password for mutt in gmail
  • setup an app password for imap_notifier in gmail
  • brew install terminal-notifier terminal-notifier
  • gem install imap_notifier imap_notifier
  • brew install urlview
  • brew install w3m (links would be OK too)
  • Install pandoc to author in markdown and send as HTML

~/.muttrc

set imap_user = "[email protected]"
set imap_pass = "tqkcpwgewfwsbazefg"

set smtp_url = "smtp://[email protected]:587/"
set smtp_pass = "tqkcpwgewfwsbazefg"
set from = "[email protected]"
set realname = "Mark Lorenz"

set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set postponed="+[Gmail]/Drafts"

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

set move = no
set copy = yes      # keep local copy of sent mail
set record = "Sent" # put sent mail in sent

set sort = 'threads'
set sort_aux = 'reverse-date'
set imap_check_subscribed

ignore "Authentication-Results:"
ignore "DomainKey-Signature:"
ignore "DKIM-Signature:"
hdr_order Date From To Cc

set editor = "vim -c 'set spell'"  # start vim with spell checker on
set wait_key = no                  # suppresses Mutt's "Press any key to continue..."


macro pager \Cb "|urlview<enter>" "call urlview to open links"                            #ctrl-b to open links in the browser
macro compose \eh "F pandoc -s -f markdown -t html \ny^T^Utext/html; charset=us-ascii\n"  #esc-h to turn markdown in html


# for HTML emails
set mailcap_path 	= ~/.mutt/mailcap
auto_view text/html                                      # view html automatically
alternative_order text/plain text/enriched text/html     # save html for last

# brew install python
# pip install goobook
# goobook config-template > ~/.goobookrc
set query_command="goobook query '%s'"
set editor = "vim --cmd 'let g:goobookrc=\"/Users/markjlorenz/.goobookrc\"'"
bind editor <Tab> complete-query

~/.mutt/mailcap

text/html; w3m -I %{charset} -T text/html; copiousoutput;

~/.imapnotifier

folders:
 - INBOX
user:  "markjlorenz"
password: "eiasdgwelkrajulnx"
max: 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment