Can I Get the Port 25 Restriction Removed Without Using EC2 or Lightsail?


I have used AWS Simple Email Service for several years in my Ruby on Rails web applications. I want to do SMTP checking of email addresses entered on my contact form using a Ruby Gem Truemail. I contacted the gem developers because I had problems with port closed errors I was told that the gem requires that port 25 be open. I currently use another port to send emails from my websites.

I have searched the AWS documentation but I have only found these two link regarding the port removal. Both require that you submit a request to remove email sending limitations form.

I have never used EC2 or Lightsail. The only thing I can do in AWS SES is to increase the sending quote and the sending rate.

I sent an email to the billing department asking for estimates for using EC2 or Lightsail just in case I need to use one of themto remove the port 25 restriction. However I sincerely hope there is maybe some other way.

  • Could you expand on what you mean by "SMTP checking of email addresses"? Do you mean that you're connecting to the email server of an email address that has been entered to verify it?

  • The Truemail gem is checking the validity of domains and emails so I will assume that's what happening. I want to know that an email doesn't exist before I receive the Delivery Status Notification (Failure) email. I'm getting more and more of them these days. I have the correct code to do that kind of validation but I was told that I was getting port closed errors because port 25 was closed. I just added the links to the GitHub repository of the gem.

1 Answer

In this case; given that it's a third-party component that you don't have a lot of control over: You're going to need to run it on compute platform that supports it and also supports connecting to the Internet on TCP/25. That means you can use EC2 or Lightsail - both are virtual machine offerings from AWS. You might also find that you can run it in Docker; if so you might consider Fargate as an alternative which might be more cost effective - but it entirely depends on a bunch of factors including how long the component runs for; how often it runs; how much memory it requires; and so on.

profile pictureAWS
answered a year ago
  • Thanks so much for the explanation. I've read a little about Docker but have never used it. Truemail has a Docker image. I guess I can run it in EC2/Lightsail somehow. I have a AWS Discovery call this morning to discuss cost differences between the two. Truemail also offers an integration service that works with an AWS Lambda. If the EC2/Lightsail costs are higher I may use that service for SMTP validations.

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.

Guidelines for Answering Questions