Share via


Hosted Exchange::CreateSMTPDomain

This procedure adds a SMTP Domain to a specified organization.

Arguments

Input argument Required Description

<path>

Yes

The Lightweight Directory Access Protocol (LDAP) path of the organization.

<preferredDomainController>

Yes

<SMTPDomain>

Yes

The SMTP Domain.

<createSMTPDomain/>

No

Optional parameter. If present the procedure will create the domain in Exchange Recipient policies. If not present, then the event sink is assumed and no recipient policy is created.

<domainTypeName>

No

Optional parameter. If present the procedure will create a domain of the defined type. Please note that domain types only have meaning in the context of the plan database. Allowed types: PrimaryDomain (the default SMTP Domain for an organization), SecondaryDomain (secondary domains for an organization), VanityDomain (a vanity domain for a consumer user). Default value is SecondaryDomain.

PrimaryDomain Behavior

No

Setting a domain to the PrimaryDomain for an organization impacts the default proxy address created for new user. When a new user is created, the primary domain is used to generate a primary proxy address for the user (i.e. user@alpineskihouse.com). When CreateSMTPDomain is used with the optional domainTypeName parameter and this parameter is set to PrimaryDomain, the following behavior occurs:

  • If the specified domain is a new domain for the organization, then this domain is created in the plan database and set as the primary domain. If an existing primary domain was already defined, the existing primary domain is modified to be a secondary domain.

  • If the specified domain exists in the organization and it is a secondary domain, then the domain is set to the primary domain, and the current primary domain is set to a secondary domain.

  • If the specified domain exists and is currently the primary domain, no action is taken and no error is generated.

Note

The <createSMTPDomain /> element name is counterintuitive. I would prefer <createRecipientPolicy/>, but this tag name was established with HVE 1.1 as a mechanism for optionally creating a recipient policy for a domain at organization creation. In the interest of maintaining consistency, I have used the established element name.

Remarks

Security

  • Impersonate caller.

  • Caller Tested for OrgCreator permissions.

Sample Code

Example XML Request

<?xml version="1.0" encoding="iso-8859-1" ?> 
<request>   
        <procedure>       
                <execute namespace="Hosted Exchange" procedure="CreateSMTPDomain" impersonate="1">              
                        <executeData>         
                                <path>LDAP://ou=alpineskihouse,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com</path>       
                                <SMTPDomain>SkiHouse.com</SMTPDomain>         
                                <preferredDomainController>AD01.fabrikam.com</preferredDomainController>        
                                <createSMTPDomain/>       
                        </executeData>       
                        <after source="executeData" destination="data" mode="merge"/>     
                </execute>   
        </procedure> 
</request>

Example XML Response

<?xml version="1.0" encoding="iso-8859-1" ?> 
<request>   
        <procedure>       
                <execute namespace="Hosted Exchange" procedure="CreateSMTPDomain" impersonate="1">       
                        <executeData>         
                                <path>LDAP://ou=alpineskihouse,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com</path>         
                                <SMTPDomain>SkiHouse.com</SMTPDomain>         
                                <preferredDomainController>AD01.fabrikam.com</preferredDomainController>         
                                <domainTypeName>PrimaryDomain</domainTypeName>         
                                <createSMTPDomain/>       
                        </executeData>       
                        <after source="executeData" destination="data" mode="merge"/>     
                </execute>   
        </procedure> 
</request>

Applies To

Hosted Exchange Namespace API for:

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

See also

Tasks

Hosted Exchange::DeleteSMTPDomain