Skip to content

SMTP issue, not able to send out Email through the port

0

I am not allow to send out Email from my AWS resource by port 25? Any idea

2 Answers
4
Accepted Answer

By default, AWS blocks outbound traffic on port 25 (SMTP) for most EC2 instances and Lambda functions to prevent spam and abuse, you may consider:

  1. Use an Alternative Port Many email providers (like Amazon SES, SendGrid, or Mailgun) support ports like 587 or 465 for SMTP with TLS/SSL. Switching to one of these is often the easiest fix.
  2. Request Port 25 Unblocking If you have a legitimate use case (e.g., running your own mail server), you can submit a request to AWS to remove the restriction.
  3. Use Amazon SES or a Third-Party Relay Amazon Simple Email Service (SES) is designed for sending email from AWS resources and doesn’t require port 25. You can also configure your app to relay through a third-party SMTP provider on an open port.
EXPERT
answered a year ago
AWS
EXPERT
reviewed a year ago
2

By default, AWS blocks outbound traffic on port 25 (SMTP) for all EC2 instances and Lambda functions to prevent potential spam. This is a standard restriction across AWS environments.

To resolve this issue, you have several options:

  1. Request removal of the port 25 restriction:
  • Submit a request to AWS Support using the "Request to remove email sending limitations" form
  • Provide details about why you need port 25 opened and how you'll prevent spam/abuse
  • Include your instance ID in the request
  • The approval process can take up to 48 hours
  1. Use alternative ports that aren't restricted:
  • Port 587 (TLS)
  • Port 465 (SSL)
  • These ports are generally more secure and don't require special permission
  1. Use Amazon Simple Email Service (SES):
  • AWS SES is designed specifically for sending emails from AWS resources
  • It's a managed service that handles deliverability and reputation management
  1. Check your security configuration:
  • Ensure your security groups allow outbound traffic on your chosen SMTP port
  • Verify network ACLs permit the traffic
  • Check that your instance's operating system firewall isn't blocking the port

If you choose to use alternative ports or SES, you'll need to update your application's SMTP configuration accordingly.
Sources
Troubleshoot an email server on an EC2 Windows instance | AWS re:Post
SMTP Limitation | AWS re:Post
Not able to send mail from EC2 | AWS re:Post
Amazon SES SMTP issues - Amazon Simple Email Service

answered a year ago
EXPERT
reviewed a year ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.