SMTP Hanging on AWS

Ubuntu VPS on AWS
Linux 6.5.0-1014-aws on x86_64 REQUIRED
Virtualmin version 7.9.0

I have installed virtualimin on an AWS server wanting to use it a s a MAil Server (For sending and receiving mail.)
I was able to get it to receive mail, but currently, I can’t send mail. it just hangs in the mail log.

I am very new to this, and have looked for other forum posts, closest that I saw, was someone saying I should use a relay, however, I want this server to the main host. I Have dedicated mail hosting, but it is giving me issues with region locks and with reliability, which is why I want to move to selfhosted.

I kind of remember having to open port 25 in both directions on the AWS firewall.

Last I checked, you don’t have port 25 on EC2. You need to use a mail relay service.

Amazon’s SES service is but one of many, but it’s cheaper than most, so maybe the best option since you’re already in the Amazon ecosystem.


I’m still very new to this, I I go the SES route, Will the email be able to send correctly (does this affect rdns, do I need to worry about smtp not authenticating correctly using SES, Will SES run from the VPS or a separate location?) [I will first try to send an unlock request to Amazon for port 25, 465 and 587] to see if I cant get it running on that server directly. Thank you very much for your reply and time. I will update here If I was successful in getting Amazon to unlock the ports or how I proceeded.

I have another question, if I make The IP Static on AWS, is there any place in Webmin/Virtualmin where I need to update or change the IP? The IP in webmin is currently DHCP assigned. (I have my DNS Record with the registrant , and will update those, I am just not sure if I need to change anything in webmin/Virtualmin)

Virtualmin normal detect a change of IP. I never tried using AWS, but if I change instances on Vultr with a different IP Virtualmin will request a update to the new IP.

Make a new topic for new questions, please.

Responding here, incase anyone else has the problem:

No, you don’t need SES or a relay to send on AWS, you have to request to unlock the port (This is not applicable if you plan to do marketing mailers, for thoseyou will have to use ses or a relay.)

Hosting on AWS:
Step 1: Get an Elastic IP for your server.
Step 2: Reboot server and install webmin and virtualmin(If already installed update DNS records and update DNS Settings (Allowed sender IPv4 to match your new IP)[DNS Settings-> DNS Options])
Step 3 Request port 25 Unlock on your AWS Server:

You will now be able to send and receive provided your DNS records are good.

1 Like

I use the ‘LightSail’. It gives me access to the firewall to do it myself.

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.