Amazon AWS port 25 blocked issue

History: I had a server setup for email on AWS. It had run fine for months, but several days go it was unreachable and it was reported to me that users couldn’t access their email. I tried to RDP to the server but it was not reachable. I tried rebooting the server from the AWS console but still no luck being able to RDP.  I used the AWS console to create an AMI from the existing instance as a backup (just incase).

I deleted the existing instance. Cranked up a new instance based on a month old AMI. I could now RDP but port 25 was not open and mail wouldn’t work. The firewall settings should still allow everything to flow. The AWS security group was the same group as before so it should allow email.

I contacted AWS by submitting the form to allow email to flow without limits. They responded within 12 hours and told me they had removed the throttling. Still, I couldn’t access the mail server on port 25, 110,143, 587.

Oh yeah, port 80 traffic has is working fine all this time since the restore. Just not mail ports.

I used to verify the server isn’t allowing port traffic as well as showing errors for smtp being blocked.

Finally after lots of fiddling (useless) of firewall and security group settings that were all correct in the first place, I went into my mail server software UI and looked around in the admin settings. There is a page for IP’s and I noted that internal IP listed there was 10.0.0.x , but that is different from the machines current internal IP. My restore resulted in the internal IP being changed to 10.0.0.y.  I added a new IP to the list to match the new machine’s IP, and email is instantly working. This was a miserable 48 hour experience because I only had an hour here, and hour there to look at it.

After finding this I decided to try restoring a machine based on the AMI I created at the beginning of this article, and going into the email server software UI, and making those changes. I was able to get that server to work fine by setting the proper internal IP in the email software admin UI. I’m back to a working mail sever that is as current as possible.

I hope this helps someone or me if I have ever restore a mail server on Amazon again. It was not Amazon’s fault at all but I spent many hours believing that it must be Amazon blocking port 25 and other mail ports.