Running your own mail server on Windows is a smaller job than it sounds, and hMailServer is the reason. It handles SMTP, POP3 and IMAP, keeps its configuration in a proper database, has a Windows GUI for administration, and is free and open source.
It has been around since the early 2000s, and after a long quiet period development moved to a community organisation on GitHub, which is where the current work happens. That matters for choosing a version, so it is worth reading the next section before installing anything.
hMailServer at a glance
| Licence | Free, open source (AGPL v3) |
|---|---|
| Platform | Windows only. The 5.7 branch is 64-bit only — 32-bit support has been dropped |
| Database | Required: Microsoft SQL Server, MySQL or PostgreSQL, or the bundled built-in engine |
| Administration | Windows GUI plus a COM API for scripting |
| Development | Active — recent builds in August and September 2026 |
A note on versions
The newest published builds carry the 5.7 features, and they are all marked as pre-release. The stable release you may already be running is older and does not include the newer security work described below. Decide deliberately which of the two you want: the tested stable build, or the newer one with DMARC and modern password hashing that is still labelled beta.
What it does
- SMTP, POP3 and IMAP for any number of domains on one server.
- Virtual domains, accounts, aliases and distribution lists, all managed from the GUI.
- External POP3 collection — pull mail from other providers’ mailboxes into local accounts.
- Anti-spam: SpamAssassin integration, DNS blocklists, SURBL, greylisting.
- SPF and DMARC policy checking, and DKIM signing and verification — the three records that decide whether your mail reaches inboxes at all.
- TLS including TLS 1.3 and STARTTLS.
- Server-side scripting through event handlers: run your own logic when a client logs on or when a message is accepted.
- Backup and restore built in.
- IMAP special-use folders, so clients place Sent, Drafts and Trash correctly.
What it does not include
- No webmail. You pair it with a separate one such as Roundcube.
- No built-in antivirus — it integrates with an external scanner.
- No calendars or groupware. For that, look at a full collaboration platform.
- Windows only, and the current branch is 64-bit only.
Installation in outline
- Click the Download button at the top of this page and unpack the archive.
- Run the installer as administrator — it registers a Windows service.
- Choose the database during setup: the bundled engine for a small server, or MySQL, PostgreSQL or Microsoft SQL Server for anything serious. The administration tools need .NET; the server itself is native code.
- Open the required ports on the firewall and, more importantly, make sure port 25 is not blocked by your provider.
- Set up DNS before you send anything: an MX record, an SPF record, a DKIM key and a reverse DNS entry that matches your server name. Without these, large providers will treat your mail as spam regardless of how well the server is configured.
- Install a TLS certificate and switch the ports to encrypted connections.
Recent work worth knowing about
- DMARC policy checking added, alongside the existing SPF and DKIM support.
- Password storage modernised — Argon2id or PBKDF2, selectable by the administrator.
- New installations run as a limited service account with data under ProgramData, instead of running with wider rights.
- DKIM signing for domain aliases and domain-wide signing.
- Fixes for concurrent IMAP mailbox access and for an external collection account that stopped silently after a failed fetch.
Common problems and fixes
| Problem | What to check |
|---|---|
| Mail goes to spam everywhere | SPF, DKIM, DMARC and reverse DNS. This is the cause in almost every case, not the server software. |
| Cannot send at all | Many providers and cloud hosts block outbound port 25 by default. |
| External collection stops working | A known defect fixed in the recent builds — an account could stall after one failed fetch until the service was restarted. |
| 32-bit Windows | Not supported by the current branch; you need a 64-bit system. |
| Cannot connect after tightening security | Older clients may not speak the newer TLS versions the server now prefers. |
hMailServer vs. alternatives
| Tool | How it compares |
|---|---|
| Mail-in-a-Box | Turns a fresh Ubuntu server into a complete mail system including webmail and DNS; Linux instead of Windows |
| IceWarp | Commercial platform with webmail, calendars and chat included |
| Microsoft Exchange | Full groupware for Windows networks; heavy and licensed per user |
| Postfix with Dovecot | The Linux standard — extremely capable, configured entirely in text files |
FAQ
Is hMailServer free?
Yes, free and open source under the AGPL, with no paid edition.
Does it include webmail?
No. Install a separate webmail application such as Roundcube and point it at the IMAP server.
Which database should I choose?
The bundled engine is fine for a small server with a handful of accounts. For anything larger, use MySQL, PostgreSQL or Microsoft SQL Server.
Why does my mail end up in spam?
Almost always DNS: missing SPF, DKIM, DMARC or reverse DNS. hMailServer supports all of them, but the records have to exist.
Does it run on 32-bit Windows?
Not the current branch — it is 64-bit only.
Is the project still maintained?
Yes. New builds were published in August and September 2026, though they are marked as pre-release.







