inGuide | Digital Marketing, Online Business & WordPress
  • Home
  • Blog
  • Deals
  • Services
  • Forum
    • New Forum
  • Free Resources
    • inSend: Mailwizz
  • Contact
  • Click to open the search input field Click to open the search input field Search
  • Menu Menu
Email Marketing, SMTP server

Create Mail Server on Windows with Open Source hMailServer

Creating and setting up of mail server on Windows is not as difficult as perceived. But if you are looking for open-source free software to create mail/SMTP server, you certainly have very few choices. One of the open-source software for Windows mail servers is hMailServer. It installs just like any other software, but configuration could be tricky. There is one more software in my knowledge for Windows, which is free, is Axigen.

In this tutorial, you will learn to install and configure hMailServer. In some other tutorial, I will discuss Axigen as well.

Requirement for hMailServer

You will need

  • a domain name
  • a Windows Machine. It could be Windows 10, Windows Server 2016, 2019, or any other Windows edition.

I recommend getting Windows Server from Turnkey Internet or anywhere you like, just make sure port 25 is open. Best thing is about turnkey is you can buy and apply Windows license from somewhere and pay them just for VPS. This might save some money for you.

Testing for Open Port 25 on Windows

On Windows 10 go to control panel and search for “Windows Features”

windows-features-open-port-25

Now go to Turn Windows features on or off and look for telnet. Check the box in front of it and click OK.

telnet-windows-open-port

After that open command prompt and type

telnet smtp.gmail.com 25

If you get connected message then all is well, otherwise your port 25 is blocked.

Getting & Installing hmailserver

To get hmailserver just go their website and download. Install it as any software and follow the screenshots below. During installation you will be asked to create password. This password will be needed every time you start hmailserver.

Configuring hMailServer

After installation on first run you will be asked for password to start.

Adding Domain

After that, on next screen add domain as follows.

add-domain-hmailserver

Next type the domain name and save.

create-mailserver-hmailserver

Adding Accounts

After that, you need to add account for the domain. Simply go to Accounts and then Add.

On following screen enter username and password, then save.

create-windows-mail-server

Generate and add DKIM key to hMailServer

In order to generate DKIM key to hMailServer, you need openssl key generator. Just download from the following link

1. OpenSSL_64bitDownload
2. OpenSSL_32bitDownload

Alternatively, you can also download it from here. Next install the openssl and open command prompt on your Windows.

Generating DKIM key on Windows

On command prompt (cmd) type

cd C:\Program Files\OpenSSL-Win64\bin

Next, execute the following command to generate the key

openssl.exe genrsa -out dkim.private.key 1024
openssl.exe rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM

If you get any error, run cmd as administrator. You will get output as follows.

C:\WINDOWS\system32>cd C:\Program Files\OpenSSL-Win64\bin

C:\Program Files\OpenSSL-Win64\bin>openssl.exe genrsa -out dkim.private.key 1024
Generating RSA private key, 1024 bit long modulus (2 primes)
............+++++
.......+++++
e is 65537 (0x010001)

C:\Program Files\OpenSSL-Win64\bin>openssl.exe rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM
writing RSA key

C:\Program Files\OpenSSL-Win64\bin>

Now you will see two files at C:\Program Files\OpenSSL-Win64\bin. One is dkim.private.key and another dkim.public.key. Next, you need to tell hMailServer the location of dkim.private.key and the selector. Here you can use any alphanumeric as a selector but I am going to use mail

hmailserver-create-dkim-key-configuration

Next, you open dkim.public.key in notepad and follow the steps to create DKIM record for your domain.

Configuring DNS records

You need to create following DNS records in your domain. Login to your domain registrar and look for DNS management.

TypeHostValue
AmailYour Server IP address
TXT@v=spf1 a mx ip4:192.168.10.10 ~all
TXT_dmarcv=DMARC1; p=quarantine; rua=mailto:[email protected]; ruf=mailto:[email protected]; sp=quarantine
TXTmail._domainkeyv=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQ…………;

After this, you can test your email server. For testing, I am going to use Thunderbird. You can also download any desktop based software to test. You can also check hmailserver outlook settings tutorial if you wanted to use outlook with hmailserver.

Enter the following SMTP details in the software.

Hostlocalhost
User[email protected]
PasswordYou chose
Port587
TLSNone

After that, you can send test email to your Gmail.

Conclusion

Creating MailServer on Windows would have been tedious task, but thanks to hmailserver it’s super easy. This is boon for the people, who are unable to get with nitty-gritty of Linux.

June 13, 2021/17 Comments/by Dhiraj Rahul
Share this entry
  • Share on Facebook
  • Share on X
  • Share on WhatsApp
  • Share on Pinterest
  • Share on LinkedIn
  • Share on Tumblr
  • Share on Vk
  • Share on Reddit
  • Share by Mail
