I have a web app in AWS EC2 built on开发者_开发百科 Ruby on Rails and I'm using Devise; when I try to send emails to Gmail it works, but when I try to send emails to Hotmail or Yahoo it fails...
What could it be? Is there a way to make it work without using AWS SES?
Thanks in advance
Most EC2 IP addresses are blacklisted on a lot of email services. You'll want to use something like SES, Sendgrid, or Postmark.
As Michael Fariley explained, the IP addresses are blacklisted. The reason is that its against the terms of use of AWS EC2, so most blacklists will catch a reverse dns that has Amazon EC2 within it.
However, Amazon allows you to change the reverse dns, you just need to ask. You can request it by going to https://aws-portal.amazon.com/gp/aws/html-forms-controller/contactus/ec2-email-limit-rdns-request . Make sure that you put the reverse dns in your own dns, so the reversedns address matches the IP of the Elastic IP associated with your server.
i.e. - elastic IP = 1.1.1.1, reverse dns => revdns.mydomain.com = 1.1.1.1
Once your reverse dns has been changed, and you don't abuse it (by spamming, etc) you should be good to go, make sure to check the IP of your instance before and after to see the blacklist has been lifted.
精彩评论