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



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:


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


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


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, and smarthost Exchange Online.

When Demo User2 replies to the mail, since it’s primary address is set to, 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:



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


And as a mailbox-enabled user in Exchange Online



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


Chose the type of remote resource mailbox you wish to create


Enter the required user information



Add an archive if wanted


Review the configuration summary





Remote Mailbox successfully created!


Launch dirsync and assign a license to the newly created user



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:


And this is seen online


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:


* Online Portal shows


* Let’s enable Dummy Test for Exchange


* Connecting to Exchange Online using Remote PowerShell, reveals:


* 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:


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

On Premises:





Mail flow ok:



Comments (7)

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

    Well done on a great blog post.

  2. burnr says:

    Great post, thanks a lot!

  3. 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??

  4. PB says:

    Great post! I think you solved my problems.

  5. 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:
    Latest version of Showbox App download for all android smart phones and tablets. – 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:
    Showbox for PC articles:
    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. 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’.
    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.
    Please do login to Showbox application with the help of Ymail. You can login in Ymail from here –
    Sign Up & Do registration for latest movies on Showbox application

Skip to main content