OAuth Authentication#
Preliminary OAUTH support for IMAP, POP, and SMTP is provided via external scripts.
Setting Up OAuth for Gmail#
Download the
oauth2.pyscript from Google’s gmail-oauth2-tools: google/gmail-oauth2-toolsGet your own OAuth client credentials for Gmail here: https://console.developers.google.com/apis/credentials
Use
oauth2.pywith--generate_oauth2_tokento get a refresh token.Configure NeoMutt:
set imap_authenticators="oauthbearer" set imap_oauth_refresh_command="/path/to/oauth2.py --quiet --user=[email_address]\ --client_id=[client_id] --client_secret=[client_secret]\ --refresh_token=[refresh_token]"
Setting Up OAuth for Office365#
Download the
mutt_oauth2.pyscript written by Alexander Perlis: neomutt/neomuttGet your own OAuth client credentials by following the script instructions: neomutt/neomutt
Configure NeoMutt:
set imap_authenticators="xoauth2" set imap_oauth_refresh_command="/path/to/mutt_oauth2.py /path/to/token"
Configuring for POP and SMTP#
Substitute pop or smtp for imap in the above examples to configure for those protocols.
Note
XOAUTH2 support has not yet been implemented for POP.