Under Development
stars

OAuth Authentication#

Preliminary OAUTH support for IMAP, POP, and SMTP is provided via external scripts.

Setting Up OAuth for Gmail#

  1. Download the oauth2.py script from Google’s gmail-oauth2-tools: google/gmail-oauth2-tools

  2. Get your own OAuth client credentials for Gmail here: https://console.developers.google.com/apis/credentials

  3. Use oauth2.py with --generate_oauth2_token to get a refresh token.

  4. 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#

  1. Download the mutt_oauth2.py script written by Alexander Perlis: neomutt/neomutt

  2. Get your own OAuth client credentials by following the script instructions: neomutt/neomutt

  3. 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.