aboutsummaryrefslogtreecommitdiff
path: root/offlineimap
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fl.fischer@fau.de>2017-05-22 18:33:08 +0200
committerFlorian Fischer <florian.fl.fischer@fau.de>2017-05-22 18:33:08 +0200
commitb01995ddbc65372d98f1755cb063eb18669a6061 (patch)
tree3553b928670ac38a234400db88f5c9bc4b42ad2b /offlineimap
parent645f1724ddaa505d9e3d095ccf2f690528b2c2c4 (diff)
downloaddotfiles-b01995ddbc65372d98f1755cb063eb18669a6061.tar.gz
dotfiles-b01995ddbc65372d98f1755cb063eb18669a6061.zip
use pass to get the mail passwords
Diffstat (limited to 'offlineimap')
-rw-r--r--offlineimap/FAU.IMAP.PASS.gpgbin610 -> 0 bytes
-rw-r--r--offlineimap/MUHQ.IMAP.PASS.gpgbin609 -> 0 bytes
-rw-r--r--offlineimap/offlineimap.py4
-rw-r--r--offlineimap/offlineimaprc5
4 files changed, 7 insertions, 2 deletions
diff --git a/offlineimap/FAU.IMAP.PASS.gpg b/offlineimap/FAU.IMAP.PASS.gpg
deleted file mode 100644
index 3ef1318..0000000
--- a/offlineimap/FAU.IMAP.PASS.gpg
+++ /dev/null
Binary files differ
diff --git a/offlineimap/MUHQ.IMAP.PASS.gpg b/offlineimap/MUHQ.IMAP.PASS.gpg
deleted file mode 100644
index 5779c07..0000000
--- a/offlineimap/MUHQ.IMAP.PASS.gpg
+++ /dev/null
Binary files differ
diff --git a/offlineimap/offlineimap.py b/offlineimap/offlineimap.py
new file mode 100644
index 0000000..8172d4d
--- /dev/null
+++ b/offlineimap/offlineimap.py
@@ -0,0 +1,4 @@
+from subprocess import check_output
+
+def get_passwd(account):
+ return check_output("pass email/" + account, shell=True).rstrip().split("\n")[0]
diff --git a/offlineimap/offlineimaprc b/offlineimap/offlineimaprc
index ea78741..3a46bd4 100644
--- a/offlineimap/offlineimaprc
+++ b/offlineimap/offlineimaprc
@@ -3,6 +3,7 @@
[general]
accounts = FAUMail,MUHQ
maxsyncaccounts = 2
+pythonfile = $DOTFILES_LOCATION/offlineimap/offlineimap.py
[Account FAUMail]
localrepository = LocalFAU
@@ -23,7 +24,7 @@ type = IMAP
remotehost = faumail.uni-erlangen.de
remoteport = 993
remoteuser = aj46ezos
-remotepassfile = $DOTFILES_LOCATION/decrypted/FAU.IMAP.PASS
+remotepasseval = get_passwd("FAU")
ssl=yes
cert_fingerprint = BB9EE687E92693794C752F57C53483076DEF2755
newmail_hook = lambda: __import__("os").system("i3-nagbar -m \"new mail in FAU\" > /dev/null 2>&1 &")
@@ -38,7 +39,7 @@ type = IMAP
remotehost = antares.uberspace.de
remoteport = 993
remoteuser = muhq
-remotepassfile = $DOTFILES_LOCATION/decrypted/MUHQ.IMAP.PASS
+remotepasseval = get_passwd("MUHQ")
ssl=yes
cert_fingerprint = B53A1586456E35E454DA3581980330903753AD3E
newmail_hook = lambda: __import__("os").system("i3-nagbar -m \"new mail in MUHQ\" > /dev/null 2>&1 &")