SOLVED

Office 365 email configuration

Occasional Contributor

I have a client who has an Office 365 Business Premium account. His domain name is hosted by a third party company and his mailing service is provided by another company. The service uses imap.

 

He uses Outlook to access his emails, so the account is already set up in Outlook. He would like to use Office 365 to completely manage his mailing service. Presumably, as his mailbox account is already set up in Outlook, all that needs to be done is to change the MX record to point to Office 365 or have I missed something? Presumably, there is no need for an imap migration in this scenario?

 

Many thanks.

 

18 Replies

Depends. There might be messages left on the server that are not downloaded in Outlook, if you want to be safe best export the entire content of the mailbox as a backup. If it's a single mailbox that's pretty much all you need.

Thinking about it does not this type of imap migration require the allocation of a 'tenant' (xxx.onmicrosoft.com) mailbox in order to migrate the emails into?

Hi @itbookham 

 

O365 Business Premium comes with Exchange Online, so unless you specifically disabled the application within the admin portal like below, then they likely already have a xxx.onmicrosoft.com mailbox already

 

clipboard_image_1.png

 

the mailbox will be empty unless anyone has been sending to the user@tenant.onmicrosoft.com address already.

 

You can check this from the admin portal. the Exchange Online portal or ask the user to try to load up OWA for O365 (outlook.office.com iirc)

 

Hope this helps,

 

@HidMov 

 

Yes, he has two accounts in Outlook, an xxx.onmicrosoft.com mailbox which he doesn't use at the moment and another third party account xxx@abc.com which he uses for his business and which is 'separate' from his O365 tenancy. In other words the third party mailbox is not shown as a mailbox in Exchange Online.

 

His xxx@abc.com account is hosted by a third party mail hosting company which he is charged quite a lot for each year for hosting. It would be simpler and cheaper for him to leverage the O365 functionality (Exchange Online) to manage his xxx@abc.com mailbox.

 

To do this, presumably, he will need to 'migrate' his abc.com mailbox into an onmicrosoft.com mailbox. Is this just a matter of exporting the abc.com pst file into his onmicrosoft.com mailbox in Outlook and then changing the MX record to point to his 365 account. He has a website, so it is probably best that Microsoft does not manage all his DNS settings but only the MX record.

 

I've come across a number of Technet articles  that Microsoft suggests to migrate emails into O365, such as imap migration, network upload of pst files (https://docs.microsoft.com/en-us/office365/securitycompliance/use-network-upload-to-import-pst-files...) and a simple pst export/import (https://support.office.com/en-us/article/import-email-contacts-and-calendar-from-an-outlook-pst-file...). If it is just one mailbox to migrate what is the most practical way commensurate with good practice?

 

Many thanks.

Hi @itbookham 

 


To do this, presumably, he will need to 'migrate' his abc.com mailbox into an onmicrosoft.com mailbox. Is this just a matter of exporting the abc.com pst file into his onmicrosoft.com mailbox in Outlook and then changing the MX record to point to his 365 account. He has a website, so it is probably best that Microsoft does not manage all his DNS settings but only the MX record.

 

 


Pretty much spot on. Make sure abc.com is an accepted domain in office 365. Might be set up already, if not you'll need to add a TXT record with a unique code so Microsoft know you have control over the domain; it;ll also confirm the what you need to point the MX Records to.

Export out the mails from imap, connect outlook to O365, make sure the username/primary smtp is set to user@abc.com and switch the MX records to the ones 365 tell you. 

 

As for website; yes, MS won't need to touch they. They just want all email to be routed through to Exchange.

 

Hope this helps,

 

Hi @HidMov ,

 

Many thanks for your advice.

 

So, just to confirm the steps:

 

1. In Outlook, export the xxx@abc.com pst file and save to Desktop.
2. In Outlook, import the pst file into the correct xxx@xxx.onmicrosoft.com mailbox.
3. In the O365 Admin Portal, go to Setup, select 'Connect your domain'. Go through the wizard and just set up the MX record to point to the O365 tenancy, rather than the existing mail service provider. Presumably, this will require a manual set up in O365 rather than requesting Microsoft to automatically set up all the DNS entries. Although I don't think this would be possible in this scenario anyway, as the domain is hosted with a rather obscure registrar, and not Go Daddy.

 

I am not too sure what you mean when you mention: "Export out the mails from imap, connect outlook to O365, make sure the username/primary smtp is set to user@abc.com".

 

