Skip to main content

Packaged, maintained version of contributed mutt_oauth2.py script.

Project description

mutt-oauth2

Python versions PyPI - Version GitHub tag (with filter) License GitHub commits since latest release (by SemVer including pre-releases) CodeQL QA Tests Coverage Status Dependabot Documentation Status mypy uv pytest Ruff Downloads Stargazers pre-commit Prettier

@Tatsh Buy Me A Coffee Libera.Chat Mastodon Follow Patreon

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

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.
  -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.2.0.tar.gz (16.6 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.2.0-py3-none-any.whl (11.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mutt_oauth2-0.2.0.tar.gz
  • Upload date:
  • Size: 16.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mutt_oauth2-0.2.0.tar.gz
Algorithm Hash digest
SHA256 367f03ddbc59bb4bacfc51062a0c07e5f8c3aa3f90b8dbbe6ad5a704df2e7b54
MD5 5165547a59c89abd0f8cdbef55c3ad7a
BLAKE2b-256 95c1d9fad67c3a5390eecc44852ac20d643bbcdab0b3dd35a0a155f05daa05e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for mutt_oauth2-0.2.0.tar.gz:

Publisher: publish.yml on Tatsh/mutt-oauth2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: mutt_oauth2-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mutt_oauth2-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dca71ae2a155e5700e35e50bdcb2a754f70914908f3b427bd7e4444b72e0ed9
MD5 dbf6102fdcd8b1941fe6baf5a6975bba
BLAKE2b-256 18f5bceab80acc7ffa95945a73ed551380de1bd5f2143e5526cbd61bc40d1ca0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mutt_oauth2-0.2.0-py3-none-any.whl:

Publisher: publish.yml on Tatsh/mutt-oauth2

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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