Skip to main content

Packaged, maintained version of contributed mutt_oauth2.py script.

Project description

OAuth2 script for Mutt

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.1.tar.gz (9.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.0.1-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mutt_oauth2-0.0.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.12.1-gentoo-limelight

File hashes

Hashes for mutt_oauth2-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8df29247d075153e30713ea244bddd94f682aa0d6d50adc1d2cd144338ed3694
MD5 e8b141e211ebd74c2a209efd0942eecb
BLAKE2b-256 0277ad2249f56031d4018ffb8de230310abda3e3965548c44c773ea5d8a200d5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mutt_oauth2-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.4 CPython/3.12.7 Linux/6.12.1-gentoo-limelight

File hashes

Hashes for mutt_oauth2-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c7f9409ccbc9df6d92d225a976945bd077d15e14ee58a30e8d2e76a2502a96bb
MD5 54fa56a51978678867f3b5f197f3cf34
BLAKE2b-256 07d966c60af95b2a36d3e87a952f6045930aa62cc56651eaef78588be2c99290

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