skip to Main Content

Target mailbox doesn’t have an SMTP proxy matching

You are migrating mailboxes from Exchange on-premises to Exchange Online in Office 365. This time an error is showing that the mailbox status failed. The target mailbox doesn’t have an SMTP proxy matching ‘<domain>.mail.onmicrosoft.com’. Why is it happening, and what is the solution to it? In this article, you will learn how to solve the status failed when migrating mailbox to Exchange Online.

Solution to target mailbox doesn’t have an SMTP proxy matching

This issue may occur if one of the following conditions is true:

  • The source mailbox isn’t stamped to have a <domain>.mail.onmicrosoft.com SMTP address.
  • The proxy address <domain>.mail.onmicrosoft.com is not synced to Office 365 on the corresponding cloud mail-user object.

It’s important to add the proxy address <domain>.mail.onmicrosoft.com to the mailboxes. If you don’t do that, you can’t proceed further. The mailbox migration will fail. The fastest way to solve this is to bulk add the <domain>.mail.onmicrosoft.com to all the mailboxes.

Get list mailboxes without <domain>.mail.onmicrosoft.com SMTP address

Run Exchange Management Shell as administrator and connect to the on-premises Exchange Server. List all the mailboxes with the missing <domain>.mail.onmicrosoft.com SMTP address.

In my example, <domain>.mail.onmicrosoft.com is the exoip.mail.onmicrosoft.com address. Change exoip to the name of your tenant.

Get list mailboxes with <domain>.mail.onmicrosoft.com SMTP address

Do you like to have a list with all the mailboxes that have the <domain>.mail.onmicrosoft SMTP address? Change -NotLike to -Like and run the cmdlet.

We know why the error target mailbox doesn’t have an SMTP proxy matching is showing. We listed which mailboxes are missing the SMTP address. In the next step, we are going to bulk add the missing SMTP address to the mailboxes.

Bulk add <domain>.mail.onmicrosoft.com SMTP address with PowerShell

We have two options to set the <domain>.mail.onmicrosoft.com SMTP address to all the mailboxes.

Option 1: Bulk add <domain>.mail.onmicrosoft.com SMTP with two PowerShell cmdlets

Run the following two cmdlets to set the alias@domain.mail.onmicrosoft.com as a secondary SMTP address.

Option 2: Bulk add <domain>.mail.onmicrosoft.com SMTP with PowerShell script

Create two folders with the name scripts and temp in the C: drive. Download the PowerShell script Add-onmicrosoft-SMTP.ps1 and place it in C:\scripts folder. You can copy the below code and paste it in Notepad. Save the file as Add-onmicrosoft-SMTP.ps1 in the C:\scripts folder. After running the script, the output will be logged to the temp folder with the file name Add-onmicrosoft-SMTP.log.

Let’s see the PowerShell script in action. Run Exchange Management Shell as administrator. Change the directory to the scripts folder and run the script. The PowerShell script will go through the Exchange On-premises mailboxes and add the <domain>.mail.onmicrosoft.com to every mailbox as a secondary SMTP address.

The last step is to verify the results and to make sure that we will not see the error target mailbox doesn’t have an SMTP proxy matching when migration mailboxes to Exchange Online.

Verify the results

If you used option 2 to set the <domain>.mail.onmicrosoft.com SMTP with the PowerShell script, check the log file. Go to the C:\temp folder and open the file Add-onmicrosoft-SMTP.log with the application Notepad.

Target mailbox doesnt have an SMTP proxy matching log

Run the cmdlet to check if there are mailboxes configured without the SMTP <domain>.mail.onmicrosoft.com. The output is empty after running the cmdlet. That’s because all the mailboxes are configured with the <domain>.mail.onmicrosoft.com.

Did it help you to solve the error target mailbox doesn’t have an SMTP proxy matching?

Read more: Complete migration batch with PowerShell »

Conclusion

In this article, you learned why the error target mailbox doesn’t have an SMTP proxy matching is showing. Add the <domain>.mail.onmicrosoft.com SMTP to the mailboxes with the PowerShell cmdlets showing in this article. After setting the SMTP address, run Azure AD Connect to sync the on-premises environment with the cloud. Move the mailbox to Exchange Online and have a look at the move request. This time the error is not showing anymore.

Did you enjoy this article? You may also like Get move request batch in Exchange Online. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect and IT Consultant. His specialism is designing and building complex enterprise environments. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has 0 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top