Knowledge Base

How to fix problems related to the primary SMTP address in CodeTwo software

Problem:

When using CodeTwo tools to migrate or back up your data, you receive the following error:

The primary SMTP address must be specified when referencing a mailbox.

Solution:

When creating a new migration or backup job, you specify which mailboxes you want to migrate or back up by their primary SMTP address, shown in the software. The above error shows up when you change this address on the target server while the migration or backup process is already running. You will also get this error in CodeTwo migration tools if you manually provide an email address that is not the primary SMTP address in the Mailbox matching step (Fig. 1.)Providing the target mailbox address manually in CodeTwo Exchange Migration.

Providing the target mailbox address manually in CodeTwo Exchange Migration.
Fig. 1. Providing the target mailbox address manually in CodeTwo Exchange Migration.

The primary SMTP address may change automatically when you implement a new Email Address Policy or change the domain name. For example, in the case of Office 365, you might receive this error when switching from a default domain (@my-company.onmicrosoft.com) to a custom one (@my-company.com).

To troubleshoot this problem:

How to check the primary SMTP address of a mailbox

To check which SMTP address is set as the primary one for a given mailbox, you can use:

Checking SMTP addresses in the Exchange admin center

  • On-premises Exchange Server
  1. Sign in to your Exchange admin center.
  2. Go to recipients > mailboxes and check the email address shown in the EMAIL ADDRESS column. This is the primary SMTP address (Fig. 2.).

Finding the primary SMTP address in the Exchange admin center – on-premises Exchange server.
Fig. 2. Finding the primary SMTP address in the Exchange admin center – on-premises Exchange server.

Important

If you’re using Exchange Server 2010, go to Users & Groups > Mailboxes instead.

  • Exchange Online (Office 365)
  1. Sign in to your Exchange admin center.
  2. Go to Recipients > Mailboxes and check the email address shown in the Email address column. This is the primary SMTP address (Fig. 3.).

Finding the primary SMTP address in the Exchange admin center – Exchange Online.
Fig. 3. Finding the primary SMTP address in the Exchange admin center – Exchange Online.

Checking SMTP addresses in a shell environment

  • On-premises environments
  1. Open the ems Exchange Management Shell and enter the following command:
    Get-Mailbox -Identity <username> | select -expand emailaddresses alias
    You can omit the -Identity parameter (together with the <username> value) if you want to check the primary SMTP addresses for all mailboxes.
  1. Check the results. If the IsPrimaryAddress value is true (Fig. 4.), this means that the SmtpAddress value above shows the primary SMTP address.

Checking which email address is the primary SMTP address.
Fig. 4. Checking which email address is the primary SMTP address.

  • Office 365
  1. Connect remotely to Office 365 via ps Windows PowerShell (learn here how to do so).
  2. Enter the following command:
    Get-Mailbox -Identity <username> | select -expand emailaddresses alias
  1. Check the results. An email address preceded by the upper-case SMTP prefix (Fig. 5.) is the primary SMTP address.

Identifying the primary SMTP address.
Fig. 5. Identifying the primary SMTP address.

How to set the primary SMTP address

  • Exchange 2013 and newer
  1. Sign in to your Exchange admin center.
  2. Go to recipients > mailboxes and double-click the user whose primary email address you want to change. The Edit User Mailbox window will open.
  3. Click email address on the left and double-click the SMTP address that you want to set as primary (Fig. 6.). If you don’t see the desired SMTP address, click the + button and add a new SMTP address.

A list of all email addresses assigned to a mailbox.
Fig. 6. A list of all email addresses assigned to a mailbox.

  1. In the window that opens, select the Make this the reply address checkbox (Fig. 7.).

Changing the primary SMTP address.
Fig. 7. Changing the primary SMTP address.

Important (applies only to on-premises Exchange servers)

If you don’t see the checkbox shown in Fig. 7., you first need to clear the Automatically update email addresses based on the email address policy applied to this recipient checkbox (Fig. 6.).

  1. Click ok. The primary SMTP address will be in bold and preceded by the upper-case SMTP prefix. Click save to apply the changes.

The selected SMTP address is now set as a primary email address.

  • Exchange Online Office 365 
  1. Sign in to your Exchange admin center.
  2. Go to Recipients > Mailboxes and double-click the user whose primary email address you want to change.
  3. In the pane that opens click Manage email address type (as shown in Fig. 8.).

Selecting a user and editing the SMTP email address.
Fig. 8. Selecting a user and editing the SMTP email address.

  1. Click Add email address type (Fig. 9.).

Adding a new SMTP address.
Fig. 9. Adding a new SMTP address.

  1. Make sure the SMTP address type is selected. Enter the new email address in the provided field and select a domain from the drop-down menu (Fig. 10.).

Configuring the new SMTP address.
Fig. 10. Configuring the new SMTP address.

  1. Select the Make this the reply address checkbox and click OK.
  2. Click Save to confirm changes and then Close when the email has been added.

The added SMTP address is now set as a primary email address.

  • Exchange 2010
  1. Open the Exchange Management Console.
  2. In the left pane, navigate to Microsoft Exchange On-Premises > Recipient Configuration.
  3. In the center pane, right-click the user for whom you want to change the primary email address and select Properties (Fig. 11.).

Locating a user in the Exchange Management Console.
Fig. 11. Locating a user in the Exchange Management Console.

  1. Open the E-Mail Addresses tab. You will see a list with all email addresses. Those in bold are the primary ones. If you don’t see the desired SMTP address, click the Add button, select SMTP Address and in the window that opens provide a new email address (Fig. 12.).

Adding a new SMTP email address.
Fig. 12. Adding a new SMTP email address.

  1. Select the SMTP address that you want to set as primary and click Set as Reply (Fig. 13.).

Setting a primary SMTP address.
Fig. 13. Setting a primary SMTP address.

Important

If the Set as Reply button is unavailable, you need to clear the Automatically update e-mail addresses based on e-mail address policy checkbox (Fig. 13.).

  1. Click Apply and OK.

The selected SMTP address will now be your primary email address.

Was this information useful?