Configure email server on AWS EC2 with SmarterMail

amazon ec2amazon-web-servicesemail-server

I'm trying to move an email server we have using SmarterMail to AWS.
I've provisioned a new EC2 instance using W2016, installed the software and assigned a new Elastic IP.
I've opened ports for what I think it's required as in:

enter image description here

But still don't receive any emails there. Any ideas on what I might be missing?


I've just got this answer from Amazon after submitting the form here
https://aws.amazon.com/forms/ec2-email-limit-rdns-request?catalog=true&isauthcode=true

To assist, we have checked and confirmed that there are no email
sending limitations on your account. Additionally, we also tried to
configure the rDNS entry for disgrafic.es as 52.28.13.199, however
this attempt failed.

The mapping for this reverse DNS entry is failing because the PTR
record doesn't match the A record for that domain. We currently
require the forward A record to match the PTR record for all reverse
DNS entries.

You can either provide us with an alternate hostname, or configure the
A record for this domain to match the desired PTR record on your side.

Looks quite strange to me this thing. If so that basically means I can't have a server for the web (with the @ and www domains) and a server for the email.
Or am I missing something here?

Best Answer

Did you define an A record for your Amazon Elastic IP, for example mail.mydomain.com? This is used to set up a Reverse DNS on your web server, so that other SMTP servers know that you’re not a spam relay.

Then add an MX record to the address you just defined, for example mail.mydomain.com. Now each SMTP server sending mail to mydomain.com will contact mail.domain.com, which in turn points to your EC2 instance.

Also, keep in mind AWS limits email sent from EC2 by default. You need to have them remove that limit: https://aws.amazon.com/ec2/faqs/#Are_there_any_limitations_in_sending_email_from_EC2_instances

Similarly, contact AWS to let them know what Elastic IP Addresses you are going to use for your mail servers so that they can have them White-listed with SpamHaus and others.

Related Topic