aboutsummaryrefslogtreecommitdiffstats
path: root/_offlineimap/offlineimap.py
diff options
context:
space:
mode:
Diffstat (limited to '_offlineimap/offlineimap.py')
-rwxr-xr-x_offlineimap/offlineimap.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/_offlineimap/offlineimap.py b/_offlineimap/offlineimap.py
index e3ae422..7d9d2fd 100755
--- a/_offlineimap/offlineimap.py
+++ b/_offlineimap/offlineimap.py
@@ -11,16 +11,24 @@
# remotepasseval = mailpasswd("<accountname>")
# ...
#
+# Create encrypted password file:
+# > echo "password" | gpg2 -e -r foo@bar.com > account.gpg
+#
# Reference:
# [1] Encrypt OfflineIMAP Password
-# http://unix.stackexchange.com/questions/44214/encrypt-offlineimap-password
+# http://unix.stackexchange.com/a/48355
+#
#
-# Updated: 2015/02/02
+# Aaron LI
+# Created: 2015-02-02
+# Updated: 2016-01-11
#
+
import os
import subprocess
+
def mailpasswd(account):
account = os.path.basename(account)
path = '{0}/.offlineimap/{1}.gpg'.format(os.environ['HOME'], account)