aboutsummaryrefslogtreecommitdiffstats
path: root/mbsync
diff options
context:
space:
mode:
Diffstat (limited to 'mbsync')
-rw-r--r--mbsync/.mbsyncrc4
-rwxr-xr-xmbsync/usr/bin/get-mail-password12
-rwxr-xr-xmbsync/usr/bin/set-mail-password17
3 files changed, 2 insertions, 31 deletions
diff --git a/mbsync/.mbsyncrc b/mbsync/.mbsyncrc
index c710405..1d9573b 100644
--- a/mbsync/.mbsyncrc
+++ b/mbsync/.mbsyncrc
@@ -2,7 +2,7 @@
IMAPAccount ryuslash
Host imap-ryuslash.alwaysdata.net
User tom@ryuslash.org
-PassCmd "~/usr/bin/get-mail-password ryuslash"
+PassCmd "secret-tool lookup application mbsync account ryuslash"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
@@ -26,7 +26,7 @@ SyncState *
IMAPAccount gmail
Host imap.gmail.com
User ryuslash@gmail.com
-PassCmd "~/usr/bin/get-mail-password gmail"
+PassCmd "secret-tool lookup application mbsync account gmail"
SSLType IMAPS
CertificateFile /etc/ssl/certs/ca-certificates.crt
diff --git a/mbsync/usr/bin/get-mail-password b/mbsync/usr/bin/get-mail-password
deleted file mode 100755
index ecfbb09..0000000
--- a/mbsync/usr/bin/get-mail-password
+++ /dev/null
@@ -1,12 +0,0 @@
-#!/usr/bin/python3
-
-import sys
-import secretstorage
-
-connection = secretstorage.dbus_init()
-collection = secretstorage.get_collection_by_alias(connection, "login")
-
-for foo in collection.search_items(
- {"application": "mbsync", "account": sys.argv[1]}
-):
- print(foo.get_secret().decode())
diff --git a/mbsync/usr/bin/set-mail-password b/mbsync/usr/bin/set-mail-password
deleted file mode 100755
index c36e39b..0000000
--- a/mbsync/usr/bin/set-mail-password
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/python3
-
-import sys
-from getpass import getpass
-import secretstorage
-
-connection = secretstorage.dbus_init()
-collection = secretstorage.get_collection_by_alias(connection, "login")
-attributes = {"application": "mbsync", "account": sys.argv[1]}
-
-collection.create_item(
- "Password for '{}' on '{}'".format(
- attributes["account"], attributes["application"]
- ),
- attributes,
- getpass().encode(),
-)