Recipe 5.19. Creating Recipient PoliciesProblemYou want to create a recipient policy for your organization to control generation of email addresses for Exchange recipients, Mailbox Manager settings, or set Exchange to accept mail for a new SMTP domain. SolutionUsing a graphical user interface
Figure 5-6. Creating a template for SMTP addressesDiscussionRecipient policies are a useful way to apply address policies to groups of mail-enabled resources. Based upon an LDAP query, they allow you to specify a subgroup of objects to which they will apply. By default, Exchange will create SMTP addresses for all mail-enabled objects of the form mailNickname@domain.com. Many organizations host more than one domain, or wish to have different address templates used for different departments, and recipient policies offer a simple method to achieve this. Creating an email address within recipient policies is quite simple. The basic technique for SMTP proxy address templates has remained the same since the days of Exchange 5.5; you combine static parts of your email address template with variables that, when extracted from AD, will construct unique addresses for your Exchange recipients. The examples given assume that you want to create SMTP addresses, but the same technique works for generating X.400, cc:Mail, GroupWise, or Lotus Notes addresses. By default, a new recipient policy will be populated with a template of mailnickname@domain.com, which would simply take the Exchange alias property and prepend it to @domain.com. Some of the useful variables available for constructing addresses include the following:
You can place a number in front of any of these strings to allow you to specify the first n characters of that variable; that is, %4s would give you the first four characters of the user's surname, or %8d would give you the first eight characters of the user's display name. The following are examples of how these variables work, given a user named John Q. Public, with a display name of "John Public", and Exchange alias of jqpublic.
Besides allowing you to set recipient email addresses and mailbox manager policies, recipient policies are used by Exchange for two other scenarios. All domains that you wish to receive inbound mail for must exist in a recipient policy. The Exchange routing engine checks SMTP domain addresses in all recipient policies to discern which domains are local to the Exchange organization. Exchange also uses the default SMTP domain of the default recipient policy to determine the domain name used in creating the Exchange virtual directory and the Outlook Web Access virtual directory. For this reason, it is usually preferable not to modify the default recipient policy, but to add new recipient policies that will take precedence for creating addresses. (If you're specifying a custom policy, be sure that the values you are specifying in the policy exist. If they don't, the RUS will generate a wide variety of ugly email addresses, and that will cause problems.) See AlsoRecipe 5.26 for configuring Mailbox Manager settings, MS KB 319201 (How to Use Recipient Policies to Control E-mail Addresses), MS KB 822447 (How to Modify an SMTP E-Mail Address by Using Recipient Policies), MS KB 285136 (How to Customize the SMTP E-mail Address Generators Through Recipient Policies), and MSDN: Creating a Query Filter (http://msdn.microsoft.com/library/en-us/ad/ad/creating_a_query_filter.asp) |