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


 

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 (7)

  1. Anonymous says:

    Awesome !!!

  2. iVinayak says:

    Good one..

  3. Nicolas Blank [MCM Exchange 2010] [MVP Exchange] says:

    Well done on a great blog post.

  4. burnr says:

    Great post, thanks a lot!

  5. learncisco.net says:

    I tried this thing many times because i found it very interesting technique you should explain why don’t we get the message/mail from outbound??

  6. PB says:

    Great post! I think you solved my problems.

  7. show box says:

    Thanks for the great info. I really loved this. I would like to apprentice at the same time as you amend your web site, how could i subscribe for a blog site?
    For more info on showbox please refer below sites:
    http://showboxandroids.com/showbox-apk/
    http://showboxappandroid.com/
    Latest version of Showbox App download for all android smart phones and tablets.
    http://movieboxappdownloads.com/ – It’s just 2 MB file you can easily get it on your android device without much trouble. Showbox app was well designed application for android to watch movies and TV shows, Cartoons and many more such things on your smartphone.
    For showbox on iOS (iPhone/iPad), please read below articles:
    http://showboxappk.com/showbox-for-ipad-download/
    http://showboxappk.com/showbox-for-iphone/
    Showbox for PC articles:
    http://showboxandroids.com/showbox-for-pc/
    http://showboxappandroid.com/showbox-for-pc-download/
    http://showboxforpcs.com/
    There are countless for PC clients as it is essentially easy to understand, simple to introduce, gives continuous administration, effectively reasonable. it is accessible at completely free of expense i.e., there will be no establishment charges and after establishment
    it doesn’t charge cash for watching films and recordings.
    http://www.showboxforipad.org/showbox-apk/ Not simply watching, it likewise offers alternative to download recordings and motion pictures. The accompanying are the strides that are to be taken after to introduce Showbox application on Android. The above
    all else thing to be done is, go to the Security Settings on your Android telephone, Scroll down and tap on ‘Obscure sources’.
    http://www.showboxforipad.org/
    http://movieboxappdownloads.com/moviebox-apk-android/
    http://movieboxappdownloads.com/download-moviebox-pc/
    Movie Box, an esteemed movies application in which you can find stacks of programs and films. The guide is given here to download Movie Box app to Android and to Apple iOS 9.0.2, iOS 8.4/8.3 and also for the lower versions without Jailbreak.
    http://showboxforiphone.org/
    Please do login to Showbox application with the help of Ymail. You can login in Ymail from here –
    http://ymaillogintips.com/
    Sign Up & Do registration for latest movies on Showbox application