November 20, 2015

November 20, 2015 – 10:49 pm

After struggling for the last week or so, with inbound SMTP failing – I have decided to steer clear of default smtp port 25 service for my network.  ISP’s get in the middle of it, annoyingly, and cause issue. Helpful tools for toubleshooting were a port check tool, and the MX Toolbox.

While there are some great services out there to work around that, I initially selected GhettoSMTP.  They were pretty straightforward in terms of signup, and then its just a few MX record updates. However, I’m an impatient person and after waiting a few hours for the forwarding to be setup, and hearing nothing – I gave it a shot, but they rejected all forwarding.  So I gave up and chose to deal with it myself.  Here’s how :

  • Obtain a free Amazon Web Service account at http://aws.amazon.com
  • Launch a free AWS instance in Amazon’s cloud (pick a standard Ubuntu linux instance)
  • Save the local key pair created when launching/initiating the new AWS instance.  Use that to test server access
  • Obtain haproxy software (this is the reason for using a Debian based instance, it’s simple) “apt-get install haproxy”
  • Edit the haproxy config (/etc/haproxy/haproxy.cfg) to setup port forwarding on a TCP (non HTTP) service to bind to port 25 and route to the external address of my locally hosted service but on another port
  • In the AWS dashboard, add an access rule for port 25 inbound
  • Setup my own firewall such that it now allows incoming SMTP on a different non-standard port (which is what I setup as the destination port in the haproxy step above)
  • Modify my public DNS MX records to use the new AWS instance (by lengthy DNS name, instead of IP) as the highest priority value
  • … wait for flood of email to arrive

And voila!  inbound email again.  Lots of it.  Now I just need to keep an eye on the AWS usage, but the free instance (class “T2.Micro”) is free, so it’s low power, low duty.  It’s a partial virtual-cpu and low memory, and all its doing is the O/S basic service plus haproxy port forwarding function.  So load should be very low, so it should be good.

Sorry, comments for this entry are closed at this time.

WordPress Appliance - Powered by TurnKey Linux