This article describe an example on how to build an internal test mail server for testing purpose.
Please note the email software used in the example is neither developed nor supported by Qlik.
[Environment used in this example]
QlikServer2 (FQDN: QlikServer2.domain.local, OS: Windows 2012 R2 IP 172.16.16.101)
1. Install .Net Framework 3.5 Feature
1.1 Open Server Manager on Windows. Go to Manager -> Add Roles and Features. Click Next four times.
In Select features
screen tick .NET Framework 3.5 Features
and click Next
1.2 In Confirm installation selections screen click Install button.
1.3 Click Close after installation finished successfully.
2. Install PostgreSQL
2.1 Download PostgresSQL from following site. In this example ddownload PostgresSQL 9.6.8 Windows x86-64. https://www.enterprisedb.com/downloads/postgres-postgresql-downloads
2.2 Run the installation package with Admin Privilege
2.3 Click Next
3 times. In the Password
screen enter the Password for the database superuser(postgres).
In this example, Password123!
is used as password.
2.4 In Port
screen, enter the Port number. In this example we use 4432
, then click Next
2.5 Click Next
two times, Installation will start.
2.6 Completing the PostgreSQL Setup Wizard
shows up. Untick
“Stack builder..” and click Finish
3. Install hMailServer
3.1 Open hosts
file in c:\windows\system32\drivers\etc\
by a text editor and add following entry then saved the file.127.0.0.1 mail.local
3.2 Ping mail.local
and make sure there is reply from 127.0.0.1
3.3 Download hMailServer from following link https://www.hmailserver.com/download/
3.4 Run the installer with admin privilege.
3.5 Click Next. Tick I accept the agreement
in License Agreement screen then click Next
3.6 Click Next
two times. In Select database type screen, select use external database engine(MSSQL, MySQL, PostgreSQL)
and click Next
3.7 Click Next
and in InMailServer Security
screen type in Password
and Confirm Password
. In this example, Password123!
is used as password. Then click Next button.
3.8 In Ready to Install
Screen, click Install
3.9 hMailServer password
dialog pop-up enter the password you entered previously. It is Password123!
In this example
3.10 hMailServer Database Setup
screen shows up, Click Next
3.11 In Select option screen, select Create a new hMailServer database
and click Next
3.12 Select PostgresSQL
and click Next
3.13 Enter, Database server address: localhost
Database name: testmailserver
Then click Next
3.14 Keep Service blank and click Next
screen show up. Click Next
3.16 Completed screen
shot up. Click Close
3.17 Completing the hMailServer Setup Wizard
show up. Click Finish
Screen show up, select localhost
and click Connect
3.19 hMailServer password
screen show up. Enter the password. It is Password123!
in this example. Then press OK
3.20 hMailSerer Administrator
screen show up. Click Add domain
3.21 Enter mail.local
in domain in General
tab and click Save
3.22 Add a test account to MailServer. In this example, added user email@example.com
3.23 On Advanced
, put in default domain. In this example, it is mail.local
3.24 In Settings > Protocol > SMTP > Advanced > Bind to local IP address. Enter 127.0.0.1
and press Save
3.25 In Setting > Advanced Auto-ban, untick Enabled
and click Save
4. Install Thunderbird
Note: The purpose of install Thunderbird is to confirm the mail server is functional
4.1 Download thunderbird from following site https://www.mozilla.org/en-US/thunderbird/
4.2 Run the installer with admin privilege.
4.3 Click Next
two times. Then click Install
4.4 Completing the Mozilla Thunderbird Screen show up, click Finish
4.5 Open the Thunderbird and in Mail Account Setup enter Your name: test1
Email address: firstname.lastname@example.org
And click Continue button
4.6 Click Manual Config
4.7 Set up IMAP and SMTP as follows. Push re-test
and it will show “The following settings were found by probing the give server”. Then press Done.
4.8 In Thunderbird, send an email to email@example.com
and you receive the email.
If you want to send email from other machine towards the test mail server please make sure:
- There is no communication blocked inbetween the machine from where you send email and test mail server. Disable firewall as necessary.
- Configure hosts file in the machine from where you send email. Following is the example on how to configure host file.
(FQDN: QlikServer1.domain.local, OS: Windows 2012 R2, IP 172.16.16.100) : The machine from where you want to send email.QlikServer2
(FQDN: QlikServer2.domain.local, OS: Windows 2012 R2 IP 172.16.16.101): Test Email Server
Step1. On QlikServer1, open hosts
file in c:\windows\system32\drivers\etc\ by a text editor and add following entry, then saved the file. 172.16.16.101 mail.local Note: 172.16.16.101 is the IP of Test Eail server.
Step2. Ping mail.local and make sure there is reply from 172.16.16.101