From f3eab8b014c11eacced5034180e93ee2578a87ba Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Fri, 7 Apr 2023 17:50:09 +0200 Subject: Update CERN mail config for ExOl --- tw/home/files/aerc/accounts.conf | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/tw/home/files/aerc/accounts.conf b/tw/home/files/aerc/accounts.conf index 1d8f3559..53220cc9 100644 --- a/tw/home/files/aerc/accounts.conf +++ b/tw/home/files/aerc/accounts.conf @@ -10,12 +10,20 @@ postpone = Drafts cache-headers = true [CERN] -source = imaps+insecure://twilken@imap.cern.ch -outgoing = smtp+login://twilken@smtp.cern.ch -source-cred-cmd = pass cern/sso | head -1 -outgoing-cred-cmd = pass cern/sso | head -1 +# https://man.sr.ht/~rjarry/aerc/providers/microsoft.md#office365-with-xoauth2 +source = imaps+xoauth2://timo.wilken%40cern.ch@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%40cern.ch@smtp.office365.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 = true +# To authorize for the first time (to get refresh token): +# mutt_oauth2.py ~/.local/share/aerc/cern.tokens --authorize --authflow authcode --provider microsoft \ +# --email timo.wilken@cern.ch --client-id 9e5f94bc-e8a4-4e73-b8be-63364c29d753 --client-secret '' \ +# --encryption-pipe 'gpg --encrypt --recipient timo@twilken.net' +# Confirm empty client secret. When done, copy-paste ?code= value from final URL to the command-line. +# Then, to store the refresh token: +# gpg --decrypt ~/.local/share/aerc/cern.tokens | jq -r .refresh_token | pass insert -e -f cern/exol/refresh-token +source-cred-cmd = pass cern/exol/refresh-token +outgoing-cred-cmd = pass cern/exol/refresh-token default = INBOX -smtp-starttls = yes from = Timo Wilken aliases = twilken@cern.ch copy-to = Sent Items -- cgit v1.2.3