Skip to content

Questions about outbound SMTP, IPv4 allocation and BYOIP on AWS (production mail relay)

0

Preparing a mail‑relay on AWS. Short PoC (thousands/day); production MVP in October (millions/day).

Questions:

  1. Which outbound SMTP ports are blocked/restricted by default? Specifically TCP 25, 587, 465.
  2. Can the port‑25 restriction be removed project‑wide with a single request? How to request this without paid support (exact public link/form)?
  3. Fastest way to get N static external IPv4 addresses for testing/production (console/API link); default quota and how to increase it?
  4. Can AWS allocate a contiguous /28 or /24, or is BYOIP required for dedicated blocks? Typical timeline for /28 and /24 (or BYOIP)?
  5. Does AWS support BYOIP? If yes — required documents (LOA/RIR proof) and expected verification/announcement time?
  6. What information is required to approve port‑25 removal or larger IPv4 allocations? (e.g., PTR, SPF/DKIM, abuse contact, expected send volumes)
  7. Are there documented sending or rate limits that could trigger throttling/blocks? What triggers automated actions?
  8. How are abuse/complaint incidents handled and typical time to investigate/unblock IPs?
  9. Any costs/fees for port‑25 removal, static IP reservation, or BYOIP? Any limits on number of IPv4 addresses?

Thanks everyone who share some information related that questions. I’m not feeling confident with AWS and will be appreciate for any support )

Thanks, Vladyslav

2 Answers
1
Accepted Answer

Wanted to give a human answer with direct links as well, will answer as much as I can.

  1. Which outbound SMTP ports are blocked/restricted by default? Specifically TCP 25, 587, 465.
    

Per documentation here , AWS does block port 25, but there are no restrictions on 587 or 465. The documentation I included refers to the AWS Simple Email Service, but some points here

  1. Can the port‑25 restriction be removed project‑wide with a single request? How to request this without paid support (exact public link/form)?
    

Use this form included in the documentation above - you'll need to be logged into your account for this link to work, but it'll take you to the request form. The more detail you can provide around your use case and any measures you'll take to prevent spam and maintain the reputation of the associated IP address, the better.

  1. Fastest way to get N static external IPv4 addresses for testing/production (console/API link); default quota and how to increase it?
    

If static public IPs are called Elastic IP addresses in the context of AWS. The default quota is five Elastic IP addresses per this documentation. This link will take you to the quota request form in your AWS console.

  1. Can AWS allocate a contiguous /28 or /24, or is BYOIP required for dedicated blocks? Typical timeline for /28 and /24 (or BYOIP)?
    

Elastic IPs allocated to you from AWS's pool of public addresses are chosen at random - they won't be contiguous, so if the addresses need to be contiguous, BYOIP is the preferred method. See the following question for resources.

  1. Does AWS support BYOIP? If yes — required documents (LOA/RIR proof) and expected verification/announcement time?
    

AWS does support BYOIP - see the prerequisites and documents required here.

  1. What information is required to approve port‑25 removal or larger IPv4 allocations? (e.g., PTR, SPF/DKIM, abuse contact, expected send volumes)
    

See question 2 - The more detail you can provide around your use case and any measures you'll take to prevent spam and maintain the reputation of the associated IP address, the better..

  1. Are there documented sending or rate limits that could trigger throttling/blocks? What triggers automated actions?
    

I know that there are sending limits associated with the AWS SES service, but I'm not sure if they still apply to SMTP mail relay solutions hosted on EC2.

  1. Any costs/fees for port‑25 removal, static IP reservation, or BYOIP? Any limits on number of IPv4 addresses?
    

No costs for removal of port 25 restrictions. The VPC Pricing Page specifies charges associated with Elastic IPs - see the "Public IPv4 Address" tab of this page. The AI-generated answer appears to be incorrect - there's a charge for Elastic IPs in your account whether they're in-use or idle. This same tab also specifies that public IP addresses allocated through BYOIP have no charges associated. You're limited to five BYOIP addresses per this documentation, but you can request an increase via support ticket.

AWS

answered a year ago

AWS
EXPERT

reviewed a year ago

  • Marty, Thanks for information much. I have one more question that needed clarification.

    • You mentioned that for different topics we are needed to communicate with support. Does any of support communication requires support subscription or all of that is available on regular basis or with (basic support subscription)?

    Thanks in advance

1

I'll address your questions about setting up a mail relay on AWS:

  1. By default, AWS blocks outbound traffic on port 25 (SMTP) for EC2 instances and Lambda functions to prevent potential spam. Ports 587 (TLS) and 465 (SSL) are generally not restricted and can be used as alternatives.

  2. Port 25 restrictions are typically lifted on a per-instance basis, not project-wide. You need to submit a request to AWS Support using the "Request to remove email sending limitations" form, explaining your legitimate use case and how you'll prevent spam/abuse. Include your instance ID in the request. The approval process can take up to 48 hours.

  3. For static IPv4 addresses, you can use Elastic IP addresses which can be allocated through the EC2 console or API. Each AWS account has a default quota of Elastic IPs, but you can request an increase through the AWS Support Center.

  4. AWS doesn't typically allocate contiguous IP blocks like /28 or /24 through standard Elastic IP allocation. For contiguous blocks, you would need to use the Bring Your Own IP (BYOIP) feature.

  5. Yes, AWS supports BYOIP. You can bring your own IP address ranges to AWS. This requires proper documentation including proof of IP ownership and Letter of Authorization (LOA). The verification and announcement process timeline varies based on your specific situation.

  6. For port 25 removal approval, AWS typically requires details about your email sending purposes, how you'll prevent spam/abuse, and your instance ID. For larger IP allocations, you'll need to justify your business need for the additional IPs.

  7. AWS does have sending limits and rate controls to prevent abuse, though specific thresholds aren't always publicly documented. Suspicious sending patterns, high bounce rates, or complaint rates can trigger automated actions.

  8. Abuse and complaint handling processes depend on the specific situation. AWS takes email abuse seriously, and investigation times vary based on the complexity of the issue.

  9. There are no specific fees for port 25 restriction removal. Standard Elastic IPs are free when in use with running instances but incur charges when not associated with running instances. BYOIP has its own pricing structure.

For high-volume email sending (millions per day), you should also consider using Amazon Simple Email Service (SES) which is designed specifically for sending emails from AWS resources and handles deliverability and reputation management.
Sources
SMTP Limitation | AWS re:Post
SMTP issue, not able to send out Email through the port | AWS re:Post
Set up dedicated IP address. | AWS re:Post
how to open port 25 in cloudshell | AWS re:Post
The number of BYOIP CIDRs for this account has reached the maximum allowed limit. | AWS re:Post

answered 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.