Articles
Setting up your own email server with hMailServer
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
- Add new comment
- 574483 reads

Comments
All in the guide
Had a quick look at your DNS records for the co.cc domain and think you may need to look at that. For a start you have a hotmail server set as your MX record where it should be ponting to your own email server (have a look at page 2 of the guide regarding DNS record requirements).
I also did a service scan of the IP address associated with www.co.cc and unless this is IP is using NAT, then this is not even a Windows server and ports 25, 110 and 143 are not open.
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Unable to send email
Thanks for your response, I have checked my Hmailserver again and I got following results.
I. Checked using Diagnostics of HmailServer and it's passed.
Then .....
II. Telnet from a workstation in LAN of my office:
-------------------------------------------------
1. Checking Port 25 (SMTP):
220 Welcome to SMTP Server of PT. Universal Intersystem Perkasa
help
211 DATA HELO EHLO MAIL NOOP QUIT RCPT RSET SAML TURN VRFY
2. Checking port 110 (POP3):
+OK Welcome to POP Server of PT. Universal Intersystem Perkasa
help
+OK Normal POP3 commands allowed
quit
+OK POP3 server saying goodbye...
3. Checking port 143 (IMAP):
* OK Welcome to IMAP Server of PT. Universal Intersystem Perkasa
III. Then I tried nslookup to my MX record from my email server and i have following results:
--------------------------------------------------------------------------------------------
> set type=MX
> support.ptuip-mail.co.cc
Server: UnKnown
Address: 192.168.2.1
Non-authoritative answer:
support.ptuip-mail.co.cc MX preference = 0, mail exchanger = ptuip-mail.co.cc
co.cc nameserver = ns2.co.cc
co.cc nameserver = ns1.co.cc
co.cc nameserver = ns.co.cc
co.cc nameserver = ns3.co.cc
ptuip-mail.co.cc internet address = 124.153.15.29
ns.co.cc internet address = 114.207.246.170
ns1.co.cc internet address = 222.122.6.20
ns2.co.cc internet address = 222.122.6.21
ns3.co.cc internet address = 118.219.232.169
>
IV. Checking my MX record from internet
-----------------------------------------
1.MX Query from result from http://webtools.live2support.com/nt_mxrecords.php:
MX records for support.ptuip-mail.co.cc found.
Host Valid for this(ari@support.ptuip-mail.co.cc) Email Address..
Host Name Host IP Address
ptuip-mail.co.cc 124.153.15.29
2. Another MX Query from http://www.webmaster-toolkit.com/mx-record-lookup.shtml?email=root@support.ptuip-mail.co.cc
Found these mail servers for
0 ptuip-mail.co.cc
V. Trying to check port 25,110 and 143 from outside world (internet) using Telnet
-------------------------------------------------------
Welcome to Microsoft Telnet Client
Escape Character is 'CTRL+]'
Microsoft Telnet> open ptuip-mail.co.cc 25
Connecting To ptuip-mail.co.cc...Could not open connection to the host, on port
25: Connect failed
Microsoft Telnet> open ptuip-mail.co.cc 143
Connecting To ptuip-mail.co.cc...Could not open connection to the host, on port
143: Connect failed
Microsoft Telnet> open ptuip-mail.co.cc 110
Connecting To ptuip-mail.co.cc...
+OK Welcome to POP Server of PT. Universal Intersystem Perkasa
help
+OK Normal POP3 commands allowed
-ERR Invalid command in current state.
quit
+OK POP3 server saying goodbye...
Connection to host lost.
Press any key to continue...
I would like to ask :
1. From step V Is that correct that my ISP provider is blocked port 25 and 143??
2. Is it possible I use freware smtp relayer such as 1st SMTP Server 5.6 to overcome the problems of closed port 25 and 143 ??
Thanks for your time.
Ports being blocked
I tried to telnet to port 25, and was not able to make a connection. Unless your firewall hasn't been configured to allow requests through, then I'd say the next most likely thing is that your ISP has blocked your ports. If this is the case, then you'll need to contact them or just use their SMTP server as a smarthost.
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
I am not able to download mail from an external POP3 account
Greetings
I run a PostFix Mail server on a CentOS server. I host a number of different mail domains for different customers.
One of my customers needs access to an IMAP Mail server. While my server does this wonderfully, my client abuses it (they never delete ANY mail, not even spam... so my mail server's HD starts getting really full with all their mail).
So I want to give them their own IMAP mail server at their premises, which they can abuse to their heart's content. I have download hMailServer and I am busy running some tests.
So far, I am able to create their domain, create a user on the domain, connect Thunderbird (Outlook 2003 is a terrible IMAP client) to the hMailServer account via IMAP, send mail from the account and download mail from a gmail account (the hMailServer is able to log into gmail, download mail, delete it off the gmail servers and deliver it to the hMailServer Account).
But right now, it does not download mail from *MY* PostFix Mail server.
In the log file, I see these lines when I "force" it to download from the external POP3 account:
"DEBUG" 3732 "2009-10-12 16:15:21.748" "Creating session 148"
"TCPIP" 3732 "2009-10-12 16:15:21.748" "Connecting to mail.clan.co.za..."
"POP3D" 3016 148 "2009-10-12 16:15:21.764" "196.36.155.3" "RECEIVED: 220 cerberus.xperts.co.za ESMTP Postfix"
"POP3D" 3016 148 "2009-10-12 16:15:21.764" "196.36.155.3" "SENT: QUIT"
"POP3D" 3016 148 "2009-10-12 16:15:21.795" "196.36.155.3" "RECEIVED: 221 2.0.0 Bye"
"DEBUG" 3732 "2009-10-12 16:15:21.795" "ExternalFetch::~Start"
"DEBUG" 3160 "2009-10-12 16:15:21.811" "Ending session 148"
It does not even look like it is trying to authenticate.
What could the problem be?
I am not able to download mail from an external POP3 account
Greetings
Man, do I feel like an idiot. I do not know how many times I went over all the setting to make sure everything was right. Eventually noticed I had port 25 in my POP3 port instead of 110. D'Oh!
It works now.
Mail sorting / account setup
Hi
I have just started to use hMailServer and I'm able send and receive email. So this means something i working, but sometimes an Email turnes up where I'm not expecting it.
So I have a master mail account like . So I have made an account for this. Lets say I have 3 mailboxes under this domain. (User1), (User2) and (User3). Now I would like all the mails send to to be "delivered" to either one of my mailboxes for each users.
How do I do it? Do I make 3 accounts , and ? Do I need to make some setup, in order to have the mail sorted in the right mailboxes?
Alias or a rule
If you want all email sent to to also be sent to other email addresses, then you'll need to configure those accounts with an alias of . You could also do this using a rule to forward email to the recipients you need.
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
All configs OK but no received mail
Went through all posts submitted here. Configured hMail, firewall opened ports, conneceted to outlook....
When testing from hMail or outlook or via DNStool all settings are correct. Ports are open and cen send via my SMTP (internet provider).
It all worked 'till today.
None of mails, even test ones can't be received. Any suggestions??
Check your MX record
If your ports are definitely open, check your MX record is correct. If the MX record is correct, ensure the A record (e.g mail.mydomain.com) is pointing to the correct IP address.
----------------
Dominic Ryan
5 x Microsoft IIS MVP, MCSE, MCSA
IIS Aid owner/webmaster
Still no working.
Ports 25 and 110 are open (don't use IMAP). All are pointed to server psychop.dyndns.org. this is from one test:
Mail server psychop.dyndns.org[93.103.181.72] answers on port 25
and second test:
Success: I can see your service on 93.103.181.72 on port (110), Your ISP is not blocking port 110