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.

こんにちは、私も同じ問題に直面しています。上記の診断を実行したところ、以下のエラーが表示されました:

少し混乱しているのですが、これは Gmail の設定に関連するものか、それとも当社のサーバー側の問題でしょうか?

最新バージョンへの更新を必ず行ってください。このバグは先週修正されました。

@gerhard 現在 2.4.0.beta4 を実行中ですが、管理者によるとこれが最新バージョンとのことです。他に更新はありませんか?

/admin/upgrade にアクセスして最新バージョンに更新してください。

そのページにはすべて最新と表示されているので、何か見落としているのか分かりません。

その URL は手動で入力する必要があります。管理ページからアクセスしないでください。毎日複数の新しいコミットが追加されているため、コミットが存在しないことはまずありません。

それが私のやっていることだとお約束します :sweat_smile:

絶対的な最新バージョンを取得させる別の方法はありますか?

いいえ、それが最新バージョンです。正常に動作するはずです…

あ、あなたの投稿を再読しました。確かに、このトピックの指示はおそらく古くなっています。Discourse でも投票に関連する問題が発生していますか?もしそうなら、/logs にエラーが表示されているはずです。

よっと、ほっと一息!

ログにエラーはありません。ただ結果が出てきません。正常に動いていたのに、突然止まってしまいました。

私も同じ問題を見つけました。どのように修正すればよいですか?

POP3 の認証情報(POP3 メールボックスを確認するためのユーザー名とパスワード)を確認しましたか?それらはもう機能していないようです。