a. "Export out the mails from imap": Do you mean do an imap migration or just export and import the pst file in Outlook, as outlined above?
b. "make sure the username/primary smtp is set to user@abc.com": Do you mean make the xxx@xxx.onmicrosoft.com account/mailbox which the pst file was imported into the 'Default' account in Outlook?

 

Many thanks.

best response confirmed by itbookham (Occasional Contributor)
Solution

Hi @itbookham 

 

I re-read my last post and I realize I wasn't very clear.

 


@itbookham wrote:

Hi @HidMov ,

 

 

a. "Export out the mails from imap": Do you mean do an imap migration or just export and import the pst file in Outlook, as outlined above?

Poor wording from me - I mean just export out then import the pst as you outlined correctly above.

 



b. "make sure the username/primary smtp is set to user@abc.com": Do you mean make the xxx@xxx.onmicrosoft.com account/mailbox which the pst file was imported into the 'Default' account in Outlook?

In Outlook 365 admin center, you can set the primary smtp address of an account - this is used not only as the email address but also the logon for the account. You can have additional alias' associated, but only one primary SMTP. If my understanding is correct, only the xxx.onmicrosoft.com domain is set up on your clients Office 365, so in order to log on your client probably uses something like user@xxx.onmicrosoft.com to connect on. Once you have set up the abc.com domain in Office365, you can then change the primary smtp user@xxx.onmicrosoft.com to user@abc.com. Example on how this looks below

 

In the admin center, go to users > active users > click on a user and on the 'account tab' click on the 'manage username' 

 

clipboard_image_0.png

 

you can then select the domain associated with the user - in this case I have two domains plus the original xxx.onmicrosoft.com. Change it from the xxx.onmicrosoft.com to the newly added abc.com

 

clipboard_image_1.png

 

My personal approach would be

 

1. Set up the abc.com domain in 365 first. Run through the wizard and add the TXT identifier DNS record if required (the 3rd party will need to do this). The wizard will show you what MX records you need to change to to get mail flowing to Office 365, but it will not change them for you. The 3rd party in control of the DNS records will need to do that. You can complete the wizard without changing the MX Records - in fact, I would hold off doing so just now. When you pull the trigger on the MX records, it going deliver to O365 and you'll want to get everything set up before that happens to make sure emails don't go missing. 

I would however get them to to add autodiscover.abc.com records at this point so Outlook can find the Office365 mailbox.

 

2. once abc.com is set up, change the primary smtp/logon to user@abc.com from user@xxx.onmicrosoft.com - this will make logging on a bit easier

 

3. In Outlook, add the Office365 mailbox so you have the two running side by side. It should come up as empty. This'll also confirm that autodiscover is working too.

 

4. Ask the 3rd party to change the MX records and wait for them to propagate. Send a couple of test emails and when the new emails appear in the Office 365 mailbox you know that the changes have gone through.

 

5. Export the old email to PST, then import to the new mailbox

 

6. once you are happy that everything has moved over, you can get rid of the old account.

 

This should provide minimal disruption for your client. Changing the DNS records can take a while (and that's assuming the 3rd party is pretty prompt when you request the changes).

 

Hope this clarify things a bit more - let me know if I've added any additional confusion.

 

Cheers,

 

 

Hi @HidMov ,

 

That's great. I much appreciate your time and clear description.

 

I'll run a test in a test environment first, just to make sure I get everything in the right order. Then go to the production environment.

 

Many thanks again.

@itbookham 

 

Nice one - let me know how you get on :)

Hi@HidMov ,

 

Many thanks.

 

Best,

Mark

Hi @HidMov,

 

Just one other thing.

 

I understand that my client has three laptops, two others for colleagues, plus his own laptop. They all have onmicrosoft mailboxes in the same tenancy. All require that the abc.com mail is routed through O365. All three laptops are in different geographical locations. What is the best way to handle the mail transfer. 

 

If it was one laptop which I have access to, it is not really a problem. But I am perplexed how this can be handled with all the laptops in different locations. Not unless of course I remote on to the laptops one at a time, import and export the pst files, say in the course of a particular day, to try to synchronise everything. Once this is done, to then point the MX record to O365. If so, when should the MX record be changed?

 

Does this sound best practice or have I overlooked something?

 

Many thanks again.

Hey @itbookham 

 

Different timezones always provide unique headaches. 

 

Personally, I'd be inclined to get the O365 mailbox set up on all of the laptops so they have both the old mailboxes and current mailboxes together, then change the MX records. Once you are happy there is mail flow going to the correct mailbox for all users, then do the import/export.

 

