summaryrefslogtreecommitdiff
path: root/offlineimap.py
diff options
context:
space:
mode:
authorUrbain Vaes <urbain@vaes.uk>2015-04-20 10:27:00 +0100
committerUrbain Vaes <urbain@vaes.uk>2015-04-20 10:27:00 +0100
commit0ec233f671ee4e2dee05bd7ccb7e797bc81d9626 (patch)
tree3fe9e22394d7727add4ac2948e6161f88a7c3469 /offlineimap.py
parent2fdeb189a74a62dcf365c68f392b2367a0ca75a1 (diff)
parentf45ca78f56cac187737505a00469b8268b00ede5 (diff)
Merge branch 'master' of github.com:uvaes/dotfiles
Conflicts: .gitignore latexmkrc make mutt/muttrc offlineimaprc vim/mySnippets/all.snippets vim/vimrc
Diffstat (limited to 'offlineimap.py')
-rw-r--r--offlineimap.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/offlineimap.py b/offlineimap.py
new file mode 100644
index 0000000..c63b82d
--- /dev/null
+++ b/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 ""