Setting up your own email server with hMailServer

Categories:

There are a many email servers for Windows out there that range in price depending on functionality and the software vendor. However, it is not often you find an email server for Windows that is open source (free to use and modify via the GPL license), feature rich, stable and very well supported. There are some notable free offerings such as MailEnable Standard and Windows 2003 Server even comes with a basic POP3 email server, but it seems that they are always just crippled enough to make you want something a bit more. This is where hMailServer comes in as it offers just about everything you could want in an email server. SMTP with advanced routing abilities, POP3, IMAP4, distribution lists, powerful anti-spam tools, real time anti virus protection, PHP/COM based web administration, log file analysis, configurable server messages and rules, advanced performance options. The list goes on, and all this in a RFC compliant package with an easy to use GUI interface.

In this guide we'll cover the basics of what you need to do to configure your email environment properly using hMailServer 4.3.1 as your email server. This includes;

  • Configuring you DNS records
    • A (Address) record
    • PTR (Pointer Record) record
    • MX (Mail eXchange) record
    • Considerations for hosting from home
  • Installing hMailServer
    • Select installation path
    • Select installation type
    • Select built-in or external database
    • Select program group for start menu access
  • Configure hMailServer
    • Create domain
    • Create postmaster account
    • Create abuse alias for postmaster account
    • Set SMTP host name
    • Configure RFC compliance
    • Configure SMTP relay options to prevent open relay
  • Test your email environment
    • Test against dnsreport
    • Test for open relay

Comments

Brashquido's picture

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

dusza's picture

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.

Brashquido's picture

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

Anonymous's picture

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.