summaryrefslogtreecommitdiff
path: root/.offlineimap/offlineimap.py
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-08-08 20:08:42 +0200
committerUrbain Vaes <urbain@vaes.uk>2015-08-08 20:08:42 +0200
commit8df9472e0cdbab0d12211c2bc77918e8f515c409 (patch)
treef420b705adfec42bb33191c44c8fe252fca0f785 /.offlineimap/offlineimap.py
parentb8a9b07b741cddbf6e0476e70c94aa186d62b6ae (diff)
Improve installation and organization
Diffstat (limited to '.offlineimap/offlineimap.py')
-rw-r--r--.offlineimap/offlineimap.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/.offlineimap/offlineimap.py b/.offlineimap/offlineimap.py
new file mode 100644
index 0000000..c63b82d
--- /dev/null
+++ b/.offlineimap/offlineimap.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python
+
+import os
+import subprocess
+def mailpasswd(acct):
+ acct = os.path.basename(acct)
+ path = "/home/urbain/.passwords/%s.asc" % acct
+ args = ["gpg", "--use-agent", "--quiet", "--batch", "-d", path]
+ try:
+ return subprocess.check_output(args).strip()
+ except subprocess.CalledProcessError:
+ return ""