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) QA Tests Coverage Status Documentation Status mypy pre-commit pydocstyle pytest Ruff Downloads Stargazers

@Tatsh Mastodon Follow

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.
  -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.1.0.tar.gz (15.7 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.0-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mutt_oauth2-0.1.0.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Linux/6.14.6-gentoo-limelight

File hashes

Hashes for mutt_oauth2-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9215aa49da11da9da33e0d58c66e485e7c430c3ee5cccbfe7be517dfa0d5673a
MD5 5bd1888985323d52488daf1a19f577d4
BLAKE2b-256 6c3267ed095d6395d31a2f1238a1e33640db265856417f4dd378c74f383e5f52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mutt_oauth2-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.3 Linux/6.14.6-gentoo-limelight

File hashes

Hashes for mutt_oauth2-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 302198a446f43d08f572dde76856aed54eb49860d4cb405ecabb2cc3fe232456
MD5 eeb6d178ae173b47f51989a70234a65f
BLAKE2b-256 af013c039436705cd81f0291ad1c98e667a0e5c90c09b0d9faf8f01d9f8b8b62

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