Following on from the previous post Exchange 2013 Initial Configuration Settings: Setting SMTP accepted domains (Part 1) , in this second part of a series I’ll look at setting up an email address policy.
Until you create a new email address policy any recipients (users, resources, contacts, groups) you create will get their email address from the default email address policy. Therefore we’ll create a new email address policy with settings that we want before creating new recipients.
Another reason for having it in place before you create recipients is in large environments applying an email address policy can take a long time depending on the number of recipients it effects.
1. In the Exchange admin center (https://localhost/ecp) click mail flow from the left hand menu and then click on email address policies.
2. Click the + symbol to create a new email address policy.
You’ll now see the email address policy has been applied.
If you check your recipients, you should see that their email addresses have changed (you may have to click the refresh icon).
Exchange Management Shell
As you look through other posts on the site you’ll see there is a lot of PowerShell and Exchange PowerShell, so to perform the same steps above in PowerShell we’ll need to use the Exchange Management Shell and the following cmdlets, Get-EmailAddressPolicy, New-EmailAddressPolicy and Update-EmailAddressPolicy.
Remember in PowerShell to search for a command you can use Get-Command *emailaddress* or GCM *emailaddress* to list all the cmdlets that contain the phrase emailaddress.
To view help you can use Get-Help before any command, and you can append -examples, -detailed, -full, -online for further information.
Note: To perform the tasks below I’ve removed the email address policy created in the Exchange admin center.
Lists and returns attributes of existing email address policies.
Creates a new email address policy.
To create the same policy in PowerShell we’ll use the following command.
New-EmailAddressPolicy -Name OxfordSBSGuy -EnabledPrimarySMTPAddressTemplate “SMTP:%g.%[email protected]” -IncludedRecipients AllRecipients -Priority 1
Now let’s use Get-EmailAddressPolicy to confirm the policy has been created and to find out whether it has been applied or not. You can use Get-EmailAddressPolicy | fl or format-list to list all the attributes to a policy.
Get-EmailAddressPolicy | ft Name, Priority, RecipientFilter, RecipientFilterApplied
We’ll use Update-EmailAddress Policy to apply it to the recipients. Type the following command:
Update-EmailAddressPolicy -Identity OxfordSBSGuy
Finally we’ll use Get-EmailAddressPolicy again to confirm it has been applied.
In the next part of the series we’ll look at renaming and moving the default mailbox database and logs.
For the other articles in this series please go to:
- Exchange 2013 Cumulative Update installation tips and best practices
- How to install Exchange 2013 (SP1) on Windows Server 2012 R2
- Exchange 2013 Initial Configuration Settings
- Exchange 2013 Initial Configuration Settings: Setting SMTP accepted domains (Part 1)
- Exchange 2013 Initial Configuration Settings: Setting email address policies (Part 2)
- Exchange 2013 Initial Configuration Settings: Rename and move the default mailbox database and logs (Part 3)
- Exchange 2013 Initial Configuration Settings: Change mailbox size limits (Part 4)
- Exchange 2013 Initial Configuration Settings: Create a send connector (Part 5)
- Exchange 2013 Initial Configuration Settings: Set the offline address book (Part 6)
- Exchange 2013 Initial Configuration Settings: Enter the Product Key (Part 7)
- Exchange 2013 Initial Configuration Settings: How to configure a Postmaster Address (Part 8)
- Exchange 2013 Initial Configuration Settings: How to change the FQDN on the default frontend receive connector (Part 9)
- Exchange 2013 Initial Configuration Settings: How to configure the virtual directories (part 10)
- Create and apply an SSL certificate (work in progress)