How do I remove the restriction on port 25 from my EC2 instance?
Last updated: 2020-10-19
I'm having trouble sending email over port 25 of my Amazon Elastic Compute Cloud (Amazon EC2) instance, or I'm getting frequent timeout errors. How do I remove the port 25 restriction on my EC2 instance?
Amazon EC2 restricts outbound traffic on port 25 of all EC2 instances by default. You can request the removal of this restriction.
- Sign in with your AWS account, and then open the Request to remove email sending limitations form.
- Enter your email address so that AWS Support can contact you with updates about your request.
- Provide the following information in the Use case description field:
A clear and detailed use case for sending email from your EC2 instance.
A statement outlining your plan for assuring that your account isn't implicated in sending unwanted emails.
The Region for your EC2 instance.
- (Optional) Provide the AWS owned Elastic IP addresses that you use to send outbound emails as well as any reverse DNS (rDNS) records that AWS needs to associate with the Elastic IP addresses. If you use an EC2 instance as a mail server, it's a best practice to set up an rDNS record to help prevent the flagging of outbound emails as spam.
Make sure to link the rDNS record to your Elastic IP address using a DNS A record. For example, if mail.example.com is the rDNA record that you're setting, make sure that you create an A record for mail.example.com that points to the Elastic IP address.
Note: Creating a DNS A record and providing the Elastic IP addresses are optional for Amazon Simple Email Service (Amazon SES) users.
- Choose Submit.
You'll receive an email with the Request ID after submitting the request form. It might take up to 48 hours to process your request. If your request is approved, you'll receive another email to notify you of the removal of the port 25 restriction on your EC2 instance. If you don't receive an update within 48 hours after submitting the request, reply to the initial email that you received.