gutmensch / docker-dmarc-report

229 stars 26 forks source link

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

Open sepen opened 2 years ago

sepen commented 2 years ago

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 this-is-my-email-account@gmail.com [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)

ptman commented 2 years ago

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

gene1wood commented 2 years ago

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

landcraft commented 2 years ago

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

gene1wood commented 2 years ago

@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

landcraft commented 2 years ago

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

gene1wood commented 2 years ago

@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?

landcraft commented 2 years ago

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 commented 1 year ago

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