Articles
Setting up your own email server with hMailServer
Configuring your DNS records
Before we install your mail server it is a good idea to ensure you DNS records are correctly setup for email. DNS is vital to the operation of the Internet, and in a nutshell what it does is create a link between a human friendly domain name (e.g. example.com) and an IP addresses. When a user enters a web address into their browser, that domain is then resolved to an IP address which is then used to communicate. When hosting your own email server there are three very important types of DNS records to consider, and these are A, PTR and MX records.
An A record, or Address record is one of the most common types of DNS records you'll come across. Its purpose is to simply create a link between an IP address and a domain name. For example for the domain name of example.com you would have an A record that contained the IP address of the server that was hosting example.com. With A records the domain must be unique, but the IP address does not. This means you can have as many domain names pointing to the same IP address as you want, and is used extensively these days for both Email and Web hosting. In regards to your Email environment, it is best to create a separate A record that identifies your email server. This can be something like mail.example.com or similar. You'll need to create an A record for each server you plan on using as a mail server.
A PTR, or Pointer Record is unique in DNS in that you can only have one PTR address per IP address. This is because the function of a PTR record is to resolve a human friendly name from an IP address, instead of the other way around. Because you are resolving a domain name from an IP address, there can only be one authoritative record. If possible it is best to set your PTR record of the IP your email will be hosted from to be the same as your A record (e.g. mail.example.com), and you may need to contact your hosting company to do this for you.
Finally we have the MX, or Mail eXchange record which is used by other mail servers to direct email to the right place. Unlike an A or PTR record an MX record is not associated with an IP address in anyway, but instead contains the human friendly name of the A record you wish to use for your mail server. This might sound a little redundant as all it is doing is pointing from one record to another, but MX records also have one other important function. This is to establish the pecking order of your email servers by using a preference field in which you can enter a numerical value (the lower the number, the more important that server is) to define in what order other email servers should contact your email servers. If the email server with the highest preference (lowest number in preference field) is not contactable, then incoming email servers will simply use the server identified by the MX record with the next highest preference.
- Add new comment
- 574750 reads

Comments
No SMTP connection from outside
Assuming that you have correctly setup your DNS records and hMail is configured to accept SMTP connections from outside your local network, then there are only really 2 things that will cause this;
1. Your ISP is blocking incoming TCP connections on port 25. This is quite common for home grade internet connections.
2. Your Router/Firewall is not configured to allow incoming connections on port 25 to connect to your hMail server.
----------------
Dominic Ryan
6 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
hMailServer SMTP - never sends
I have a VPS setup with GoDaddy where none of my ports are being blocked. Per the documentation, I don't need to use SMTP relay b/c the installation of hMailServer is doing all the sending/receiving of email. My problem is that sending emails never succeeds.
I have a MS Outlook account setup (pop/smtp) on my home computer and I'm able to send/recieve w/out any errors at all. Email does go to my Inbox and when I reply, I go log into my hMailServer via RDP and can see that the email was received and it's trying to send out ... but it never does.
things i've tried: 1) remove autoban settings 2) adding my hamilserver to the SMTP relay however that then gives the error '..since this would mean connecting to myself' 3) if I leave the SMTP relay blank, it tries to connect to the hmailserver.com which never works.
Monitor your log
Configuring your outgoing mail should (in theory) be easier than your incoming mail. For a start the auto-ban feature only applies to incoming mail, you are correct in SMTP relay blank, and as long as the email you are trying to send is addressed to an email address at hmailserver.com then it is also correct that it tries to connect to it.
Easiest way to test for sure though is to do the following from your servers CMD window:
nslookup -type=mx
Take not of the mail exchanger record here, then type;
telnet 25
What you should get is something like a status code of 220 followed by the server hostname. If you get any sort of message regarding a failed connection, then I'd say you have a DNS resolution issue (providing you are 100% sure port 25 is open).
----------------
Dominic Ryan
6 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Hmail Client Access
I can see the email hit my Barracuda Spam Device and then I can see in Status, Status Tab that an email came to SMTP and then Processed messages. How do I connect outlook 2010 to the hmail server. I'm using mail.rtoemp.com. I have the pop set to @ host and the smtp set to the @ host on godaddy.