IT tutorials
 
Technology
 

Microsoft Exchange Server 2013 : Email address policies (part 4) - Creating email address policies with custom filters

4/20/2014 9:17:41 PM
- Windows 10 Product Activation Keys Free 2019
- How to active Windows 8 without product key
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

Creating email address policies with custom filters

Why would you need to use EMS to create a recipient filter for an email address policy? The need to use EMS probably will not arise very often. The most common reason is that you want to filter based on a property that is not exposed in the EAC user interface (UI).

This requirement can be handled by creating an email address policy with a custom filter using the New-EmailAddressPolicy cmdlet. In this situation, the syntax rules are the same as those used to specify recipient filters for dynamic distribution groups, so the filters you can create are very flexible. For example, assume that you want to create an email address policy that applies to mailbox users in the Dublin office only. You could use New-EmailAddressPolicy to create the new policy and then immediately apply it to the matching recipients with Update-EmailAddressPolicy. Note that before Exchange will accept the value used here for the primary SMTP address template (@dublin.contoso.com), this domain must be created as an accepted domain for the organization.

New-EmailAddressPolicy –Name 'Dublin Office Users' –RecipientFilter {City –eq 'Dublin' –and RecipientTypeDetails –eq 'UserMailbox'}
–EnabledPrimarySMTPAddressTemplate 'SMTP:%g.%s@dublin.contoso.com' –Priority 2 Update-EmailAddressPolicy –id 'Dublin Office Users'

Two big issues come into focus here. First, it’s easy to create an email address policy that contains a recipient filter that never applies to any object. This happens if you specify a property Exchange cannot use to filter recipients or if you just create an incorrect filter. One way around this problem is to test the filter you propose to use by inputting it to the Get-Recipient cmdlet on the basis that if the filter returns the correct object set when used with Get-Recipient, it will generate similar results for an email address policy. For example:

Get-Recipient –RecipientPreviewFilter "City –eq 'Dublin' –and RecipientType –eq 'UserMailbox'"

Second, unlike the email address policies so far considered, policies created in this manner have a custom recipient filter. You cannot edit these policies with EAC afterward, so if you need to update the recipient filter subsequently, you will have to do it by writing a new recipient filter with the Set-EmailAddressPolicy command. Figure 5 shows how EAC recognizes that an email address policy has a custom filter that it cannot edit and the very useful preview facility that enables you to see exactly which objects Exchange will update with new email addresses when the filter is applied.

EAC includes a preview function to show administrators exactly which recipients will come under the control of an email address policy. This is especially useful when the policy contains conditional statements, such as the one illustrated here, which looks for mailboxes that have Dublin in their City attribute. When you view the details of the policy you just created, you can see that Exchange has generated the appropriate LDAP filter and that the RecipientFilterType is now Custom.

Figure 5. Previewing the effect of the filter contained in an email address policy

The ability of Exchange to send messages was originally based on X.400, but it now has a firm preference for SMTP, and this preference is reflected in the fact that the primary and sometimes only email address assigned to mail-enabled objects is an SMTP address. However, over its lifetime, Exchange has supported many types of email addresses to permit interoperability with foreign email systems such as Novell GroupWise.

Each email address format is defined to Exchange in its configuration data. The entry for an address format stores details of the dynamic link library (DLL) that Exchange calls to create addresses in the format. Out of the box, Exchange 2013 provides DLLs for SMTP, Lotus Notes, and X.400 format addresses. Figure 6 shows details of the Notes address format as viewed through ADSIEdit. The DLL Exchange calls to generate email addresses of this type is ntspxgen.dll (highlighted), which must be available to Exchange in the \v15\mailbox\address\ directory.

A screen shot from the ADSIEdit utility to show how Exchange holds information about the Lotus Notes address format in its configuration data. The highlighted value shows that ntspxgen.dll is required to generate proxy addresses for objects in this format.

Figure 6. Viewing the details of the Notes email address format

Software vendors that provide solutions that integrate with Exchange and require a specific email address format must include their own custom DLL to enable Exchange to incorporate email addresses of the format into email address policies and generate the appropriate proxy addresses for the objects that fall under the scope of the policies. Sometimes this detail is omitted, and you’re then forced to consider how to create and maintain the required addresses without using email address policies.

One approach that has been successfully used is to generate and apply the set of required proxy addresses to objects though EMS scripts. This approach works but, because it is manual, not integrated into the Exchange management framework, and prone to error, it is an approach that should be used only when it is impossible to manage proxy addresses through email address policies for some reason.

Controlling Update-EmailAddressPolicy

The Exchange 2013 version of the Update-EmailAddressPolicy cmdlet supports the UpdateSecondaryAddressesOnly parameter. This switch tells Exchange to leave primary email addresses untouched when the cmdlet runs and to update secondary email addresses only. You might need to use this capability if you synchronize Exchange with a foreign email system and want to be sure that the primary addresses are never updated because they are used as the link to that system.

 
Others
 
- Microsoft Exchange Server 2013 : Email address policies (part 3) - Focusing on certain recipients by using filters
- Microsoft Exchange Server 2013 : Email address policies (part 2) - Creating a new email address policy
- Microsoft Exchange Server 2013 : Email address policies (part 1) - Email policy priority
- Using Office applications with SharePoint 2013 : Using SkyDrive Pro with SharePoint, Using Office Web Apps with SharePoint
- Using Office applications with SharePoint 2013 : Using form libraries, Integrating Project with SharePoint
- Using Office applications with SharePoint 2013 : Integrating Outlook with SharePoint
- Using Office applications with SharePoint 2013 : Integrating OneNote with SharePoint
- Using Office applications with SharePoint 2013 : Integrating Access with SharePoint - Moving Access data into SharePoint lists
- Using Office applications with SharePoint 2013 : Integrating Excel with SharePoint (part 3) - Analyzing SharePoint list data in Excel
- Using Office applications with SharePoint 2013 : Integrating Excel with SharePoint (part 2) - Importing Excel data into a SharePoint list
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
programming4us programming4us
 
Popular tags
 
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS