Ilse Van Criekinge's Weblog

Addicted to Microsoft Unified Communications

Exchange Online + Exchange On Premises = Shared Namespace, How About Mail Routing?

Exchange Online + Exchange On Premises = Shared Namespace, How About Mail Routing?

  • Comments 3
  • Likes

 

Intro

When thinking about configuring a hybrid environment, as in moving some mailboxes online, and keeping some on premises, one the questions you need to answer is: how do you want to have your mail flow configured? Do you want your MX record to point to the Microsoft Datacenters, and configure mail routes to make sure internet mail destined for users homed On Premises are delivered, or do you want to have the MX record pointing to your local On Premises Exchange environment, and configure mail routes to assure mails are delivered to users with their mailboxes in Exchange Online.  The Exchange Deployment Assistant will provide you with the steps to follow for whatever configuration you opt:

IVC-0994

Our environment

In our environment, we have chosen to keep our MX record pointing to our on premises environment, and thereby configuring mail flow as pictured below

IVC-0996

Example of a message from the internet that is sent to demo.user2@msbelux.be, will be delivered to our Exchange On Premises environment. Exchange accepts the message, being responsible for the domain msbelux.be, and retrieves the following information about this user:

IVC-0937

Demo.User2 is a so-called Remote Mailbox, being, a user in our on-premises Active Directory, having a mailbox in the cloud-based service, Exchange Online.

Where the RemoteRoutingAddress is the one of importance in our mail routing story, being (looking at TechNet):

The RemoteRoutingAddress parameter specifies the SMTP address of the mailbox in the service that this user is associated with.

If you've configured mail flow between the on-premises organization and the service, you don't need to specify this parameter. The remote routing address is calculated automatically

Mail is routed to Exchange Online, using the therefor configured Send Connector, with address space office365.msbelux.be, and smarthost Exchange Online.

When Demo User2 replies to the mail, since it’s primary address is set to demo.user2@msbelux.be, the mail will be sent using that e-mailaddress.

How do you create these Remote Mailboxes?

After setting up your hybrid environment, following the rules given by the Exchange Deployment Assistant, you can start moving mailboxes from On Premises to Online. After moving a mailbox, the user will be converted to a RemoteMailbox automatically, and there is nothing you need to configure manually, you just need to define the Remote Domain when launching a remote move request, as you can see in the pictures below when moving the mailbox of user1 to Exchange Online:

Picture3

Picture4

After the move, the user will show up as a remote user mailbox in the EMC

Picture1

And as a mailbox-enabled user in Exchange Online

Picture2

 

How about a new user?

Easiest way is to use the EMC, to create that user as new Remote Mailbox.

Open the EMC, go down to Recipient Configuration, Mail Contact, and select New Remote Mailbox

IVC-0914

Chose the type of remote resource mailbox you wish to create

IVC-0915

Enter the required user information

 

IVC-0917

Add an archive if wanted

IVC-0918

Review the configuration summary

IVC-0919

 

 

IVC-0920

Remote Mailbox successfully created!

IVC-0921

Launch dirsync and assign a license to the newly created user

IVC-0923

 

And that’s it, demo user3 can sign in, using his on premises credentials, and open his online mailbox Smile

How about an existing user?

If you already have created a user in Active Directory, and the user has already been sync’ed to online (or not), you can give that user a mailbox in Exchange Online, by using the Exchange Management Shell cmdlet Enable-RemoteMailbox, as shown below where demo user 4 gets a mailbox in Exchange Online:

IVC-0953

And this is seen online

IVC-0954

One happy demo user 4 Smile

Be Careful: What happens if you would simply use the Exchange Online Management tools, like the Shell to mailbox-enable a sync’ed user, and give that user mailbox in Exchange Online?

The mailbox-enabled user will be able to send messages outbound, BUT won’t be able to receive messages from the internet or from an On-Premises homed mailbox, since the Exchange server On Premises doesn’t know anything about this user…messages will be queued, and an NDR will be sent back after (by default 2 days)… Let’s have a look at an example here…

After creating a user, Dummy Test, On Premises, and running DirSync, we have the following:

* On Premises Exchange shows:

IVC-0969

* Online Portal shows

IVC-0971

* Let’s enable Dummy Test for Exchange

IVC-0974

* Connecting to Exchange Online using Remote PowerShell, reveals:

IVC-0976

* sending messages outbound works fine, but whenever someone replies to a mail from the internet or from an On Premises mailbox, the messages are not delivered, and queued on the On Premises Hub Transport server:

IVC-0984

Solution? Yes, run Enable-RemoteMailbox, force Directory Synchronization, and all good Smile

On Premises:

IVC-0985

IVC-0986

Online:

IVC-0987

Mail flow ok:

IVC-0992

Ilse

Comments
  • Well done on a great blog post.

  • Great post, thanks a lot!

  • Awesome !!!

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment