For a local Office 365 (On-Premises Relay) system, you will need to prove domain ownership to enable your Office 365 service. Microsoft provides two options: one option is to create an MX record, which you should not choose, and the second option is to create the CNAME record as directed on http://help.outlook.com/en-US/140/cc188653.aspx.
Next, create a subdomain to route mail to Office 365 so you can create users with forwarding addresses during the transition period. A subdomain is also known as an “Accepted Domain” and that needs to be created so mailboxes on the Office 365 server can have an alias that contains the subdomain address. Learn more about Accepted domains in Exchange Online documentation.
More details and step-by-step instructions from Microsoft can be found in Exchange Online documentation.
To forward mail to your previous mail system that is routed to Office 365, use the ODME per-user mail forwarding feature as described in the section Setting Up Mail Forwarding. To use the mail forwarding feature, the administrator account must be assigned the “Recipient Management” role, for example:
Add-RoleGroupMember “Recipient Manager” -Member firstname.lastname@example.org
For a local Exchange 2010/2013/2016/2019 On-Premises Relay system, please review the information on https://technet.microsoft.com/en-us/library/aa998825.aspx.
The next task in migrating mailboxes from a source email service is to create the target mailboxes they will be migrated to in the target email service. On Demand Migration for Email does not create them for you. The procedure for creating mailboxes varies between email systems, and you should refer to the documentation provided with your system for particular instructions.
Quest On Demand Migration for Email currently supports migrating content from the following email services: