POP3 polling stopped working

Hi all, I had been using the email-in and reply-by-email features and they were working well for a few months until they suddenly stopped working.

I suspected that the polling period was too frequent and google may have blocked my install.
I reset the email settings, created a new google apps email and double checked the “allow less-secure apps settings” etc but to no avail.

My problem is now that when I re-click pop3 polling enabled it gives an error “POP3 authentication failed. Please verify your pop3 credentials.” even though the credentials are correct and SSL is enabled.

Any ideas on what may be the problem? I tested pop3 polling from my laptop(not the discourse server yet) and it accepted the polling without any problem which makes me suspect that the settings I place in the admin settings section are not being applied properly. Any support would be much appreciated.

Here’s how I would debug it: SSH into your server and then

cd /var/discourse
./launcher enter app
rails c
require "net/pop"
pop3 = Net::POP3.new("pop.gmail.com", 995)
pop3.enable_ssl
pop3.auth_only("username", "password")

And check what error you get from the last line.

root@localhost-app:/# rails c
You are running an old version of bundler, please upgrade bundler ASAP, if you are using Discourse docker, rebuild your container.
[1] pry(main)> require "net/pop"
=> false
[2] pry(main)> require "net/pop"
=> false
[3] pry(main)> pop3 = Net::POP3.new("pop.gmail.com", 995)
=> #<Net::POP3 pop.gmail.com:995 open=false>
[4] pry(main)> pop3.enable_ssl
=> 995
[5] pry(main)> pop3.auth_only("replies@southsudanngoforum.org", "*******")

Net::POPAuthenticationError: -ERR [AUTH] Username and password not accepted.
from /usr/local/lib/ruby/2.0.0/net/pop.rb:1005:in `check_response_auth'
[6] pry(main)> 

In the admin settings page all POP3 related boxes are selected except pop3 polling enabled as it gives an error.

Could the problem be associated with the old version of bundler mentioned. Should I run ./launcher rebuild app?

The bundle issue is not related. The error is coming from the username/password. Can you log in with these on the webmail? Make sure that Google hasn’t blocked a connection coming from another location (ie. where your server is hosted).

Login to webmail using these credentials works fine.
It may be possible that for some reason google has begun blocked polling from my discourse server’s IP address.
Is there a way to get google to remove this block? Allow less secure apps is already selected as are the unblocking steps shown in other threads here.

I’m not sure. Did you enable 2-step authentication by any chances? Or application-specific password?

@brianmcdonald, I realize you may not have the same setup, but I too had a situation when the setup looks good, but on re-click “pop3 polling enabled” it gives the “POP3 authentication failed” error.

I have a https only site setup with Google Authentication working on a different machine a few days ago. Today, on a different server with same setup, something seems to have changed on the Google side. When I re-click “pop3 polling enabled” it gives the error "POP3 authentication failed. In the inbox of the POP3 account I was using, I received an email from Google containing this message:

I clicked the “Learn More” Hyperlink and it took me to a place that lets me configure the POP account to use “Access for less secure apps”. After I turned this radio button to “on”. Authentication worked.

Hola, también estoy teniendo este problema. Realicé los diagnósticos recomendados anteriormente y obtuve este error:

Estoy un poco perdido: ¿tiene algo que ver con la configuración de Gmail o con algo en nuestro servidor?

Por favor, asegúrate de actualizar a la última versión. Este error se corrigió la semana pasada.

@gerhard actualmente estoy ejecutando la versión 2.4.0.beta4, que según el administrador es la más reciente. ¿Hay otra actualización disponible?

Ve a /admin/upgrade para actualizar a la última versión.

Esa página dice que ya tengo todo actualizado, así que no sé si me estoy perdiendo algo.

Tienes que ingresar esa URL manualmente, no desde la página de administración. Hay varios commits nuevos cada día, por lo que es poco probable que no haya ninguno.

Prometo que eso es lo que estoy haciendo :sweat_smile:

¿Hay otra forma de obligarlo a obtener lo más reciente?

No, esa es la última versión. Debería estar funcionando…

Ah, acabo de releer tu mensaje. Sí, esas instrucciones en este tema probablemente estén desactualizadas. ¿Estás experimentando problemas de sondeo en Discourse también? Si es así, deberías ver errores en /logs

¡Vaya, al fin!

No hay errores en los registros, simplemente no hay resultados. Funcionaba bien y de repente dejó de hacerlo.

Yo también encontré el mismo problema. ¿Cómo lo soluciono?

¿Has intentado verificar tus credenciales POP3 (el nombre de usuario y la contraseña para revisar el buzón POP3)? Parece que ya no funcionan.