Re: using mutt_oauth2.py
"Mathias M." <[email protected]> Mon, 1 Jun 2026 12:00:11 +0200
| Newsgroups | gmane.mail.mutt.user |
|---|---|
| Message-ID | <[email protected]> |
--j5pyOPrjUqmrU0S+ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 31, 2026 at 11:53:22AM -0400, Todd Zullinger wrote: > Globe Trotter via Mutt-users wrote: > > My workplace has moved to O365 with oauth2 and I was > > trying to figure out how to get mutt to work. (They allow > > evolution for linux users, but I want to see if I can get > > away with continuing to use mutt.) The evolution setup for > > O365 is not local to my workplace and the configuation > > seems to accept tenant common and the usual application ID > > (client ID). I am not sure what the client_secret is, or > > where to find this. (I am able to log in through > > evolution, and access my email.) >=20 > IIRC, the evolution developers make some attempt to obscure > the client_secret in their code -- which is mostly an > annoyance. >=20 > > So, I was looking into using mutt_oauth2.py. > >=20 > > I came across this post, got the gpg key in place of > > YOUR_GPG_IDENTITY and tried to follow the instructions: > >=20 > > https://www.dcs.gla.ac.uk/~jacobd/posts/2022/03/configure-mutt-to-work-= with-oauth-20/ > >=20 > > (I put in the client ID, and for now left the > > client_secret "" because I can not tell where this is > > stored in evolution). Advice on this would be very helpful > > too. >=20 > I think you do need both, but I've only set it up with Gmail > so I can't be sure what Microsoft does or requires. >=20 > > Anyway, but at this poiint, I do not appear to even get > > there: > >=20 > > I try: > >=20 > > $ python mutt_oauth2.py token.txt --authorize > > Difficulty decrypting token file. Is your decryption agent > > primed for non-interactive usage, or an appropriate > > environment variable such as GPG_TTY set to allow > > interactive agent usage from inside a pipe? > >=20 > > Where is this token file put in, in the script? >=20 > It's the argument you pass to the script. So with the > command you wrote above, it would be token.txt in the > directory where you ran the command from. Ideally, you > should specify a full path to ensure things work regardless > of the directory from which you run the script. >=20 > > Actually, is there any place with detailed instructions on > > this? >=20 > Have you seen the thorough README file which is next to the > mutt_oath2.py script in the mutt contrib directory? That is > a good place to start. Being a workplace, I don't know if > you can register a client id on your own or not, but it > might be worth trying. >=20 > --=20 > Todd Good point. In my employer's case, I had to use Thunderbird's client_id. Which is: 9e5f94bc-e8a4-4e73-b8be-63364c29d753 Regards, Mathias --=20 Not all who own a harp are harpers. -- Marcus Terentius Varro --j5pyOPrjUqmrU0S+ Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSXcwa3xmXCSjFzs2SHlo9nzwrr/AUCah1YKgAKCRCHlo9nzwrr /HyyAP9dZGtUldQzouNTItJOzCDSUUk8mrTaVcRwPpTz7PNTYwD7Bq8TjzQZRTPq 6UqGYiz4hffQciwPgRXxdFEHj74J4Aw= =PwBs -----END PGP SIGNATURE----- --j5pyOPrjUqmrU0S+--