本文介绍了在pvented $ P $可疑迹象(Heroku的,亚马逊的AWS,Gmail的SMTP)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我偶尔会从谷歌接收电子邮件(<$ C C $> [email protected] ),类似于以下内容:

I occasionally receive emails from Google ([email protected]), similar to the following:

Subject: Suspicious sign in prevented

Someone recently tried to use an application to sign in to your Google
Account, [email protected]. We prevented the sign-in attempt in case
this was a hijacker trying to access your account. Please review the
details of the sign-in attempt:

Monday, November 19, 2012 8:40:55 PM GMT
IP Address: 184.72.161.49 (amazonaws.com)
Location: Dixmoor, IL, USA

If you do not recognize this sign-in attempt, someone else might be trying
to access your account. You should sign in to your account and reset your
password immediately. Find out how at
http://support.google.com/accounts?p=reset_pw

If this was you, and you want to give this application access to your
account, complete the troubleshooting steps listed at
http://support.google.com/mail?p=client_login

Sincerely,
The Google Accounts Team


© 2012 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043

You have received this mandatory email service announcement to update you
about important changes to your Google product or account.

事实上,这是我的,因为我有上运行的应用程序的的Heroku (所以为什么IP地址为 amazonaws.com ),我直接发送电子邮件,通过Gmail SMTP我的应用程序(我不认为它应该的问题,但具体是,我使用的是 gmail_smtp插件更新的Rails的3.2 )。

Indeed, this was me, as I have an app running on Heroku (hence why the IP address is from amazonaws.com), and I send email directly from my app via Gmail SMTP (I don't think it should matter, but specifically, I'm using the gmail_smtp plugin which I updated for Rails 3.2).

有没有办法避免这种警告,还是有办法来白名单已知的IP地址?

Is there a way to avoid this warning, or a way to whitelist known IPs?

推荐答案

简答

  1. 在Web浏览器(可能是铬/隐身),登录到您的Gmail帐户(一个通过它你想从您的应用程序发送电子邮件)。

  1. In a web browser (perhaps Chrome/Incognito), log into your Gmail account (the one via which you're trying to send email from your app).

在另一个浏览器选项卡,打开https://accounts.google.com/DisplayUnlockCaptcha - 然后按照步骤

In another browser tab, open https://accounts.google.com/DisplayUnlockCaptcha -- and follow the steps.

长的答案

最后我登录到我的Gmail帐户(提及 ________ @ gmail.com 在上面的问题#1),看到以下警告:

I ended up logging into my Gmail account (mentioned as [email protected] in the Stackoverflow question above) and saw the following warning:

[注:我在事后拼凑这个答案在一起]点击链接的是不是你我是pretty的确认的我采取包含以下内容,但它下面有一个消息,按钮有关添加其他应用程序列表中的页面:

[Note: I'm piecing this Answer together after the fact.] Clicking the link Was it you?, I'm pretty sure I was taken to a page that contained the following, though below it there was a message and button about adding another application to the list:

[此外,我是pretty的确认的...]点击页面上的按钮,给我带来了https://accounts.google.com/DisplayUnlockCaptcha - 这看起来是这样的:

[Again, I'm pretty sure...] Clicking the button on that page brought me to https://accounts.google.com/DisplayUnlockCaptcha -- which looks like this:

点击继续把我带到了另一个页面:

Clicking Continue brought me to another page:

在这一点上我刚刚去了我的应用程序,并使其发送电子邮件。

At that point I just went to my app, and made it send an email.

注:我的应用程序一般现场测试电子邮件,我在视图触发#指数有两个按钮,发送 PUT 请求这些操作:触发#SEND_EMAIL 触发#raise_exception 。这使得管理员去 /触发器发送电子邮件引发异常的到如果生产系统上进行测试工作正常,只要能够发送电子邮件有关。通过在任何我的应用程序的电子邮件信息引发一个例外,我 exception_notification

Note: for general live-testing of email in my app, I have a view at triggers#index with two buttons that send PUT requests to these actions: triggers#send_email and triggers#raise_exception. This enables an admin to go to /triggers and send an email or raise an exception to test if the production system is working correctly as far as being able to send email is concerned. Raising an exception in any of my apps emails details to me via exception_notification.

这篇关于在pvented $ P $可疑迹象(Heroku的,亚马逊的AWS,Gmail的SMTP)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-25 19:28