From 31002f29a78649d113f5323232e71101ce759fa5 Mon Sep 17 00:00:00 2001
From: praschdorff
Date: Sat, 3 Mar 2018 21:42:03 +0100
Subject: [PATCH 1/2] added option to get rid of COATH2 authentication failed
warnings
If running offlineimap it will show the following warning message (tested when using GMAIL)...
XOAUTH2 authentication failed: AUTHENTICATE command error: BAD ['Client aborted AUTHENTICATE command.
']. Data: DIEF2 AUTHENTICATE XOAUTH
... and then continue with the download/sync of emails.
You can get rid of the warning message, when adding auth_mechanisms = LOGIN .offlineimaprc in the <...>-remote section.
---
autoconf/offlineimap_profile | 1 +
1 file changed, 1 insertion(+)
diff --git a/autoconf/offlineimap_profile b/autoconf/offlineimap_profile
index 01b572c..ce7a01b 100644
--- a/autoconf/offlineimap_profile
+++ b/autoconf/offlineimap_profile
@@ -4,6 +4,7 @@ localrepository = $title-local
remoterepository = $title-remote
[Repository $title-remote]
+auth_mechanisms = LOGIN
type = $type
remoteuser = $login
sslcacerfile = /etc/ssl/cets/ca-certificates.crt
From f91aaf0cdb8ac975e0e8503cd68f63b56b931249 Mon Sep 17 00:00:00 2001
From: praschdorff
Date: Tue, 6 Mar 2018 22:25:02 +0100
Subject: [PATCH 2/2] changed GPG parameters from -q to --quiet
under Qubes OS the use of qubes-gpg-client (instead of gpg) will not work with the -q option, but with the --quiet option.
As such using the full parameter names will not harm to all "normal" users, but make the script more stable for other users.
Additionaly it makes the scripts more readable for beginners to understand what the script is doing.
---
credentials/getmuttpass | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/credentials/getmuttpass b/credentials/getmuttpass
index e01c5de..f94cb82 100755
--- a/credentials/getmuttpass
+++ b/credentials/getmuttpass
@@ -1,4 +1,4 @@
#!/bin/bash
-pass=$(gpg2 -d -q ~/.config/mutt/credentials/$1.gpg)
+pass=$(gpg2 --decrypt --quiet ~/.config/mutt/credentials/$1.gpg)
echo set smtp_pass=\"$pass\"
echo set imap_pass=\"$pass\"