aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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
-rwxr-xr-xsetup.py2
5 files changed, 7 insertions, 4 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 &")
diff --git a/setup.py b/setup.py
index d9887a5..2153685 100755
--- a/setup.py
+++ b/setup.py
@@ -124,8 +124,6 @@ targets = {
"offlineimap":
[offlineimap_warn,
("offlineimap/offlineimaprc", home_dir + "/.offlineimaprc"),
- ("offlineimap/FAU.IMAP.PASS.gpg", ""),
- ("offlineimap/MUHQ.IMAP.PASS.gpg", ""),
("offlineimap/offlineimap@.service",
"/etc/systemd/system/offlineimap@" + user + ".service"),
offlineimap_passwd],