To explain my reasoning: If everyone has both the IMAP and the O365 mailbox in Outlook, then they'll get emails flowing to the old IMAP as normal. Once the MX records change, new emails will go to the O365 mailbox, but they'll still have access to the older emails in the other inbox, so nothing is lost. You can then do the export/import at a convenient time to move them all over and finally close off the old IMAP from Outlook. I'd be concerned that doing the import/export before the MX records change means that mail will still flow to the old IMAP mailbox, so you might have a few stragglers between the change over. Wouldn't be the end of the world though.

 

Either way should work to be honest. Only thing to think about is to make sure users are aware how to send from the O365 mailbox when they have both set up in Outlook (or they'll try to send from the IMAP) and also make sure the SPF record if there is one is set up so it knows Office365 should be sending out abc.com emails otherwise they may be marked as junk. The SPF record details will be given with the domain setup wizard.

 

Just for my own clarification, we are talking about 3 seperate mailboxes (user1@abc.com, user2@abc.com, user3@abc.com) and not all three users sharing the same single mailbox?

Hi@HidMov,

 

I've now been able to access my client's mailboxes in O365. Strangely, he doesn't have any xxx.onmicrosoft.com accounts in Exchange 'Recipients'. But he does have three @abc.com mailboxes listed. In other words three mailboxes with the custom domain (abc.com), although the custom domain wizard has not been run.

 

Apparently he set up O365 himself and it seems quite probable that he deleted the onmicrosoft.com mailboxes. If so, presumably, I will need to create three new 'default' O365 mailboxes, such as jim@xxx.onmicrosoft.com.

 

Many thanks.

My apologies, I forgot to look in Domains and an 'onmicrosoft.com' is listed, along with the abc.com domain. There is an error message on the same page that states: "Incorrect DNS records
The incorrect DNS records are highlighted below. The records were retrieved when querying the following nameservers....". This relates to the abc.com domain.

 

But, there are no 'onmicrosoft.com' mailboxes in Exchange, nor do the users have this alias.

Every O365 business tenant should have a xxx.onmicrosoft.com domain; it's the initial domain and so far as I am aware it cannot be removed. Additional domains can be added and removed, but it is always the one constant.

 

the abc.com domain reporting errors makes sense as the MX records at least at pointing towards the IMAP servers they are getting their mail through at the moment, so that is expected.

 

In O365, there are just mailboxes; they are not specifically xxx.onmicrosoft.com or ABC.com, just mailboxes that are hosted in Exchange Online. Is it possible your client remove all of the xxx.onmicrosoft.com alias' at some point? If you try to add a new alias to one of the mailboxes is the xxx.onmicrosoft.com a option like below?

 

clipboard_image_0.png

Hi@HidMov,

 

Yes, that is correct there are three separate mailboxes: user1@abc.com, etc. They are using these addresses to sign into their O365 accounts.

 

I have checked and the xxx.onmicrosoft.com is available to create a new alias in the drop down list for a user. At the moment the three active users are set up with their xxx@abc.com as the 'username'. So, I think you are right in that my client probably deleted the xxx.onmicrosoft.com aliases of the three users at some point.

 

In the 'Domains' tab, two domains are listed:
abc.com (Default) and under 'Status' shows 'Possible Service Issues'
xxx.onmicrosoft.com 'Status' shows 'Setup Complete'

 

Would best practice suggest that I should (re)create the three aliases: joe@xxx.onmicrosft.com etc?

 

If so, presumably, the steps are:

1. Create three new users: user1@xxx.onmicrosoft.com.... in the Admin section
2. Run the 'Domain' wizard in Setup so that Microsoft handles the abc.com MX record, autodiscover.abc.com and spf record.
3. At this point there will be six users: 3 x xxx.onmicrosoft.com and 3 x abc.com
4. In the new @xxx.onmicrosoft.com users, double click each user in turn, and under 'Username / Email', select 'Manage username'. Then add the other alias for each, using the abc.com domain. So, for example, john@xxx.onmicrosoft.com, will use @abc.com. The only problem with this, is that this email address is already shown as a username (john@abc.com) in the Active users' list, as this was the way that my client set up O365. Does this matter? Perhaps not as the original 'users' have different mailboxes? Also, is this address (the xxx.onmicrosoft.com using the abc.com alias) the 'new' login name in order to access O365 for each user? Will a new password need to be set up?
5. For each in turn, export the pst files and import into the new users (xxx.onmicrosoft.com) account which now use the abc.com alias (domain) in Outlook.

 

There may be other steps involved but perhaps I would be grateful to clarify the above first.

 

It's all probably quite straightforward, but it's making the the correct steps are taken in turn. If there is one thing that keeps me awake at night, it is clients losing the email and/or data!

 

Many thanks.

Hi @itbookham


@itbookham wrote:

 

It's all probably quite straightforward, but it's making the the correct steps are taken in turn. If there is one thing that keeps me awake at night, it is clients losing the email and/or data!

 

 


I absolutely appreciate this- I'm a measure-twice-cut-once kind of guy so making sure you have the right process to ensure no data loss is always a top priority.

 

From the description below, it sounds like there are already 3 mailboxes hosted within O365, though without the xxx.onmicrosoft.com alias assigned

 

The xxx.onmirosoft.com alias isn't necessary. Office365 needs something to set up when a new tenant is created, so every tenent gets a xxx.onmicrosoft.com domain almost as a place holder. It's also useful for testing.

 

If the users already have mailboxes then there isn't much point setting up new users - it's just going to be costing additional licences and adding complexity. Let's break down the stages we want to do get to our end goal:

 

1. confirm there is a mailbox in Office 365 that the user can use

2. Add the O365 mailbox to their Outlook

3. Get new email being delivered to the office365 mailbox

4. move the old email from the IMAP mailbox to the Office365 mailbox

5. Remove the old mailbox from Outlook 365. All email will be sent/received via 365 for each user.

 

For 1, we can do a simple test. For the existing user1, just add user1@xxx.onmicrosoft.com alias to the existing account. No need to create a new user, just use what is already there. After a few minutes, try to send an email to the user1@xxx.onmicrosoft.com - log into the users OWA and confirm; does the email get delivered? If so, great - you have a working Office 365 mailbox. If it doesn't, take a look at the NDR that gets generated and see if there is something amiss. Also try to send from OWA and confirm that email goes out fine too - you'll receive the email from user1@xxx.onmicrosoft.com but that's fine as we're just testing.

 

For 2, set up the SPF and Autodiscover records in DNS as we've previously described. Once that's done, you can set up the O365 mailbox in their Outlook. Once this is done, you can again test sending a email to the xxx.onmicrosoft.com alias to make sure it sends/receives OK

 

3. Change the MX Record as previously described. In Outlook they should have the old IMAP mailbox and the O365 mailbox. Mail will start going to the office365 mailbox. Check that outgoing email is going through Office 365 too; you can double check this by making sure any sent email is visible in the 'sent items' folder in OWA

 

4. do the old export-and-import previously discussed

 

5. Once you are happy that everything is routing through Office365, you can remove the old IMAP mailbox from Outlook. Everything should now be in O365

Many thanks again for your suggestions.

I bought a cheap test domain from Go Daddy for a year. I set up the test domain (running the wizard), let's say abc.com in Office 365. Added this alias to my xxx.onmicrosoft account. So, there is one Username/Email xyz@xxx.onmicrosoft.com and one alias xyz@abc.com.

I was able to send out and receive emails from the xyz@xxx.onmicrosoft.com account. Also, I was able to send out an email in OWA using xyz@abc.com domain (the alias) but in the recipients inbox it shows as coming from xyz@xxx.onmicrosoft.com. In Yahoo, I was unable to send out from a Yahoo account an email to xyz@abc.com. It bounced back:

550: 5.4.1: Recipient address rejected: Access denied [LO2GBR01FT004.eop-gbr01.prod.protection.outlook.com]

MX Toolbox shows the test domain (abc.com) as pointing to: abc.com.mail.protection.outlook.com. In Go Daddy's DNS zone of the test domain, there is an autodiscover entry: cname: autodiscover, autodiscover.outlook.com, 1 Hour. And the MX record in the DNS zone looks correct: mx @ abc.mail.protection.outlook.com (Priority: 0) 1 Hour.

But when I run Microsoft remote connectivity analyser (https://testconnectivity.microsoft.com), using the xyz@abc.com, the following error is returned:

The Microsoft Connectivity Analyzer is attempting to retrieve an XML Autodiscover response from URL https://autodiscover-s.outlook.com/Autodiscover/Autodiscover.xml for user xyz@abc.com. The Microsoft Connectivity Analyzer failed to obtain an Autodiscover XML response.

It may be that something is set up slightly differently in my test environment than my client's but just in case I will need to get back to the drawing board to solve the errors above.

Once I've determined what the problem is, I can then move on to your steps.

Many thanks again.