summaryrefslogtreecommitdiff
path: root/tw
diff options
context:
space:
mode:
authorTimo Wilken2023-02-08 23:17:44 +0100
committerTimo Wilken2023-02-08 23:19:35 +0100
commit2073a3427e6d61ff5c8393a37b0e8934f1352426 (patch)
treedd4efc3e1d53a00ff4f3cf299a3625ff39a4e759 /tw
parent99f53587420703a4679bc18b32c5680f88de9d3a (diff)
Fix neomutt XOAUTH2 setup for SMTP
Diffstat (limited to 'tw')
-rw-r--r--tw/home/files/muttrc16
1 files changed, 9 insertions, 7 deletions
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 "<sync-mailbox><enter-command>set folder=$my_mythic<enter><change-folder>+INBOX<enter>" "Switch to Mythic Beasts account"
macro index,pager gG "<sync-mailbox><enter-command>set folder=$my_gmail<enter><change-folder>+INBOX<enter>" "Switch to Gmail account"