Building Home Lab for Exchange 2013

Posted: August 16, 2015 in Exchange

In this blog i installed Exchange Server 2013 as Hyper-V guest.In this blog we will configure Exchange to receive and send mails.I stumbled accross two issues:I have dynamic IP and was unable to send mails (got blacklisted),and i had to,for incoming messages,to forward port 25 to another one (1194) on router my ISP gave me (192.168.0.45 is IP address of my Exchange Server)

Untitled6

To send emails to outside world i found SMTP relay service on this blog http://www.wallacetech.co.uk/?p=573

So,on my exchange i created new send connector

Untitled7

Untitled7

Untitled7

Untitled7

This connector will send messages for all domains (*) and will use dc.bigfirm.biz (DC and Exchange is installed on this server,in production environment this shold be avoided)

For internal users to receive mail,we need to create receive connector,i used PowerShell:

[PS] C:\Windows\system32>New-ReceiveConnector "my receive connector" -Bindings 192.168.0.45:1194 -RemoteIPRanges 0.0.0.0
-255.255.255.255 -RequireTLS $false -ProtocolLoggingLevel verbose -PermissionGroups anonymoususers -MaxMessageSize 38MB
-MaxLocalHopCount 12

This connector will listen on 192.168.0.45 (exchange server address,port 1194),for any IP addess (0.0.0.0-255.255.255.255),logging is enabled,and max allowed email size is 38 MB),MaxLocalHopCount parameter specifies the maximum number of local hops that a message can take before the message is rejected by the Receive connector

I created AD domain named bigfirm.biz,it’s for local use only i have not registered this domain.

But,for this lab i bought bigfirm.info domain from GoDaddy,to test mail flow.During Excange install,i specified bigfirm.biz as default accepted domain.Accepted domain is SMTP namespace for which Exchange will accept emails.Now i must tell Exchange that default accepted domain is bigfirm.info:

[PS] C:\Windows\system32>New-AcceptedDomain -name bigfirm -DomainName bigfirm.info -DomainType authoritative

We must configure new domain in default email policy also:

[PS] C:\Windows\system32>Set-EmailAddressPolicy "default policy" -EnabledEmailAddressTemplates SMTP:@bigfirm.info

[PS] C:\Windows\system32>Update-EmailAddressPolicy "default policy"

 Testing

On GoDaddy,in DNS console,i created MX record and pointed it to my physical machine (Host A record with my current public IP address)

Untitled

For internal users,we need also to create DNS MX (Mail Exchanger) record,in bigfirm.biz DNS zone.

This record sets dc.bigfirm.biz as mail server for bigfirm.biz domain (although it will send mails for bigfirm.info)

Untitled

I created test user (this command will create user in AD,as well as create it’s mailbox)

[PS] C:\Windows\system32>New-Mailbox -UserPrincipalName don.hall@bigfirm.biz -Name "Don Hall" -OrganizationalUnit Users
-FirstName Don -LastName Hall -DisplayName "Don Hall" -ResetPasswordOnNextLogon $false -Password (ConvertTo-SecureStrin
g -AsPlainText -Force Passw0rd06)

I logged in new user to client computer,and started outlook,mail profile is automatically created.

For testing i used 10 minutes mail portal: http://10minutemail.com/10MinuteMail/index.html

and from don.hall@bigfirm.info account sent email to this temporary account

Untitled

I replayed to Don Hall:

Untitled1

And message landed to Don Hall’s inbox:

Untitled3

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s