The user meetya reports issues with Gmail polling in Discourse, despite correct credentials and security settings. The problem appears related to Google’s security system flagging the connection from a New York server (DigitalOcean) as suspicious, especially since the account is based in Slovenia. meetya resolves the issue by enabling 2-Step Verification and using an App Password in Discourse, which Google interprets as a legitimate login. supermathie explains that the error indicates a security alert, not authentication failure, and that enabling 2FA satisfies Google’s requirement. meetya confirms the solution works and notes that App Passwords are the recommended approach for apps like Discourse. itsbhanusharma suggests an alternative method for incoming mail, while pfaffman recommends moving Discourse to Amsterdam for better performance and reliability.
However, I’ve read somewhere that there might be some problems, because I am based in Slovenia, so our gmail account was created from Slovenia as well whereas our DigitalOcean servers are based in New York.
For example, when I try to log into this email account using a new browser, Gmail requires me to type in a code I receive over SMS message.
And ideas?
Note: and to state the obvious: log in credentials are correct - they were working just 5 days ago.
I’m posting the solution here just in case someone else has the same problem.
What actually helped was to switch 2-step verification ON, and create an App password and insert it in the Discourse POP3 password setting instead of my usual Gmail account password
Yes - that error from gmail is not an authentication failure. It’s asking you to login from a web browser because it think something fishy is going on with the account.
By turning on 2FA you’ve done what gmail was asking - you logged in via a browser.
yeah, but before enabling 2-step verification, logging into via web-browser didn’t help either. Probably because Google cannot make the connection between discourse trying to connect (with DO servers in New York) and me connection from a browser in Slovenia.
I am using Sparkpost to send emails. I created a dedicated basic gmail account only for receiving emails (reply via email) feature.
Everything is working now anyway. As far as I understood from the Gmail documentation, it is a recommended approach to give apps, such as Discourse, special App passwords, that you can generate inside your google account security settings, instead of your ‘human’ google password.