跳至内容

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

已提问 1 年前512 查看次数
2 回答
4
已接受的回答

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.
专家
已回答 1 年前
AWS
专家
已审核 1 年前
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

已回答 1 年前
专家
已审核 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。