docker-dmarc-report icon indicating copy to clipboard operation
docker-dmarc-report copied to clipboard

IMAP will stop working with Google accounts from May 30, 2022

Open sepen opened this issue 2 years ago • 8 comments

Hi, thanks for this great project.

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?hl=en&visit_id=637891856465928018-837798669&p=less-secure-apps&rd=1

Last version of IMAPClient is used and I don't see too much movement https://github.com/plobbes/mail-imapclient/issues

The generated error is something like this: Using Mail::IMAPClient version 3.43 on perl 5.032000 Connecting with IO::Socket::SSL PeerAddr imap.gmail.com PeerPort 993 Proto tcp Timeout 600 Debug 1 SSL_verify_mode 0 Connected to imap.gmail.com Read: * OK Gimap ready for requests from 234.234.234.234 e3mb266103497wrd Connecting with IO::Socket::SSL PeerAddr imap.gmail.com PeerPort 993 Proto tcp Timeout 600 Debug 1 SSL_verify_mode 0 Connected to imap.gmail.com Read: * OK Gimap ready for requests from 234.234.234.234 g21mb63565606wmh Sending: 1 LOGIN [email protected] [Redact: Count=1 Showcredentials=OFF] Sent 56 bytes Read: 1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure) ERROR: 1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure) at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 1388. Mail::IMAPClient::__ANON__("1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure)\x{d}\x{a}") called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 1424 Mail::IMAPClient::_get_response(Mail::IMAPClient=HASH(0x7fddbd38c350), 1, undef) called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 1350 Mail::IMAPClient::_imap_command_do(Mail::IMAPClient=HASH(0x7fddbd38c350), "LOGIN this-is-my-email-account\@gmail.com G-b-K-AMlR8Q2nyltB") called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 1248 Mail::IMAPClient::_imap_command(Mail::IMAPClient=HASH(0x7fddbd38c350), "LOGIN this-is-my-email-account\@gmail.com G-b-K-AMlR8Q2nyltB") called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 601 Mail::IMAPClient::login(Mail::IMAPClient=HASH(0x7fddbd38c350)) called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 424 Mail::IMAPClient::Socket(Mail::IMAPClient=HASH(0x7fddbd38c350), IO::Socket::SSL=GLOB(0x7fddbd417588)) called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 369 Mail::IMAPClient::connect(Mail::IMAPClient=HASH(0x7fddbd38c350)) called at /usr/bin/dmarcts-report-parser.pl line 309 ERROR: 1 NO [AUTHENTICATIONFAILED] Invalid credentials (Failure) at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 1298. Mail::IMAPClient::_imap_command(Mail::IMAPClient=HASH(0x7fddbd38c350), "LOGIN this-is-my-email-account\@gmail.com G-b-K-AMlR8Q2nyltB") called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 601 Mail::IMAPClient::login(Mail::IMAPClient=HASH(0x7fddbd38c350)) called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 424 Mail::IMAPClient::Socket(Mail::IMAPClient=HASH(0x7fddbd38c350), IO::Socket::SSL=GLOB(0x7fddbd417588)) called at /usr/local/share/perl5/site_perl/Mail/IMAPClient.pm line 369 Mail::IMAPClient::connect(Mail::IMAPClient=HASH(0x7fddbd38c350)) called at /usr/bin/dmarcts-report-parser.pl line 309 Sending: 2 STATUS Inbox (MESSAGES)

sepen avatar May 26 '22 18:05 sepen

Haven't some people reported success using a gmail account protected by 2FA and then creating an app password?

ptman avatar Jun 15 '22 07:06 ptman

Ya, can't you just use an app password? https://support.google.com/accounts/answer/185833

gene1wood avatar Jul 28 '22 19:07 gene1wood

app passwords are no longer supported. any other alternative email provider you suggest?

landcraft avatar Oct 05 '22 12:10 landcraft

@landcraft Can you say more about what you mean by not supported? When I follow the instructions on Google, I'm able to create an app password :

Creating an app password on Google 2022-10-05

gene1wood avatar Oct 05 '22 14:10 gene1wood

See here - https://support.google.com/accounts/answer/6010255

landcraft avatar Oct 05 '22 14:10 landcraft

@landcraft On that page it says

from May 30, 2022, ​​Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.

You can still use app passwords (which are different from you username and password)

Down at the bottom of that page it says to use app passwords and links to the page that describes how

Use app passwords

Have you tried provisioning an app password per those instructions and using it in docker-dmarc-report?

gene1wood avatar Oct 05 '22 15:10 gene1wood

you're right - I can create an app password (didn't have 2FA). Still unable to connect to it, for some reason (see my other issue)

landcraft avatar Oct 05 '22 15:10 landcraft

I can confirm that, as already mentioned, gmail still works - you just need to enable 2FA and use an app password.

landcraft avatar Oct 08 '22 21:10 landcraft