从没有弹性 ip 的 EC2 向 AWS SES 发送电子邮件
Sending emails to AWS SES from EC2 with no elastic ip
我在 EC2 的 Python Flask 上有一个小应用程序 运行。客户一直抱怨收不到系统邮件。我在 EC2 上平衡了生产应用程序负载。我刚刚注意到,一旦每台服务器都拥有弹性 IP,电子邮件的可靠性似乎就会提高。因为我有一个负载均衡器,所以我通常不会将 IP 分配给生产机器,只将一个弹性 IP 分配给测试机器,并且只将 IP 地址分配给生产机器,以便在我不需要测试时不收取额外费用环境。
我是否需要每个服务器都需要一个弹性 IP,每个服务器都在需要时与电子邮件服务器 (SES) 通信?
注意:SES 在我的 AWS 区域不可用。
我猜测您正在使用 sendmail
发送电子邮件,对吗?
根据 Amazon SES Docs:
(Optional) If you are sending email through Amazon SES from an Amazon EC2 instance, you may need to assign an Elastic IP Address to your Amazon EC2 instance for the receiving ISP to accept your email. For more information see Amazon EC2 Elastic IP Addresses.)
我建议离开 sendmail
并使用 Boto 与 SES 集成或通过 SMTP 从您的 Python 应用程序向亚马逊提交您的电子邮件。
更新
Michael - sqlbot 的评论让我想进一步调查,这是我的发现。
我记得学习过电子邮件的反向 DNS 查找,并发现了以下内容:
Amazon now has a new email policy in which outbound SMTP traffic is blocked (beyond miniscule usage). In order to be able to send email directly from EC2 you also need to provision an Elastic IP address for your instance. Amazon will work to keep that Elastic IP of of the common anti-spam lists.
以及
Amazon has announced a new private beta where they will set PTR records for your Elastic IP address.
取自Sending Email from EC2。本文解释了从 EC2 实例传送电子邮件的所有细节及其问题。尽管它很旧,但我相信反向查找现在比以往任何时候都更适用于打击垃圾邮件。
我在 EC2 的 Python Flask 上有一个小应用程序 运行。客户一直抱怨收不到系统邮件。我在 EC2 上平衡了生产应用程序负载。我刚刚注意到,一旦每台服务器都拥有弹性 IP,电子邮件的可靠性似乎就会提高。因为我有一个负载均衡器,所以我通常不会将 IP 分配给生产机器,只将一个弹性 IP 分配给测试机器,并且只将 IP 地址分配给生产机器,以便在我不需要测试时不收取额外费用环境。
我是否需要每个服务器都需要一个弹性 IP,每个服务器都在需要时与电子邮件服务器 (SES) 通信?
注意:SES 在我的 AWS 区域不可用。
我猜测您正在使用 sendmail
发送电子邮件,对吗?
根据 Amazon SES Docs:
(Optional) If you are sending email through Amazon SES from an Amazon EC2 instance, you may need to assign an Elastic IP Address to your Amazon EC2 instance for the receiving ISP to accept your email. For more information see Amazon EC2 Elastic IP Addresses.)
我建议离开 sendmail
并使用 Boto 与 SES 集成或通过 SMTP 从您的 Python 应用程序向亚马逊提交您的电子邮件。
更新
Michael - sqlbot 的评论让我想进一步调查,这是我的发现。
我记得学习过电子邮件的反向 DNS 查找,并发现了以下内容:
Amazon now has a new email policy in which outbound SMTP traffic is blocked (beyond miniscule usage). In order to be able to send email directly from EC2 you also need to provision an Elastic IP address for your instance. Amazon will work to keep that Elastic IP of of the common anti-spam lists.
以及
Amazon has announced a new private beta where they will set PTR records for your Elastic IP address.
取自Sending Email from EC2。本文解释了从 EC2 实例传送电子邮件的所有细节及其问题。尽管它很旧,但我相信反向查找现在比以往任何时候都更适用于打击垃圾邮件。