I have been using hMailServer as my lab mail server for a while. It has worked pretty good but I have been using it as an internal only mail server. A reader (Alex) was curious about making it work for inbound and outbound email so not just a lab server.
This will show you how to make this work. However there is something that will haunt us so it is not perfect. But, first let’s make things work.
We assume that email flows inside the lab fine – if not see if this article helps. I also assume you have an MX record configured outside your lab that will enable external mail servers to find your mail server. I also assume you have a hole poked in your lab firewall to support that connection.
Inside to Outside
Access the hMailServer UI. You will need to change to Settings, Advanced, IP Ranges, and Inside.
On this screen you likely only have Local to Local configured. You will now need to configure Local to external as well – as seen above. Save to complete the changes.
Now, if you send email from inside your lab, to somewhere external – it will possibly not work. This is not hMailServer or your fault. It appears that sometimes it works, and sometimes it doesn’t. It depends on the config of the mail server that is delivering the email to your lab. More info below.
Outside to Inside
Access the hMailServer UI. You will need to change to Settings, Advanced, IP Ranges, and Internet.
You likely have only Local to Local, but now you need to make sure that External to local is enabled – as seen above. Save to complete the changes.
Now, if you send email from outside your lab, to your lab – and assuming you have MX record, firewall all right it will work.
If your mail isn’t sent successfully, you may in fact see an error like this one.
The reverse DNS is not set for my lab. And getting that done is complex it seems – my DNS provider and my ISP need to agree and converse. I will update this article as I learn more, and figure this out!
- 7/3/16 – I should have been more clear – you will get inbound mail from some domains and not from others. It depends on what sort of checks they do before they drop of the email on your server.
=== END ===