Resolved mailbox migration error: “Target Mailbox Doesn’t Have an SMTP Proxy Matching”

Sarthak Poswal
Sarthak Poswal

Updated On - June 13, 2024

Summary: Sometimes moving a mailbox from Exchange on-premises to Exchange Online in a hybrid environment is interrupted by an error “Target Mailbox Doesn’t Have an SMTP Proxy Matching”. In this blog, we will understand the possible cause behind this error and resolve it using two prominent manual methods. Additionally, we recommend using an automated tool Recoveryfix for Exchange Server to facilitate an accessible mailbox migration.

Download Free

Advancement in cloud computing is compelling numerous enterprises to migrate their email communication process to online since the features in cloud-based environment have become more reliable than the offline versions .

One of the robust online email cloud services is Exchange Online offered by Microsoft, which is an online adaptation of their offline Exchanger On-premises Server. The Exchange Server is used for managing email communication within an enterprise. Most of the Fortune 500 companies rely on Exchange Server for their day-to-day emailing.

A hybrid Exchange environment accommodates both the Exchange on-premises and Exchange online, occasionally, users move their mailbox from one to another. But sometimes the process is halted by an error message stating:

“Target Mailbox Doesn’t Have an SMTP Proxy Matching”

The occurrence of such an error in the middle of mailbox migration can raise concerns among the users regarding their data. Moving further, in this blog we will discuss how to fix mailbox migration error “Target Mailbox Doesn’t Have an SMTP Proxy Matching”.

Reasons to get “Target Mailbox Doesn’t Have an SMTP Proxy Matching” error?

Before initiating the solution let us first understand why we are presented with the error “Target Mailbox Doesn’t Have an SMTP Proxy Matching”. Having one of the below conditions may welcome this error:

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

This error basically means that either the mailbox on Exchange On-premises or Exchange Online is missing a mail of format a<domain>.mail.onmicrosoft.com smtp address.
Next section of this blog will help you to identify if the mail is missing from the on-premises server or the online server and discuss the concise manual methods to resolve the error. If the upcoming process reveals that the mail is present in both servers offline and online, then you are facing a synchronization issue between the servers.

Resolving the Mailbox Migration Error

To remove the error “Target Mailbox Doesn’t Have an SMTP Proxy Matching”, we must make sure the availability of the missing email address in both the source and destination Exchange server mailbox. We can achieve this through the Exchange Management Shell (EMS) or the Exchange Admin Center (EAC).

Identify the source of error

First, we need to identify if the mailbox is missing from the on-premises Exchange Server or Exchange Online. To find it we must run the following commands on the on-premises server and Online server.

Run the following cmdlet on Exchange Management Shell on the on-premises Exchange Server:

  • Get-Mailbox <AffectedUser> | FL EmailAddresses, EmailAddressPolicyEnabled
  • Run the following cmdlet on Exchange Online PowerShell:

  • Get-MailUser <AffectedUser> | Select -ExpandProperty emailaddresses

Note: Replace the <AffectedUser> with the user facing the issue. And remember to do the same for all the upcoming commands.

Executing the above two commands presents us with a situation which compels us to discuss further solutions in context to two states. State 1 will address the absence of mail in Exchange on-premises while state 2 will address the solution for mail missing in Exchange Online.

State 1. Mailbox is missing from Exchange On-premises

We must add the a<domain>.mail.onmicrosoft.com email in the Exchange on-premises mailbox to resolve the error “Target Mailbox Doesn’t Have an SMTP Proxy Matching”. However, here also we have 2 conditions and will discuss each one below.

Condition 1. EmailAddressPolicyEnabled is True

In this case, the email address doesn’t contain the secondary SMTP a<domain>.mail.onmicrosoft.com domain in the email address policy template. In this case, add a<domain>.mail.onmicrosoft.com to the email address policy with the following steps:

  1. Open the Exchange Admin Center on the on-premises Exchange server.
  2. Click Mail flow, and then click Email address policies.
  3. Select the email address policy that you want to change, and then click Edit.
  4. In email address format, add the domain (a<domain>.mail.onmicrosoft.com) to the policy, click Save, and then click apply to for saving the change to the recipients.
  5. To verify the update run the cmdlet:

    Get-Mailbox <AffectedUser> | FL EmailAddresses, EmailAddressPolicyEnabled

Condition 2. EmailAddressPolicyEnabled is False

In this condition also you must manually include the a<domain>.mail.onmicrosoft.com email address like before but with a different procedure. Follow the steps below to do add the email:

  1. Open the Exchange Admin Center on the on-premises Exchange server.
  2. Click recipients, and then click mailboxes.
  3. Select and double-click the on-premises mailbox that you want to change.
  4. In email addresses, click the add icon () to add a<domain>.mail.onmicrosoft.com email address to the user’s email addresses.
  5. Click OK, and then Save.
  6. You should now see the a<domain>.mail.onmicrosoft.com stamped on the on-premises mailbox when you run the following command:

    Get-Mailbox <AffectedUser> | FL EmailAddresses

State 2. Email address missing from Exchange Online

If you are missing the email template a<domain>.mail.onmicrosoft.com from the Exchange Online, then you can run the cmdlets below to get information for resolving the issue.

  • Users using MSOnline (MSOL) service PowerShell module, use the following command to retrieve information regarding any error with a user account:

    • (Get-MsolUser -UserPrincipalName <AffectedUser>).Errors.ErrorDetail.ObjectErrors.ErrorRecord.ErrorDescription
  • User using Microsoft Entra ID PowerShell module, use the following command to retrieve information regarding any error with a user account:
    • (Get-AzureADUser -ObjectId <AffectedUser>).Errors.ErrorDetail.ObjectErrors.ErrorRecord.ErrorDescription

Note: In both the cmdlets replace the <AffectedUser> with the user for which you are getting the SMTP error.

Now we will check if the a<domain>.mail.onmicrosoft.com email is present in Microsoft 365 with the following cmdlets:

Again, for users utilizing the MSOnline (MSOL) service PowerShell module, use the following command

(Get-MsolUser -UserPrincipalName <AffectedUser>).ProxyAddresses

And for users with Microsoft Entra ID PowerShell module, use the following command

(Get-AzureADUser -ObjectId <AffectedUser><AffectedUser>).ProxyAddresses

The above two commands will return the proxy address associated with the user specified. In the proxy address list look for the a<domain>.mail.onmicrosoft.com. If it’s in the list, then the email is present online but due to a synchronization issue is not updated in Exchange. Resynchronization will resolve the issue.

Conclusion

Abrupt termination of a migration job can lead to data loss if not handled correctly. The solution mentioned in this article will help you in resolving the “Target Mailbox Doesn’t Have an SMTP Proxy Matching” error in Exchange. However, if for any reason the issue persists you must take assistance from a professional tool for a seamless migration.
Recoveryfix for Exchange Server is a tool empowered with advanced features which can facilitate an accessible migration of Exchange and aids in Exchange EDB file recovery. Some of the unparallelled features offered by this tool:

Download Free

  • Migrate mailbox items to Office 365, Outlook profile, and Live Exchange.
  • Export mailbox items to PST, EML and MSG.
  • Recover deleted Exchange mailbox and public folders.
  • User-friendly interface for improved accessibility.

Related Posts