(I forget who the original poster was.)
I try to migrate a GMail mailbox to Dovecot using
doveadm backup -R imapc:
. Since it seems that GMail disabled the login without XOAUTH2, I cannot figure out how to authenticate dovecot to GMail. Could you point me in the right direction? Thank you in advance!
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.
(Applicable only for alpine but show the interaction)
https://alpineapp.email/alpine/alpine-info/misc/AuthorizeAlpineGmail.html
Good luck. Joseph Tam <jtam.home@gmail.com>