https://inguide.in/wp-content/uploads/2021/02/inguide_logo_red_340_156-300x138.png 0 0 Dhiraj Rahul https://inguide.in/wp-content/uploads/2021/02/inguide_logo_red_340_156-300x138.png Dhiraj Rahul2021-06-13 10:15:462021-06-15 07:39:11Create Mail Server on Windows with Open Source hMailServer
17 replies
  1. Gideon Adeniran
    Gideon Adeniran says:
    June 27, 2021 at 8:41 pm

    Thank you for all your tutorials and I must say I enjoyed and have learnt a lot from them. I have a question boss concerning the hmail server. Please how do I set up a reverse DNS in hmail server? You did not include it in the tutorial. Hope to hear back from you.

    Thank you.

    Gideon

    Reply
    • Dhiraj Rahul
      Dhiraj Rahul says:
      June 28, 2021 at 3:45 am

      Just ask your hosting provider to set reverse DNS. They will help you out.

      Reply
  2. samuel
    samuel says:
    July 5, 2021 at 3:10 am

    says doesnt allow wild cards on domain settings dns

    Reply
  3. martial
    martial says:
    July 19, 2021 at 5:57 am

    hello
    I have my domain with godaddy I followed the steps but I do not receive or send the mails I have this message in gmail when I send an email from gmail ( Response from the remote server:
    552 1 Requested mail action aborted, mailbox not found
    is there a propagation delay

    Reply
    • Dhiraj Rahul
      Dhiraj Rahul says:
      July 20, 2021 at 10:52 am

      No, it shouldn’t be. Actually, you have to do a couple more things to send emails from the outside app (i.e. those apps that are not installed on Windows where hmailserver is installed). Also, you have to enable the IIS server to receive emails. Overall, it’s not going to be easy if you are new. I would suggest you go with MailEnable(https://youtu.be/EgQVSMVWif8) or wait till I release 2nd part of hmailserver viedo.

      Reply
      • Kim
        Kim says:
        October 18, 2022 at 10:00 am

        When do you release 2nd part of hmailserver?

        Reply
  4. Mohamed
    Mohamed says:
    July 23, 2021 at 10:46 pm

    how much they can send ??

    Reply
  5. busari nurudeen
    busari nurudeen says:
    December 20, 2021 at 10:35 pm

    please what site did you purchase this RDP you used for this tutorial?

    Reply
    • Dhiraj Rahul
      Dhiraj Rahul says:
      January 1, 2022 at 3:01 pm

      https://inui.in/turnkey

      Reply
  6. larry buck
    larry buck says:
    December 31, 2021 at 1:29 pm

    PLS help us with another company that sell rdp with pot 25 open aside turnkey internet

    Reply
    • Dhiraj Rahul
      Dhiraj Rahul says:
      January 1, 2022 at 3:01 pm

      https://inui.in/cloudcone

      Reply
  7. Varun
    Varun says:
    January 22, 2022 at 11:40 am

    1st Error: while running the command openssl.exe genrsa -out dkim.private.key 1024 “genrsa: Can’t open “dkim.private.key” for writing, Permission denied”

    2nd Error: while running the command “openssl.exe rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM”

    Can’t open dkim.private.key for reading, No such file or directory
    2476:error:02001002:system library:fopen:No such file or directory:crypto\bio\bss_file.c:69:fopen(‘dkim.private.key’,’r’)
    2476:error:2006D080:BIO routines:BIO_new_file:no such file:crypto\bio\bss_file.c:76:
    unable to load Private Key

    Reply
  8. sukhbaatar
    sukhbaatar says:
    July 4, 2022 at 1:05 pm

    Hello, I have small topology. Router have static ip address. Local network have 10 pc. I want to install hmailserver on 1 pc and join to domain. How to make it?

    Reply
    • Dhiraj Rahul
      Dhiraj Rahul says:
      July 8, 2022 at 8:11 am

      Install hmail on local IP and then create reverse proxy.

      Reply
  9. tenny
    tenny says:
    August 8, 2022 at 4:13 pm

    thanks for this tutorial but i have one small issue. i got all the step and its sending to yahoo, gmail and the likes but i tried sending to sms gateway like ([email protected]) but i got this response [sender rejected AUP#DNS]
    please what can i do

    Reply
    • Dhiraj Rahul
      Dhiraj Rahul says:
      August 9, 2022 at 11:59 am

      Your IP is blacklisted in CSI. Reset your IP reputation here https://csi.cloudmark.com/en/reset/

      Reply
  10. José
    José says:
    April 4, 2024 at 3:22 pm

    Thank you very much for this tutorial! Is this setup only for sending mail? I’m having issues receiving.

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Table of Contents

Search Search

Recent Posts

  • Install Mattermost on Ubuntu/Debian
  • 17 Popular Free & Paid Mail Transfer Agents
  • Top 10 VPN Service Providers & Why!!
  • 15 Best Canva Alternatives for Graphic Design [Free & Paid]
  • 12 Best third-party SEO tools for your website
  • Best NFT Marketplace For Beginners
  • Best WordPress ad management plugin
  • What is Domain Name System blacklist (DNSBL)?
  • Introduction to the Basics of Linux
  • What is Proxy Server?

Categories

  • Chat & Collaboration
  • Domain
  • Email Marketing
  • Email Service
  • Graphic Design
  • Hosting
  • Learning Management System
  • Linux
  • Miscellaneous
  • Proxy
  • Search Engine Optimization
  • SMS
  • SMTP server
  • WooCommerce
  • Wordpress
  • WP Security
Popular
  • Postal-smtp-server
    Build Postal SMTP Server & Send Bulk Emails Step by...March 25, 2021 - 5:19 am
  • install-configure-powermta-centos-8
    Install & Configure PowerMTA on CentOS with IP rot...February 15, 2021 - 4:23 am
  • postal-create-SMTP-add-domain-SSL
    Simplest Way to Configure Postal & Create SMTP + Install...March 27, 2021 - 9:20 am
  • Install CyberPanel on Ubuntu and Create WordPress Websi...September 22, 2021 - 10:05 am
  • Create Mail Server on Windows with Open Source hMailSer...June 13, 2021 - 10:15 am
  • zimbra-free-ssl-certificate-install
    How to Install Free SSL Certificate on Zimbra Mail Serv...May 9, 2021 - 2:21 pm
  • install-zimbra-mail-server-on-centos-8
    Install Zimbra Mail Server on CentOS 7/8 Step by StepMay 9, 2021 - 6:05 am
  • Install and Configure MailCow – Best Self Hosted Mail...May 12, 2021 - 10:32 am
  • lets-encypt-certificate
    Installing Let’s Encrypt Free SSL Certificate on ...March 24, 2021 - 7:36 am
  • install-wordpress-cloud-hosting
    Super Easy Way to Install WordPress on Cloud Hosting in...March 30, 2021 - 1:35 am
Comments
  • vikasCannot "Build a new mail server" #3295 On a fresh installation...May 15, 2025 - 1:19 pm by vikas
  • SivaHow can find about aol blocking and know about email inbox...February 26, 2025 - 7:04 pm by Siva
  • RAKESH GUPTAWe want to change our default CentOS Mail Server to something...December 5, 2024 - 7:15 am by RAKESH GUPTA
  • LavisHey, Can you help me to choose good SMTP server between...November 18, 2024 - 11:12 am by Lavis
  • ApostleThis question is never answeredOctober 29, 2024 - 6:19 am by Apostle
Tags
Ahrefs Aol Canva dkim dkim generator dkim powermta dmarc generator easyengine email deliverability free Gmail install docker ubuntu install free ssl zimbra install mailcow install mailwizz install wordpress install wordpress on google install zimbra centos 8 iredmail mailcow Mailu mailu docker compose mailwizz Memberpress MTA open source chat app outlook Plugin Postal postal server postal smtp private chat server rocket.chat SEO smtp server spf generator Talos VPN WooCommerce WordPress wordpress on cloud hosting Yahoo zimbra zimbra mail server zimbra ssl

Follow us on Facebook

X Logo X Logo Followon X

Information

  • About
  • Account
  • Blog
  • Contact
  • Deals
  • List of VPS Hosting that Provides Open Port 25
  • Login
  • Newsletter
  • Privacy Policy
  • Terms of Service
  • Thank You
  • Verify Account

Resources

  • Account
  • Deals
  • Downloads
  • List of VPS Hosting that Provides Open Port 25
  • Login
  • Services
  • Thank You
  • Verify Account

Categories

  • Chat & Collaboration
  • Domain
  • Email Marketing
  • Email Service
  • Graphic Design
  • Hosting
  • Learning Management System
  • Linux
  • Miscellaneous
  • Proxy
  • Search Engine Optimization
  • SMS
  • SMTP server
  • WooCommerce
  • Wordpress
  • WP Security

Archive

  • November 2025
  • July 2023
  • June 2023
  • May 2023
  • January 2023
  • November 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • September 2021
  • June 2021
  • May 2021
  • April 2021
  • March 2021
  • February 2021
© Copyright - inGuide | Digital Marketing, Online Business & WordPress
  • Terms of Service
  • Privacy Policy
Link to: Why Emails are going to Spam from my Domain? Link to: Why Emails are going to Spam from my Domain? Why Emails are going to Spam from my Domain? Link to: Secret of IP warming – Plans, Schedule, Strategy & Pitfalls Link to: Secret of IP warming – Plans, Schedule, Strategy & Pitfalls Secret of IP warming – Plans, Schedule, Strategy & Pitfalls
Scroll to top Scroll to top Scroll to top