From 2073a3427e6d61ff5c8393a37b0e8934f1352426 Mon Sep 17 00:00:00 2001 From: Timo Wilken Date: Wed, 8 Feb 2023 23:17:44 +0100 Subject: Fix neomutt XOAUTH2 setup for SMTP --- tw/home/files/muttrc | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'tw/home/files/muttrc') diff --git a/tw/home/files/muttrc b/tw/home/files/muttrc index a037611e..67b9f507 100644 --- a/tw/home/files/muttrc +++ b/tw/home/files/muttrc @@ -91,7 +91,7 @@ account-hook "$my_mythic" 'set postponed = +Drafts' account-hook "$my_mythic" 'set record = +Sent' account-hook "$my_mythic" 'set trash = +Rubbish' account-hook "$my_mythic" 'set from = "$imap_user"' -account-hook "$my_mythic" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1 smtp_authenticators imap_authenticators imap_oauth_refresh_command' +account-hook "$my_mythic" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1 imap_authenticators smtp_authenticators imap_oauth_refresh_command smtp_oauth_refresh_command' set my_cern = "imaps://imap.cern.ch/" account-hook "$my_cern" 'unmailboxes *' @@ -109,7 +109,7 @@ account-hook "$my_cern" 'set record = "+Sent Items"' account-hook "$my_cern" 'set trash = "+Deleted Items"' account-hook "$my_cern" 'set from = "$imap_user"' account-hook "$my_cern" 'set ssl_use_tlsv1 ssl_use_tlsv1_1' # imap.cern.ch needs this; make sure to reset for other accounts! -account-hook "$my_cern" 'reset imap_authenticators imap_oauth_refresh_command' +account-hook "$my_cern" 'reset imap_authenticators imap_oauth_refresh_command smtp_oauth_refresh_command' set my_gmail = "imaps://imap.gmail.com/" account-hook "$my_gmail" 'unmailboxes *' @@ -124,7 +124,7 @@ account-hook "$my_gmail" 'set postponed = "+[Gmail]/Drafts"' account-hook "$my_gmail" 'set record = "+[Gmail]/Sent Mail"' account-hook "$my_gmail" 'set trash = "+[Gmail]/Bin"' account-hook "$my_gmail" 'set from = "$imap_user"' -account-hook "$my_gmail" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1 smtp_authenticators imap_authenticators imap_oauth_refresh_command' +account-hook "$my_gmail" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1 imap_authenticators smtp_authenticators imap_oauth_refresh_command smtp_oauth_refresh_command' # ExOl needs OAUTH now! # https://neomutt.org/guide/optionalfeatures.html#oauth @@ -141,9 +141,10 @@ account-hook "$my_cantab" 'set postponed = +Drafts' account-hook "$my_cantab" 'set record = "+Sent Items"' account-hook "$my_cantab" 'set trash = "+Deleted Items"' account-hook "$my_cantab" 'set from = "$imap_user"' -account-hook "$my_cantab" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1 smtp_authenticators' -account-hook "$my_cantab" 'set imap_authenticators = "xoauth2"' +account-hook "$my_cantab" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1' +account-hook "$my_cantab" 'set imap_authenticators=xoauth2 smtp_authenticators=xoauth2' account-hook "$my_cantab" 'set imap_oauth_refresh_command = "mutt_oauth2.py --encryption-pipe=\"gpg --encrypt --recipient timo@twilken.net\" $XDG_DATA_HOME/neomutt/cantab.gpg"' +account-hook "$my_cantab" 'set smtp_oauth_refresh_command = $imap_oauth_refresh_command' set my_outlook = "imaps://timo_wilken@live.co.uk@outlook.office365.com/" account-hook "$my_outlook" 'unmailboxes *' @@ -158,9 +159,10 @@ account-hook "$my_outlook" 'set postponed = +Drafts' account-hook "$my_outlook" 'set record = +Sent' account-hook "$my_outlook" 'set trash = +Deleted' account-hook "$my_outlook" 'set from = "$imap_user"' -account-hook "$my_outlook" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1 smtp_authenticators' -account-hook "$my_outlook" 'set imap_authenticators = "xoauth2"' +account-hook "$my_outlook" 'reset ssl_use_tlsv1 ssl_use_tlsv1_1' +account-hook "$my_outlook" 'set imap_authenticators=xoauth2 smtp_authenticators=xoauth2' account-hook "$my_outlook" 'set imap_oauth_refresh_command = "mutt_oauth2.py --encryption-pipe=\"gpg --encrypt --recipient timo@twilken.net\" $XDG_DATA_HOME/neomutt/outlook.gpg"' +account-hook "$my_outlook" 'set smtp_oauth_refresh_command = $imap_oauth_refresh_command' macro index,pager gm "set folder=$my_mythic+INBOX" "Switch to Mythic Beasts account" macro index,pager gG "set folder=$my_gmail+INBOX" "Switch to Gmail account" -- cgit v1.2.3