From 4f0ed35875a2d96c234400aa6bd9d04df43a26bc Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Fri, 21 Apr 2023 20:28:20 +0200 Subject: Let aerc handle XOAUTH itself This should be more reliable than using mutt_oauth2 and fighting aerc's caching of the passphrase. This also fixes sending emails from the Cantab and Outlook accounts. --- tw/home/files/aerc/accounts.conf | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'tw/home/files/aerc') diff --git a/tw/home/files/aerc/accounts.conf b/tw/home/files/aerc/accounts.conf index 9fb1e04b..e40f8a1d 100644 --- a/tw/home/files/aerc/accounts.conf +++ b/tw/home/files/aerc/accounts.conf @@ -42,10 +42,11 @@ postpone = [Gmail]/Drafts cache-headers = true [Cantab] -source = imaps+xoauth2://tw466%40cantab.ac.uk@outlook.office365.com -outgoing = smtps+xoauth2://tw466%40cantab.ac.uk@smtp-mail.outlook.com -source-cred-cmd = mutt_oauth2.py --encryption-pipe='gpg --encrypt --recipient timo@twilken.net' "$XDG_DATA_HOME/neomutt/cantab.gpg" -outgoing-cred-cmd = mutt_oauth2.py --encryption-pipe='gpg --encrypt --recipient timo@twilken.net' "$XDG_DATA_HOME/neomutt/cantab.gpg" +source = imaps+xoauth2://tw466%40cantab.ac.uk@outlook.office365.com?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/token&scope=https://outlook.office.com/SMTP.Send https://outlook.office.com/IMAP.AccessAsUser.All offline_access +outgoing = smtp+xoauth2://tw466%40cantab.ac.uk@smtp-mail.outlook.com:587?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/token&scope=https://outlook.office.com/SMTP.Send https://outlook.office.com/IMAP.AccessAsUser.All offline_access +smtp-starttls = yes +source-cred-cmd = pass cambridge/exol-refresh-token +outgoing-cred-cmd = pass cambridge/exol-refresh-token default = INBOX from = Timo Wilken copy-to = Sent Items @@ -53,10 +54,11 @@ postpone = Drafts cache-headers = true [Outlook] -source = imaps+xoauth2://timo_wilken%40live.co.uk@outlook.office365.com -outgoing = smtps+xoauth2://timo_wilken%40live.co.uk@smtp-mail.outlook.com -source-cred-cmd = mutt_oauth2.py --encryption-pipe='gpg --encrypt --recipient timo@twilken.net' "$XDG_DATA_HOME/neomutt/outlook.gpg" -outgoing-cred-cmd = mutt_oauth2.py --encryption-pipe='gpg --encrypt --recipient timo@twilken.net' "$XDG_DATA_HOME/neomutt/outlook.gpg" +source = imaps+xoauth2://timo_wilken%40live.co.uk@outlook.office365.com?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/token&scope=https://outlook.office.com/SMTP.Send https://outlook.office.com/IMAP.AccessAsUser.All offline_access +outgoing = smtp+xoauth2://timo_wilken%40live.co.uk@smtp-mail.outlook.com:587?client_id=9e5f94bc-e8a4-4e73-b8be-63364c29d753&token_endpoint=https://login.microsoftonline.com/common/oauth2/v2.0/token&scope=https://outlook.office.com/SMTP.Send https://outlook.office.com/IMAP.AccessAsUser.All offline_access +smtp-starttls = yes +source-cred-cmd = pass www/microsoft/exol-refresh-token +outgoing-cred-cmd = pass www/microsoft/exol-refresh-token default = INBOX from = Timo Wilken copy-to = Sent -- cgit v1.2.3