Gmail POP3 authentication failed β€” switch to application password

After updating, my POP3 will not authenticate, nothing has changed except updating to latest. I logged in to gmail in a browser with the same credentials no problem. Here is the error in the logs:

/usr/local/lib/ruby/2.5.0/net/pop.rb:1006:in `check_response_auth'
/usr/local/lib/ruby/2.5.0/net/pop.rb:905:in `auth'
/usr/local/lib/ruby/2.5.0/net/pop.rb:567:in `do_start'
/usr/local/lib/ruby/2.5.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:137:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.6/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:127:in `block in perform'
/var/www/discourse/app/jobs/base.rb:123:in `each'
/var/www/discourse/app/jobs/base.rb:123:in `perform'
/var/www/discourse/app/jobs/base.rb:185:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.9.1/lib/mini_scheduler/manager.rb:82:in `process_queue'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.9.1/lib/mini_scheduler/manager.rb:30:in `block in initialize'

Edit: I tried testing POP3 via Test your SSL POP3 Mail Server - Wormly and got this error:

S:-ERR [AUTH] Web login required: https://support.google.com/mail/answer/78754
ERROR: Login failed -ERR [AUTH] Web login required: https://support.google.com/mail/answer/78754
POP3 test failed.

But, I have logged in a browser. So I guess it’s not a discourse issue, but I would appreciate any ideas. I tried turning on less secure apps

2 Likes

Same issue. It started this morning on my one week-old Discourse version, so it’s not a change in Discourse, but something that Google did.

Like @davidkingham I have " Less secure app access" enabled and I can log in to Gmail via browser with existing credentials.

2 Likes

Maybe try using Application Password instead of regular password?

5 Likes

That worked, @itsbhanusharma - thanks.

In case this is something others encounter, to switch to an application password see:

https://support.google.com/accounts/answer/185833?hl=en

4 Likes

Gmail is trying to be more secure.
Unless you have specific reasons to poll gmail, maybe consider running the mail-reciever container to handle incoming emails.

3 Likes

This worked for me as well, FYI for others when creating the key; under the app dropdown, select β€˜other’, not mail. Thank you @itsbhanusharma

5 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.