During your migration, you need to forward emails arriving in an Office 365 mailbox to the source mailbox of the user.
This is typically the case if you need a coexistence of two messaging systems spanning a few weeks.
Imagine that you have created a user, Bill, in Office 365 and assigned a mail license. A mailbox has been created for Bill.
However Bill has not yet been migrated and is still using the source mail system.
A different user, who has already been migrated, sees Bill in their own address book and sends Bill an email.
Since Bill has a mailbox associated with him, the mail is delivered locally instead of being transferred at the source.
What’s the best way to handle this scenario?
Let’s assume that you are migrating source.com.
MX records are still pointing to the source messaging system.
In Office 365, you have not linked the domain yet. The primary SMTP addresses of our users are something like domain.onmicrosoft.com.
Bob is already migrated: his email address is firstname.lastname@example.org.
Bill has not been migrated yet, but his account exists in Office 365. His email address is email@example.com
Bob sends an email to Bill (he picks up firstname.lastname@example.org) in the address book.
You want the mail to be automatically forwarded to email@example.com.
You can activate the forwarding by using PowerShell:
Set-Mailbox billy –ForwardingSmtpAddress firstname.lastname@example.org –DeliverToMailboxAndForward $false
If later, you want to disable forwarding, you can run the following command:
Set-Mailbox billy –ForwardingSmtpAddress $null
Now, imagine that you have already attached source.com to Office365 (but MX records are still pointing to the source and migration is not completed).
To forward mails of users who have not yet been migrated, you can create a temporary domain and attach it to the source mail system (point the MX records to the source messaging system).
For example, create the domain tempsource.com and use it to forward the mails to the source.