Project

General

Profile

Receiving emails - IMAP Authentication with OAuth 2.0

Added by Sir Will almost 3 years ago

Hello,

is there currently any option to configure the receiving of emails with IMAP via OAuth? I'm currently using Gmail with plain Username + Password authentication, but this will probably no longer work soon:

Starting May 30, 2022, Google will no longer support the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
https://support.google.com/accounts/answer/6010255


Replies (7)

RE: Receiving emails - IMAP Authentication with OAuth 2.0 - Added by Simon Song almost 3 years ago

+1

Anyone with a solution to this?

RE: Receiving emails - IMAP Authentication with OAuth 2.0 - Added by Tomoko Shimizu almost 3 years ago

+1

I think the procedure described on this page may be helpful. I have not tried it yet.

"Setting Up OAUTH2 Support for Fetchmail and Postfix"
http://mmogilvi.users.sourceforge.net/software/oauthbearer.html

RE: Receiving emails - IMAP Authentication with OAuth 2.0 - Added by Sir Will almost 3 years ago

I have created an App Password now, which requires 2FA to be enabled for the Google account, but seems to work so far. (https://support.google.com/mail/answer/185833)

RE: Receiving emails - IMAP Authentication with OAuth 2.0 - Added by István Ferenc 13 days ago

Hello, I'm trying to change the email fetcher script (lib/tasks/email_oauth.rake) to get mails from google (gmail) but without success.
Has anybody been able to fetch email via imap authenticated with oauth from gmail?

Last time, google postponed this closure, but a new date also passed (2025-03-14). Password authentication still works for IMAP, but who knows till what time.

RE: Receiving emails - IMAP Authentication with OAuth 2.0 - Added by István Ferenc 12 days ago

István Ferenc wrote in RE: Receiving emails - IMAP Authentication with OAuth 2.0:

Hello, I'm trying to change the email fetcher script (lib/tasks/email_oauth.rake) to get mails from google (gmail) but without success.
Has anybody been able to fetch email via imap authenticated with oauth from gmail?

Last time, google postponed this closure, but a new date also passed (2025-03-14). Password authentication still works for IMAP, but who knows till what time.

Finally I have succeeded. I can fetch emails with oauth. I will clean up my solution, and share it somewhere.
Thank you for the links and inspiration.

    (1-7/7)