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.).

681-1
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

  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.).

681-2
Fig. 2. Finding the primary SMTP address in the Exchange admin center.

Important

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

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. 3.), this means that the SmtpAddress value above shows the primary SMTP address.

681-3
Fig. 3. 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. 4.) is the primary SMTP address.

681-4
Fig. 4. Identifying the primary SMTP address.

How to set the primary SMTP address

  • Exchange 2013 and newer (including Exchange Online)

  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. 5.). If you don’t see the desired SMTP address, click the + button and add a new SMTP address.

681-5
Fig. 5. 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. 6.).

681-6
Fig. 6. Changing the primary SMTP address.

Important (applies only to on-premises Exchange servers)

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

  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 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. 7.).

681-7
Fig. 7. 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. 8.).

681-8
Fig. 8. Adding a new SMTP email address.

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

681-9
Fig. 9. 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. 9.).

  1. Click Apply and OK.

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