Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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 = "markjlorenz@gmail.com"
set imap_pass = "tqkcpwgewfwsbazefg"

set smtp_url = "smtp://markjlorenz@smtp.gmail.com:587/"
set smtp_pass = "tqkcpwgewfwsbazefg"
set from = "markjlorenz@gmail.com"
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
@markjlorenz
Copy link
Author

markjlorenz commented Feb 5, 2014

Doing it with exchange:

  1. Install msmtp (brew install msmtp)

~/.muttrc

# same as above, except:
set imap_user = "mlorenz"
set imap_pass = "Sekret"

set from = "mlorenz@covermymeds.com"
set realname = "Mark Lorenz"

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

set move = no

set sort = 'threads'
set sort_aux = 'reverse-date'
set smtp_authenticators="login"
set imap_check_subscribed

hdr_order Date From To Cc

set folder    = "imaps://mlorenz@exchange.innova-partners.com"
set spoolfile = "imaps://mlorenz@exchange.innova-partners.com/INBOX"
set sendmail  = "/usr/local/bin/msmtp"

~/.msmtprc

defaults
logfile ~/.msmtp.log  # you might have to create this

account default
host exchange.innova-partners.com
port 25
protocol smtp
tls on
tls_trust_file ~/.mutt/certificates
from mlorenz@covermymeds.com
auth on
user INNOVA\mlorenz
password Sekret

The OWA URL for DavMail is:

https://exchange.innova-partners.com

@markjlorenz
Copy link
Author

markjlorenz commented Feb 7, 2014

Make it pretty:
https://github.com/altercation/mutt-colors-solarized

cd ~/.mutt
git clone https://github.com/altercation/mutt-colors-solarized.git

In ~/.muttrc:
source $HOME/.mutt/mutt-colors-solarized/mutt-colors-solarized-dark-256.muttrc

@skpy
Copy link

skpy commented Feb 7, 2014

This .msmtprc file works:

defaults
logfile ~/.msmtp.log

account default
host exchange.innova-partners.com
port 25
protocol smtp
tls on
tls_trust_file ~/.mutt/certificates
from smerrill@covermymeds.com
auth on
user smerrill
password password

Note that comments don't seem to be supported. I had a file named, literally, .msmtp.log\ \ #\ you\ might\ have\ to\ create\ this ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment