From 20ca9f947c4e8eab71cb9eb0555d8c169e07e3ea Mon Sep 17 00:00:00 2001 From: coolneng Date: Sun, 14 Nov 2021 17:47:56 +0100 Subject: [PATCH] Configure UGent email account with XOAUTH2 --- goimapnotify/.config/goimapnotify/ugent.conf | 1 + mbsync/.mbsyncrc | 2 ++ msmtp/.msmtprc | 2 ++ 3 files changed, 5 insertions(+) diff --git a/goimapnotify/.config/goimapnotify/ugent.conf b/goimapnotify/.config/goimapnotify/ugent.conf index 0d19b61..8b55f0f 100644 --- a/goimapnotify/.config/goimapnotify/ugent.conf +++ b/goimapnotify/.config/goimapnotify/ugent.conf @@ -7,6 +7,7 @@ }, "username": "amin.kasrouaouam@ugent.be", "passwordCmd": "pass mail/ugent", + "xoauth2": true, "onNewMail": "mbsync ugent", "onNewMailPost": "notmuch new", "boxes": [ diff --git a/mbsync/.mbsyncrc b/mbsync/.mbsyncrc index eb8b695..aa62e21 100644 --- a/mbsync/.mbsyncrc +++ b/mbsync/.mbsyncrc @@ -2,6 +2,7 @@ IMAPAccount gmail Host imap.gmail.com User akasroua@gmail.com +AuthMechs LOGIN PassCmd "pass mail/gmail" SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt @@ -56,6 +57,7 @@ Channel sync-gmail-junk IMAPAccount ugent Host outlook.office365.com User amin.kasrouaouam@ugent.be +AuthMechs XOAUTH2 PassCmd "pass mail/ugent" SSLType IMAPS CertificateFile /etc/ssl/certs/ca-certificates.crt diff --git a/msmtp/.msmtprc b/msmtp/.msmtprc index bfd1422..8a3aa92 100644 --- a/msmtp/.msmtprc +++ b/msmtp/.msmtprc @@ -4,6 +4,7 @@ auth on tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt logfile /tmp/msmtp.log + # Accounts account gmail host smtp.gmail.com @@ -13,6 +14,7 @@ user akasroua@gmail.com passwordeval "pass mail/gmail" account ugent +auth xoauth2 host smtp.office365.com port 587 from amin.kasrouaouam@ugent.be