From 781492b3cbac04ac646e7cae760236d9b5194629 Mon Sep 17 00:00:00 2001 From: Dustin Swan Date: Wed, 10 Apr 2013 17:30:08 -0500 Subject: [PATCH] Switching to offlineimap, starting to add my work email, updating muttrc accordingly --- mutt/muttrc | 58 ++++++++++++++++++++++++++++++--------------- mutt/offlineimap.py | 3 ++- offlineimaprc | 6 ++++- 3 files changed, 46 insertions(+), 21 deletions(-) diff --git a/mutt/muttrc b/mutt/muttrc index 9722e47..cc7f684 100644 --- a/mutt/muttrc +++ b/mutt/muttrc @@ -4,19 +4,39 @@ set my_gmail_password = `gpg -d ~/.gmail_password.gpg` # General set realname = "Dustin Swan" +# When usisng offlineimap +set folder = ~/.mail +set alias_file = ~/.mutt/alias +set header_cache = ~/.mutt/cache/headers +set message_cachedir = ~/.mutt/cache/bodies +set certificate_file = ~/.mutt/certificates +set mailcap_path = ~/.mutt/mailcap +set tmpdir = ~/.mutt/temp +set signature = ~/.mutt/sig + +set mbox_type = Maildir +unset move + +set spoolfile = "+dustinswan-gmail.com/INBOX" +set mbox = "+dustinswan-gmail.com/archive" +set postponed = "+dustinswan-gmail.com/drafts" + +folder-hook dustinswan-gmail.com set from="dustinswan@gmail.com" +folder-hook dswan-iocom.com set from="dustinswan@gmail.com" + # Gmail IMAP -set imap_user = "dustinswan@gmail.com" -set imap_pass = $my_gmail_password -set folder = "imaps://imap.gmail.com/" -set spoolfile = +INBOX -set imap_check_subscribed -set header_cache = ~/.mutt/hcache +#set imap_user = "dustinswan@gmail.com" +#set imap_pass = $my_gmail_password +#set folder = "imaps://imap.gmail.com/" +#set spoolfile = +INBOX +#set imap_check_subscribed +#set header_cache = ~/.mutt/hcache # # Don't need this because Gmail saves it automatically # set record = "+[Gmail]/Sent Mail" -set postponed = "+[Gmail]/Drafts" -unset imap_passive -set imap_keepalive = 300 -set mail_check = 60 +#set postponed = "+[Gmail]/Drafts" +#unset imap_passive +#set imap_keepalive = 300 +#set mail_check = 60 # SMTP set smtp_url = "smtp://dustinswan@smtp.gmail.com:587/" @@ -40,22 +60,22 @@ set sort = threads set sort_aux = reverse-last-date-received # Sidebar -set sidebar_delim = ' │' -set sidebar_visible = yes -set sidebar_width = 24 +#set sidebar_delim = ' │' +#set sidebar_visible = yes +#set sidebar_width = 24 #color sidebar_new color221 color233 -bind index sidebar-next -bind index sidebar-prev -bind index sidebar-open +#bind index sidebar-next +#bind index sidebar-prev +#bind index sidebar-open # Status Bar #set status_chars = " *&A" #set status_format = "---[ Folder: %f ]---[%r%n messages%?n? (%n new)?%?d? (%d to delete)?%?t? (%t tagged)? ]---%>-%?p?( %p postponed )?---"" # Fucking html mail -auto_view text/html -alternative_order text/plain text/enriched text/html +#auto_view text/html +#alternative_order text/plain text/enriched text/html # Colors -source ~/.mutt/mutt-colors-solarized-dark-256.muttrc +# source ~/.mutt/mutt-colors-solarized-dark-256.muttrc diff --git a/mutt/offlineimap.py b/mutt/offlineimap.py index 93966e2..3dee390 100644 --- a/mutt/offlineimap.py +++ b/mutt/offlineimap.py @@ -1,7 +1,8 @@ import subprocess +import os def gmail_password(): - path = "/Users/dustinswan/.gmail_password.gpg" + path = os.environ['HOME'] + "/.gmail_password.gpg" args = ["gpg", "-d", path] try: return subprocess.check_output(args).rstrip() diff --git a/offlineimaprc b/offlineimaprc index e52f1ce..0141589 100644 --- a/offlineimaprc +++ b/offlineimaprc @@ -2,7 +2,7 @@ # get started fast. [general] -accounts = DustinSwanGmail +accounts = DustinSwanGmail, DswanIOCOM pythonfile=~/.mutt/offlineimap.py [Account DustinSwanGmail] @@ -36,3 +36,7 @@ folderfilter = lambda folder: folder not in ['[Gmail]/Trash', '[Gmail]/Spam', ] cert_fingerprint = 6d1b5b5ee0180ab493b71d3b94534b5ab937d042 + +[Account DswanIOCOM] +type = Maildir +localfolders = ~/.mail/dswan-iocom.com