all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Timo Wilken <timo@twilken.net>
To: Giovanni Biscuolo <g@xelera.eu>, Peter Polidoro <peter@polidoro.io>
Cc: help-guix@gnu.org
Subject: Re: mbsync with XOAUTH2 SASL mechanism
Date: Thu, 26 Jan 2023 19:15:24 +0100	[thread overview]
Message-ID: <76129804-13E5-4580-AF08-7CCC98425944@twilken.net> (raw)
In-Reply-To: <87y1ppfvit.fsf@xelera.eu>

Hi Giovanni!



On 26 January 2023 11:19:22 CET, Giovanni Biscuolo <g@xelera.eu> wrote:
>Timo Wilken <guix@twilken.net> writes:
>> Instead, I ended up "borrowing" Thunderbird's client key and secret,
>> which has worked fine so far.
>
>thanks for sharing this trick!
>
>this adds a big dependency in our software stack, but it works, so why
>not! :-)

Just to be clear: I did not install Thunderbird. I do not run Thunderbird. I only copy-pasted the client key from its source code into my own scripts. See below for details.

>a couple questions:
>
>- have you tried getmail6 with the mentioned howto?

No, I have not, sorry.

>- to refresh the tokens do you have to periodically run Thunderbird?

No, I do not run Thunderbird. I use neomutt to read my mail, and specifically for XOAUTH2 I use the "mutt_oauth2.py" script that comes with neomutt: https://github.com/neomutt/neomutt/blob/main/contrib/oauth2/mutt_oauth2.py

This script handles everything XOAUTH2-related, including refreshing tokens when needed. I just call it with its --client-id and --client-secret parameters (among other params; I am on my phone at the moment and cannot look up the full invocation I use), using the values I got from Thunderbirds source code.

(See also the neomutt documentation: https://neomutt.org/guide/optionalfeatures#6-%C2%A0oauthbearer-and-xoauth2-support)

Perhaps you can adapt this script to your usecase.

Cheers,
Timo


  reply	other threads:[~2023-01-26 18:17 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-01 15:13 mbsync with XOAUTH2 SASL mechanism Peter Polidoro
2022-11-13 18:27 ` Joshua Branson
2022-11-13 19:04   ` Peter Polidoro
2022-11-13 22:00     ` Felix Lechner via
2022-11-14 23:05   ` Tobias Geerinckx-Rice
2022-11-15 15:43   ` jbranso
2023-01-24 10:04 ` Giovanni Biscuolo
2023-01-24 12:41   ` Peter Polidoro
2023-01-25 17:51     ` Timo Wilken
2023-01-26 10:19       ` Giovanni Biscuolo
2023-01-26 18:15         ` Timo Wilken [this message]
2023-01-26 10:13   ` Giovanni Biscuolo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76129804-13E5-4580-AF08-7CCC98425944@twilken.net \
    --to=timo@twilken.net \
    --cc=g@xelera.eu \
    --cc=help-guix@gnu.org \
    --cc=peter@polidoro.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.