Skip to content
Browse files

switch personal mail to fastmail

  • Loading branch information...
1 parent 4841173 commit d503660b114392f82d9da20ad6e1d4596fa06c72 @garybernhardt committed
Showing with 48 additions and 29 deletions.
  1. +25 −14 .mutt/grb.muttrc
  2. +8 −5 .offlineimap.py
  3. +15 −10 .offlineimaprc
View
39 .mutt/grb.muttrc
@@ -2,8 +2,10 @@
## Authentication
###############################################################################
-set smtp_url = "smtp://gary.bernhardt@smtp.gmail.com:587"
-set smtp_pass = `get-password gmail`
+set my_username = `get-password fastmail-username`
+
+set smtp_url = "smtps://$my_username@fastmail.fm@mail.messagingengine.com"
+set smtp_pass = `get-password fastmail-email`
set from = "gary.bernhardt@gmail.com"
set realname = "Gary Bernhardt"
@@ -23,25 +25,34 @@ set display_filter=~/.mutt/display-filter.sh
# Folder names
set my_inbox="INBOX"
-set my_archive="[Gmail].All<quote-char> Mail"
-set my_drafts="[Gmail].Drafts"
-set my_sent="[Gmail].Sent<quote-char> Mail"
-set my_spam="[Gmail].Spam"
+set my_archive="INBOX.Archive"
+set my_drafts="INBOX.Drafts"
+set my_sent="INBOX.Sent<quote-char> Items"
+set my_spam="INBOX.Junk<quote-char> Mail"
+set my_trash="INBOX.Trash"
# Default location of mailboxes
-set folder = "~/Downloads/Gmail"
+set folder = "~/Downloads/Mail"
# Spool (inbox)
set spoolfile = "+INBOX"
# Draft folder
-set postponed="+[Gmail].Drafts"
+set postponed="+INBOX.Drafts"
# Where to move read emails to
-#set mbox = "+[Gmail].All\ Mail"
+#set mbox = "+Archive"
# Save sent mails to the Sent folder
-#set record="+[Gmail].Sent\ Mail"
+#set record=+Sent
# Move deleted messages to trash
-#set trash = "+[Gmail].Trash"
-
-# Signature
-set signature="~/.signature"
+set trash = "+INBOX.Trash"
+
+# Archive when hitting the delete key
+macro index y "<save-message>+INBOX.Archive<enter>"
+macro pager y "<exit><save-message>+INBOX.Archive<enter>"
+
+# Move read emails to archive when leaving a folder
+#set move = ask-yes
+# Save a copy of sent mails
+#set copy=yes
+# Actually delete things when leaving a folder, but confirm first
+set delete=yes
source ~/.mutt/common.muttrc
View
13 .offlineimap.py
@@ -1,13 +1,16 @@
import os
-def get_imap_passwd():
- #cmd = "/Applications/MacPorts/CocoaDialog.app/Contents/MacOS/CocoaDialog secure-standard-inputbox --string-output --title 'OfflineIMAP: please input your password'"
- #return os.popen(cmd).readlines()[1][:-1]
-
- cmd = "/usr/bin/security 2>&1 >/dev/null find-generic-password -a gmail -g"
+def get_keychain_password(key):
+ cmd = "/usr/bin/security 2>&1 >/dev/null find-generic-password -a %s -g" % key
line = os.popen(cmd).readline()
passwds = line.split()
if len(passwds) == 2:
return passwds[1][1:-1]
else:
return ""
+
+def get_imap_password():
+ return get_keychain_password("fastmail-email")
+
+def get_imap_email():
+ return get_keychain_password("fastmail-username") + "@fastmail.fm"
View
25 .offlineimaprc
@@ -1,22 +1,27 @@
[general]
pythonfile = ~/.offlineimap.py
-accounts = Gmail
+accounts = Fastmail
socktimeout = 60
-#maxsyncaccounts = 10
+maxsyncaccounts = 3
-[Account Gmail]
+[Account Fastmail]
localrepository = Local
remoterepository = Remote
status_backend = sqlite
[Repository Local]
-localfolders = ~/Downloads/Gmail
+localfolders = ~/Downloads/Mail
type = Maildir
+#readonly = True
[Repository Remote]
-cert_fingerprint = 89091347184d41768bfc0da9fad94bfe882dd358
-remoteuser = gary.bernhardt@gmail.com
-remotepasseval = get_imap_passwd()
-type = Gmail
-#readonly = True
-maxconnections = 1
+type = IMAP
+remotehost = mail.messagingengine.com
+remoteport = 993
+ssl = yes
+cert_fingerprint = fa86c1ca2d4f805e8fe7b8e7076a3ad2ccc52bb4
+holdconnectionopen = yes
+maxconnections = 3
+#readonly = True
+remoteusereval = get_imap_email()
+remotepasseval = get_imap_password()

0 comments on commit d503660

Please sign in to comment.
Something went wrong with that request. Please try again.