How to control which aliases are visible in the drop-down menu of the Email Alias Manager add-in

Abstract

You have Email Alias Manager for Exchanger installed and now want to control which aliases your end users can see in their Outlook.

Details

The first step to adding the registry keys is to create the paths according to the bitness of your operating system and Outlook. Please note that if the setting is present in HKEY_CURRENT_USER then it completely replaces the setting in HKEY_LOCAL_MACHINE.

The following steps involve modification to the registry. Serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base: 322756

How to back up and restore the registry in Windows

Example 1: to include all addresses with the domain "youralias.com" enter the value *@youralias.com
he drop-down in Outlook will look like this:
If you are unsure whether you are using a 32-bit or 64-bit version, please follow the steps below: 64-bit Operating System running 32-bit Outlook:
  • For all users: HKLM\Software\Wow6432Node\Exclaimer Ltd\Email Alias Manager\Settings
  • Per user: HKCU\Software\Exclaimer Ltd\Email Alias Manager\Settings
64-bit Operating System running 64-bit Outlook:
  • For all users: HKLM\Software\Exclaimer Ltd\Email Alias Manager\Settings
  • Per user: HKCU\Software\Exclaimer Ltd\Email Alias Manager\Settings
32-bit Operating System:
  • For all users: HKLM\Software\Exclaimer Ltd\Email Alias Manager\Settings
  • Per user: HKCU\Software\Exclaimer Ltd\Email Alias Manager\Settings
Now that you have created the paths in the registry you can add the keys:
  • DWORD called IncludeADProxyAddresses
  • Multi-String called IncludePatterns
  • Multi-String called ExcludePatterns
NOTE: Outlook will need to be restarted for these changes to take effect

IncludeADProxyAddresses

If set to 0, the code will not read any proxy addresses (i.e. aliases) from the Active Directory and the only available address will be the user’s primary SMTP address. If set to 1 (default), the code will include all the proxy addresses from the Active Directory.

IncludePatterns

All proxy addresses from the Active Directory will be passed through this list of filter patterns, and only those that match will go on to the next stage. The default pattern is *@*.

NOTE:
The user's primary SMTP address will always be displayed.

Imagine your user's aliases are as follows:

Image 208

Example 1: to exclude all addresses with the domain "youralias.com" enter the value *@youralias.com.

Image 221
The drop-down in Outlook will look like this:

Image 222
Example 2: to include all of a user's addresses where the domain contains "youralias." enter the value *@youralias*.

Image 209
The drop-down in Outlook will look like this: 

Image 210
Example 3: to include all addresses where the user name contains "john@" enter the value john@*.

Image 211
The drop-down in Outlook will look like this:

Image 212

ExcludePatterns

All proxy addresses that have survived the IncludePatterns phase are passed through this list of patterns and all those that match will be removed from the list of addresses. The default pattern is (empty), i.e. no exclusions apply.

NOTE: even an empty ExcludePatterns key in HKCU will override the ExcludePatterns key in HKLM. You will need to rename or delete this key in HKCU if you want the settings of the HKLM key to apply.

Example 1: to exclude all addresses with the domain "youralias.com" enter the value *@youralias.com

Image 213
The drop-down in Outlook will look like this:

Image 214
Example 2: to exclude all of a user's addresses where the domain contains "youralias." enter the value *@youralias.*

Image 215
The drop-down in Outlook will look like this:

Image 216
Example 3: to exclude all addresses where the user name contains "john@" enter the value * john@*

Image 217
The drop-down in Outlook will look like this:

Image 218
NOTE: you cannot exclude the user's primary SMTP address.

Wild cards

In the IncludePattern and ExcludePattern sections, wild cards (*) will be supported in both the local part and domain part of the address. Strings that do not contain the @ symbol will be treated as a domain part with a full wild card in the local part.

Regular Expressions

It is also possible to use regular expressions in these keys by starting the string with the prefix regex:

Example: to remove all aliases with a user name separated by a dot enter the value regex:\..*@ Image

Image 219
The drop-down in Outlook will look like this:

Image 220
More details on regular expressions can be found here.