skip to Main Content

Create email address policy in Exchange Server

In our previous article, we created a send connector in Exchange. Our next step is to create an email address policy in Exchange Server. An email address is required for emails to be sent and received by a recipient. This article will show how to create an email address policy in Exchange Admin Center and PowerShell.

Configure email address policy in Exchange Server

Sign in to Exchange Admin Center (EAC). Navigate to mail flow > email address policies. A default email address policy is created by default when installing Exchange Server. Click the + icon to add a new email address policy.

Create email address policy Exchange 2016 create new

Give the policy a name. When done, click the + icon to add the email address format.

Create email address policy Exchange 2016 insert name

Select an accepted domain. Click the email address format John.Smith@contoso.com. That’s because we like to have the email addresses showing as First.Lastname@domain.com. Click Save.

Note: You cannot select an accepted domain if you don’t have it configured. Read the article Add accepted domain in Exchange Server.

Create email address policy Exchange 2016 email address format

The email address format is added. Keep the rest as default. Click Save.

Create email address policy Exchange 2016 finish

A warning message shows up. Click OK.

Warning
The policy isn’t active yet. Click Apply in the details pane to apply this email address policy.

Create email address policy Exchange 2016 warning when finished

Click on the policy that you created. Click Apply in the right panel.

Create email address policy Exchange 2016 apply

A warning message shows up that it will may take a long time. Click Yes.

Create email address policy Exchange 2016 apply warning

The email address policy is applied. Click Close.

Create email address policy Exchange 2016 completed

Verify email address policy has been applied

Go to mail flow > email address policies. Click the policy that you configured in the earlier step. Confirm in the right panel that this email address policy has been applied.

Create email address policy Exchange 2016 policy applied

Go to recipients > mailboxes. Click a user mailbox and click the edit icon.

Click the email address in the left pane and confirm that you see the type SMTP and email address First.Lastname@domain.com.

Note: The primary SMTP address will show as capital letters “SMTP”. The secondary SMTP addresses will show up in small “smtp” letters.

Create email address policy in Exchange Server with PowerShell

Let’s speed it up and do the same as we did in the previous step, but this time with PowerShell. Run Exchange Management Shell as administrator. Make use of the New-EmailAddressPolicy cmdlet and Update-EmailAddressPolicy cmdlet.

[PS] C:\>New-EmailAddressPolicy -Name "Exoip Main Policy" -IncludedRecipients "AllRecipients" -Priority "1" -EnabledEmailAddressTemplates "SMTP:%g.%s@exoip.com"

Name              Priority RecipientFilter
----              -------- ---------------
Exoip Main Policy 1        Alias -ne $null


[PS] C:\>Update-EmailAddressPolicy -Identity "Exoip Main Policy"

Get the configured email address policies in Exchange Server.

[PS] C:\>Get-EmailAddressPolicy

Name              Priority RecipientFilter
----              -------- ---------------
Default Policy    Lowest   Alias -ne $null
Exoip Main Policy 1        Alias -ne $null

That’s it!

Keep reading: Automatically update email addresses based on email address policy »

Conclusion

You learned how to create an email address policy in Exchange Server. This can be done in Exchange Admin Center and PowerShell. First, make sure that you add an accepted domain before creating an email address policy. Then, don’t forget to apply the policy. Find more information regarding email address policies in Exchange Server at Microsoft Docs.

Did you enjoy this article? If so, you may like Whitelist domain in Office 365 to bypass SPAM filtering. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

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 2 Comments

  1. Hi Ali,

    Is there a way a script can be scheduled to run every 5 hours to update/refresh email address policy for all users mailboxes?

    I tried scheduling the following script in Task scheduler and ran the task manually. It starts and the even ID shows completed successfully after a minute. But even after a couple of hours when i check a specific mailbox to which i’m aware of that the mail address should change/update, i don’t see any change/update.

    But when i manually execute the following script, it runs for about 40 mins in my Exchange environment and I can see it working, and on completion, the mailbox i expect to see a change/update – it does reflect it.

    I’m not sure what i may be doing wrong in the task scheduler. I’m running Exchange Server 2016 CU23 on Windows Server 2016 Standard.
    Can you please help out here? Is there an article of yours on this which already exist?

    ##########################################
    #Connect to EMS
    ##########################################
    
    #Add Exchange snapin if not already loaded in the PowerShell session
        if (Test-Path $env:ExchangeInstallPath\bin\RemoteExchange.ps1)
        {
    	    . $env:ExchangeInstallPath\bin\RemoteExchange.ps1
    	    Connect-ExchangeServer -auto -AllowClobber
        }
    
    
    #####################################################################################
    #Refresh the "Automatically update email addresses based on the email address policy"
    #####################################################################################
    
    Set-ADServerSettings -ViewEntireForest $true
    
    Get-EmailAddressPolicy | Update-EmailAddressPolicy
    
    exit
    1. Hi there,

      I created a scheduled task with an action to the script, which works fine.

      Run the task from the task scheduler and check the “Last Run Result”. It will tell you the error code, and that will be easier for you to identify why it’s not working.

Leave a Reply

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