Exchange Provider::CreateSMTPDomain

The CreateSMTPDomain method allows you to create or modify a recipient policy to contain the customer's Simple Mail Transfer Protocol (SMTP) domain (for example, litware.com). The domains implementing these policies are replicated from Active Directory® directory service to the metabase by the Exchange Server. This enables delivery of e-mail to users with the same right-hand side of their SMTP address (for example, johnc@litware.com).

Note

The number of domains per recipient policy is subject to the same limitations as Global Address Lists (GALs), which is less than 800 domains. The CreateSMTPDomain method verifies that the caller is not exceeding this limit.

If a recipient policy name is specified but the policy does not exist, the policy is created and the SMTP domain is added. If the policy exists, the SMTP domain is appended to the current list. If the selected policy exists but the 800 domain limit has been reached on that policy, and other recipient policies also exist, a different recipient policy will be chosen by specifying the next policy based on a hash +1.

If no policy name is specified, a hash is done against the domain name to generate a policy name. The name has the format "Policyxxx" where xxx is some number between 0 and 999 by default. The number of recipient policies that are allowed to be created can be changed. The registry key to modify this is as follows:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Exchange Hosting
Value name: MaxPolicies
Data type: REG_DWORD

 Arguments
 Remarks
 Sample Code
 Applies To
 See Also