While testing e-mail notifications in SOA it is very handy to have a local mail server for testing.
It is very easy to install a local mail server. Lets see how to do it.
Download the latest production release HMail server from here.
We need to install and configure the local mail server in 5 steps.
STEP 1 : Install the mail server.
STEP 2 : Add the entries in the host file.
STEP 3 : Add exception to the windows firewall.
STEP 4 : Configure the local mail server domain.
STEP 5 : Configure Thunderbird for the local server.
STEP 1 : Install the mail server.
1) Start the installation. Click next on the welcome screen.2) Accept the agreement and click next.
3) Select a destination folder and click next.
4) Select full installation and click next.
5) Select use built-in database and click next.
6) Review the Start menu folder and click next.
7) Review the install folder and click install
8) Enter a password. For example, welcome1 and Click next.
9) Uncheck: Run hMailServer Administrator and click Finish.
STEP 2 : Add the entries in the host file.
1) We need to add an entry in the windows hosts file to map our mail server domain to the localhost.Go to the following location
C:\windows\system32\drivers\etc
2) Open the file called hosts in notepad and add the following entries
127.0.0.1 localhost.com
127.0.0.1 mail.localhost.com
127.0.0.1 smtp.mail.localhost.com
127.0.0.1 pop3.mail.localhost.com
STEP 3 : Add exception to the windows firewall.
Now we need to configure Windows firewall to allow the ports required by local mail server.1) Go to Control Panel and, select Windows firewall.
In the left-hand pane, select Advanced Settings
2) Right click inbound rules in the left-hand pane and select new rule.
3) Select port as rule type and click next.
4) Select TCP.
Select specific local ports and add the following ports 25,110, 143.
Click next.
5) Select Allow the connection and click next.
6) Select all three(Domain, Private, Public) and click next.
7) Give a name for the rule. For example, Local Mail Server and click Finish.
STEP 4 : Configure the local mail server domain.
Now we will configure a domain for the local mail server.
1) Go to the hMail server folder in the installed programs.Select hMailServer administrator.
2) Click connect.
3) Enter password as welcome1
4) Click add domain.
5) Enter the domain name as mail.localhost.com
Click Save.
6) Go to accounts in the newly created domain and click Add.
7) Enter the following:
Address : admin
Password : welcome1
Administration level : server
Click Save.
Similarly create the following two accounts:
bpel@mail.localhost.com
notify@mail.localhost.com
8) Go to settings -> protocols -> SMTP –> Delivery of e-mail
Enter local hostname : mail.localhost.com and click Save.
9) Go to settings -> advanced -> Auto-ban
Uncheck the 'Enabled' checkbox and click Save.
10) Go to settings -> advanced -> TCP/IP ports -> select SMTP
Enter TCP/IP address as 127.0.0.1
Click Save.
Do the same for POP3 and IMAP.
11) Restart the server after changing details for IMAP.
12) Testing the local mail server.
Go to Utilities –> MX-queryEnter e-mail address admin@mail.localhost.com and click Resolve.
The IP address should resolve to 127.0.0.1
13) Go to Utilities –> Diagnostics
Select Domain as mail.localhost.com
Click Start
All tests should pass except two tests related to MX records, you can ignore those two failing tests.
STEP 5 : Configuring Thunderbird to work with the local mail sever.
Install Thunderbird from here.1) Open Thunderbird. Go to Tools –> Account Settings
2) Select Add Mail Account.
3) Enter the following:
Your name : Admin
Email address : admin@mail.localhost.com
Password : welcome1
Click Continue.
4) Thunderbird will auto detect all the required details.
Select POP3
Click Done.
5) If you get a warning like this, you can ignore it.
6) Send a test mail to see if everything is setup correctly.
From: admin@mail.localhost.com
To: admin@mail.localhost.com
Post a Comment