Skip to main content

Packaged, maintained version of contributed mutt_oauth2.py script.

Project description

OAuth2 script for Mutt

QA Tests Coverage Status Documentation Status PyPI - Version GitHub tag (with filter) GitHub GitHub commits since latest release (by SemVer including pre-releases)

This is an update of Alexander Perlis' script and conversion to a package. Instead of using GPG for token storage, this package uses Keyring.

Installation

pip install mutt-oauth2

Usage

Usage: mutt-oauth2 [OPTIONS]

  Obtain and print a valid OAuth2 access token.

Options:
  -a, --authorize      Manually authorise new tokens.
  -d, --debug          Enable debug logging.
  -t, --test           Test authentication.
  -u, --username TEXT  Keyring username.
  -v, --verbose        Enable verbose logging.
  -h, --help           Show this message and exit.

Start by calling mutt-oauth2 -a. Be sure to have your client ID and and client secret available.

Scopes required

Provider Scopes
Gmail Gmail API
Microsoft offline_access IMAP.AccessAsUser.All POP.AccessAsUser.All SMTP.Send

To support other accounts, use the --username argument with a unique string such as the account email address.

Test the script with the --test argument.

mutt configuration

Add the following to muttrc:

set imap_authenticators="oauthbearer:xoauth2"
set imap_oauth_refresh_command="/path/to/mutt-oauth2"
set smtp_authenticators=${imap_authenticators}
set smtp_oauth_refresh_command=${imap_oauth_refresh_command}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mutt_oauth2-0.0.3.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mutt_oauth2-0.0.3-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

Details for the file mutt_oauth2-0.0.3.tar.gz.

File metadata

  • Download URL: mutt_oauth2-0.0.3.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.9 Linux/6.14.0-gentoo-limelight

File hashes

Hashes for mutt_oauth2-0.0.3.tar.gz
Algorithm Hash digest
SHA256 0e6039144a27bcd4eedcb00d2b59fb7c80c07c07eca1e8f9b13c552b371e271b
MD5 7816d0cba252f67141fe9d30603be06e
BLAKE2b-256 aa89799c52ae33f9650db36f1732a39be39c03ecf637f0d6d27272c0fa467c74

See more details on using hashes here.

File details

Details for the file mutt_oauth2-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: mutt_oauth2-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 9.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.9 Linux/6.14.0-gentoo-limelight

File hashes

Hashes for mutt_oauth2-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b0df0a95568b510b67356d79eb27bbe75a7893d98f879dd72c3b2ae3a1adfcc7
MD5 fc4d4508b05873049a834a8a67adb147
BLAKE2b-256 eee9ba52238639de60a9904f3a02ae4c4f1ee929e386833164eddbbd3ebc60e6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page