Recently someone asked me to explain how to automatically generate a secondary SMTP e-mail address for his users....
Fortunately, this is fairly easy to do. Before I explain how to do this, however, I want to mention that a DNS server must be configured with an MX record so that mail destined for the alternate e-mail addresses will end up at your server.
For example, I have an @brienposey.com e-mail address and an @relevanttechnologies.com e-mail address. Although different domains are used, the DNS MX records send mail destined for either domain to the same Exchange Server.
Now let's take a look at the configuration that needs to occur on the Exchange box. Assigning a secondary e-mail address is done by modifying the server's recipient policy. If you open the Exchange System Manager, you can find the recipient policies by navigating to Recipients | Recipient Policies. When you do, the server's recipient policies will be displayed in the column to the right. Right click on a recipient policy and select the Properties command from the resulting shortcut menu to reveal the policy's properties sheet.
At this point, select the e-mail addresses (Policy) tab and you will see all of the addresses that are inherited by those users that the policy applies to. If you want to create a secondary SMTP address, click the New button and follow the prompts. When you are prompted to enter the new address, you would normally enter @yourdomain.com. The resulting e-mail addresses would be the user's logon name followed by @yourdomain.com. There are a few tricks that you can use to alter the address format. Exchange uses the %G variable to represent a user's first name, %S to represent the last name, and %D to represent the full name with middle initial. Therefore, entering the e-mail address as %G_%S@yourdomain.com would produce e-mail addresses in the format firstname.lastname@example.org.
Another trick that you can use is to put a number in front of the variable to indicate how many characters that you want to use. For example, if you wanted the e-mail addresses to be made up of the user's first initial and last name, you could use %1G%S@yourdomain.com.
This technique works well if you want the secondary address to apply to everyone. But what if you only want to apply the address to a subset of your users? To do so, you need to create a new recipient policy. When doing so, you would assign a filter to the policy so that it applies only to the desired users. You would then assign the desired address to the new recipient policy. Because the existing recipient policy still applies, the user's original e-mail address will still be valid.
To create a filtered recipient policy, right click on the Recipient Policies container and select the New | Recipient Policy commands from the resulting shortcut menus. When you do, you will be asked if the new policy will be an e-mail address policy or a mailbox manager policy. Choose the E-Mail Address option and click OK. You will now be prompted to enter a policy name. Enter something meaningful and then click the Modify button to reveal the Find Exchange Recipients properties sheet.
The properties sheet's General tab contains some check boxes that you can use to narrow down who the new policy will apply to. You can also use the Storage tab to designate the server or the store that the policy will apply to. More than likely, though, you will have to use the Advanced tab to select which user attributes the filter should check to see whether or not the policy should apply to each user. For example, you could make the policy to apply to all users within a specific department or all of the users at a specific postal address. Unfortunately, the filter does not allow you to filter by OU.
After setting up the filter, use the Find Now button to test the policy to see which users it will apply to. Once you are satisfied with the results, click OK to return to the recipient policy's properties sheet. The only thing left to do is to select the E-Mail Addresses (Policy) tab and enter the new E-mail address. In most cases, the E-Mail Addresses (Policy) tab will show both the original and the new SMTP addresses. It is important that you designate the primary SMTP address. To do so, just select the appropriate address and click the Set as Primary button.
If you want you can select the Details tab and write yourself a note regarding what the policy does and who it applies for. Once you are satisfied with the new policy, click OK to create it. Click OK to create the new policy. The new policy will take effect once it has been replicated to all of your Exchange Servers.
Brien M. Posey, MCSE, is a Microsoft Most Valuable Professional for his work with Windows 2000 Server and IIS. Brien has served as the CIO for a nationwide chain of hospitals and was once in charge of IT security for Fort Knox. As a freelance technical writer he has written for Microsoft, CNET, ZDNet, TechTarget, MSD2D, Relevant Technologies and other technology companies. You can visit Brien's personal Web site at http://www.brienposey.com.
Did you find this tip useful? It first appeared in the free SearchExchange.com newsletter, Exchange Adviser. Sign up now so you can receive the Exchange Adviser, which is filled with technical articles, expert advice, news and everything Exchange!