Permalink
Browse files

add offlineimap config

  • Loading branch information...
1 parent 8858fc5 commit 8073f35da73b0a368a4ff842d77a7fb7272f45db @garybernhardt committed Nov 5, 2012
Showing with 35 additions and 0 deletions.
  1. +13 −0 .offlineimap.py
  2. +22 −0 .offlineimaprc
View
@@ -0,0 +1,13 @@
+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"
+ line = os.popen(cmd).readline()
+ passwds = line.split()
+ if len(passwds) == 2:
+ return passwds[1][1:-1]
+ else:
+ return ""
View
@@ -0,0 +1,22 @@
+[general]
+pythonfile = ~/.offlineimap.py
+accounts = Gmail
+#maxsyncaccounts = 10
+
+[Account Gmail]
+localrepository = Local
+remoterepository = Remote
+
+[Repository Local]
+localfolders = ~/Gmail
+type = Maildir
+
+[Repository Remote]
+cert_fingerprint = 6d1b5b5ee0180ab493b71d3b94534b5ab937d042
+remoteuser = gary.bernhardt@gmail.com
+remotepasseval = get_imap_passwd()
+type = Gmail
+readonly = True
+#maxconnections = 8
+
+

0 comments on commit 8073f35

Please sign in to comment.