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 pre-commit Poetry pydocstyle pytest Ruff Downloads Stargazers 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.1.2.tar.gz (15.9 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.1.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for mutt_oauth2-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1295e84c75b3cf3e4a6a8791cce54c89afdf6154cdeb89f6b6695ba85d4dde4a
MD5 12b66acdbb9a7a7cde3f5da90bca843b
BLAKE2b-256 9d18b049ccad0d8cb8ddc43bbde7443e274cdccb8b94eb927cd067452a1978b9

See more details on using hashes here.

Provenance

The following attestation bundles were made for mutt_oauth2-0.1.2.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.1.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for mutt_oauth2-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d52e0b0222d859fb05f88b503035399de8c832add36e8607708a0442bd524756
MD5 f2516156e8217a6f35e36df37ac9ae05
BLAKE2b-256 97949ec349d24ec7b6899c6fdd5a276e964f96d3679bb6f9119349f0c7c1c14c

See more details on using hashes here.

Provenance

The following attestation bundles were made for mutt_oauth2-0.1.2-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