On 11/21/2024 6:07 AM MST Jan Naumann via dovecot <dovecot@dovecot.org> wrote:
On 20.11.24 23:49, Joseph Tam via dovecot wrote:
I just did this for my alpine mail reader, and it's not so simple. It may be simpler to use a mail reader that has XOAUTH2 built in, then connect to both Gmail and your mail account, then drag and drop all your mailboxes.
If you want to do it the hard way, the document for alpine might be useful for a single Gmail account, at least to set up the Gmail end.
https://alpineapp.email/alpine/alpine-info/misc/ xoauth2.html#SettingUpGmail
After that, you have to do some rigamrole to use these IDs to create the credentials you can use for IMAP authentication.
I encourage people that are interested in making OAUTH universally available for email protocols (without pre-registration) for all clients and servers to join/follow the MAILMAINT IETF working group: https://datatracker.ietf.org/wg/mailmaint/about/
In particular, this document on OAUTH public profiles: https://datatracker.ietf.org/doc/draft-jenkins-oauth-public/
There's also a second required autoconfig component, although the proposals currently posted are a bit outdated. (We are planning on moving forward with a much reduced version of https://datatracker.ietf.org/doc/draft-ietf-mailmaint-autoconfig/ , although it generally is the concept being looked at).
In short, in the (hopefully) very near future, you will be able to open a mail application, enter your email address as "setup", and then be presented with the auth screen of your local OAUTH provider.
michael