saslxoauth icon indicating copy to clipboard operation
saslxoauth copied to clipboard

XOAuth SASL lib for Gmail

h1. saslxoauth - an very duty SASL XOAuth plugin

A very simple "Cyrus SASL2":http://cyrusimap.web.cmu.edu/ client side plugin for XOAuth that works with "Mutt":http://www.mutt.org/ to login into "Gmail":http://gmail.com IMAP.

h2. Installation/setup

  • Install the dependencies ** "SASL":http://cyrusimap.web.cmu.edu/ (libsasl2-dev on Ubuntu) ** "libOAuth":http://liboauth.sourceforge.net/ (liboauth-dev on Ubuntu)
  • Build and install the plugin via @make && sudo make install@
  • Go to "Quick Run-Through with oauth2.py":https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough#quick-run-through-with-oauth2py and download @oauth2.py@ per their instructions.
  • Follow the step "Create and Authorize an OAuth Token":https://github.com/google/gmail-oauth2-tools/wiki/OAuth2DotPyRunThrough#creating-and-authorizing-an-oauth-token
  • Use the @oauth_token@ and @oauth_token_secret@ and add them into the config file @~/.xoauthrc@:

bc. # The last oauth_token output of xoauth.py token = 4/8Um6T29C3ehUXnqqQYzqAqzsAKRK

The last oauth_token_secret output of xoauth.py

token_secret = Eq2DySVk63bJegXlgW8ZfrQZ

  • Configure mutt to use XOAUTH as the SASL auth mechanism. E.g., in your @~/.muttrc@:

bc. set imap_authenticators="XOAUTH" set smtp_authenticators="XOAUTH"