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>’. 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> SMTP address.
  • The proxy address <domain> is not synced to Office 365 on the corresponding cloud mail-user object.

It’s important to add the proxy address <domain> 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> to all the mailboxes.

Get list mailboxes without <domain> SMTP address

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

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

Get list mailboxes with <domain> 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> SMTP address with PowerShell

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

Option 1: Bulk add <domain> SMTP with two PowerShell cmdlets

Run the following two cmdlets to set the as a secondary SMTP address.

Option 2: Bulk add <domain> 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> 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> 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> The output is empty after running the cmdlet. That’s because all the mailboxes are configured with the <domain>

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

Read more: Complete migration batch with PowerShell »


In this article, you learned why the error target mailbox doesn’t have an SMTP proxy matching is showing. Add the <domain> 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 is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has 0 Comments

Leave a Reply

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

Back To Top