Programmatically Creating Recipient Policies

Programmatically Creating Recipient Policies

Post by John Sheeha » Sun, 19 Aug 2001 00:38:45

I am having a problem when programmatically creating policies on certain
configurations.  I am running into a race condition where any users or
groups that are created after the policy, but before replication has
happened, do not get the policy applied to them by the RUS, even if I
select Rebuid on the RUS.  Users and groups created after Replication
are fine.

The policy is getting created on the parent domain DC and the users are
getting created in the child domain.

I have been banging my head off of this for days.  Any help would be
greatly appreciated.

Here is my configuration:

1 Domain Controller, is Global Catalog (call it ParentDC)

2 Domain Controllers
1 is Global Catalog, also First Exchange Server in Forest (call it
1 is not a Global Catalog, Second Exchange Server in Forest (call it


1. HOWTO Programmatically Create a Recipient Policy?


Which properies do i have to set on a msExchRecipientPolicy in order to get
the Recipent Update Service to use the policy when generating addresses?

I have made a application that sets the following properties on the new

Set obj = cntr.Create("msExchRecipientPolicy", "cn="PolicyName")
in container
/cn=Recipient Policies,cn=Org,cn=Microsoft

    - "purportedSearch"
    - "msExchPolicyOrder"
    - "msExchPolicyOptionList"
    - "systemFlags"
    - "gatewayProxy"
    - "msExchPurportedSearchUI"

When I go into Exchange System Mangager and open the policy I
programmatically created, and press MODIFY and FIND NOW, the users that
matches the filter specified in "purportedSearch" show up, so the LDAP-
filter is working.

The mail address specified in "gatewayProxy" is not applied to the user

What am I doing wrong? Do I have to manipulate objects other than
Any help or hints would be helpful!


2. Missing Folder Size Button

3. Query: How To Create Recipient Policies Programmatically

4. Non-Admins Viewing Admin Information

5. Programmatically add new domain to defualt recipient policy

6. Authentication of POP3

7. Programatically creating Recipient Policies

8. Auto Reply To Incomming Message???

9. Unable to create Recipient Policy based on X500 DN

10. Programatically creating Recipient Policies

11. Recipient Policy creates a duplicate email in child domain

12. Event ID: 1 InternetProxy when creating SMTP in default recipient policy

13. error creating new recipient policy