+

Search Tips   |   Advanced Search


Work with Mail policy definitions

When staging Mail policies from a development server to a production server, use the XML configuration interface to work with a Mail policy definition that has at least three levels of specialization. Then you can experiment with exporting and updating one or more policy levels and deleting any level of the policy definition. The following procedure uses examples that relate to the example values provided in the related topics. Before you begin, consider the following requirements for using Policy parameters:

Before you run the XML configuration interface, create a hierarchy of Mail policies using the Resource Policies portlet. From the Administration menu, expand the Access section and click Resource Policies to display the Policy Types. Refine the main Mail policy by creating three levels of child policies. The examples used in the following procedure refer to USAMailChild1, USAMailChild11, and USAMailChild111. When exporting, importing, and deleting Mail policies, refer to the following samples:

  1. Use the XML configuration interface export command to create the Mail policy definition for the entire Mail node of the policy branch of the content repository that you will import on the target production server. In the following example, the Mail policy definition is exported to the file Mail.xml.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
         create-oids="true" type="export"
            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portal action="locate">
            <policy-node action="export" label="Mail" type="Mail">  
                <url>file:///d:/temp/Mail.xml</url>
            </policy-node>
        </portal>
    </request>
    

  2. Review the exported policy list in the file Mail.xml to see the key attributes and values of the main (root) policy, its child policies, and the lower-level specializations of child policies.

    For example, a policy list might contain two peer policies, USAMailChild1 and JAPANMailChild1.

    The policy USAMailChild1 might be refined by USAMailChild11, which might be refined further by USAMailChild111.

    If the policy JAPANMailChild1 is not specialized; it has no child policies.

  3. Modify the main policy definition or any level of child policy definition by editing the attribute values as needed.

  4. Use Personalization to create and associate a policy rule for each child policy in the hierarchy of Mail.xml on the source development server and on the target production server.

  5. Use Personalization to create and associate a policy condition for each policy rule on the source development server and on the target production server.

    Steps 4 and 5 are important because the XML configuration interface for policies does not process policy rules and their conditional expressions. The policy rule attribute (PznRule) value in a policy definition is the UUID referring to the associated rule and not the rule itself. Using Personalization explicitly create and associate policy rules (PznRule) and policy conditions (PznType) for the policy definitions that you export, update, or delete using the XML configuration interface.

  6. Use the XML configuration interface update command to import the Mail policy definition for the entire Mail node of the policy branch of the content repository. In the following example, the Mail policy definition is imported from the file Mail.xml.

     
    <!-- ACTION: create or update the whole Policy -->
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
       create-oids="true" type="update"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portal action="locate">
            <policy-node action="update" label="Mail" type="Mail">
                <url>file:///D:/Mail/Mail.xml</url>
            </policy-node>
        </portal>
    </request>
    

  7. Use the XML configuration interface update command to import one or more levels of child policies. The following example illustrates an update of the child policy USAMailChild1.

    This update action imports USAMailChild1 and the child policies USAMailChild11 and USAMailChild111.

    The Path value is the location in the content repository of the policy condition that the USAMailChild1 policy uses, namely ./USA.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <!-- ACTION: create or update first-level child Policy -->
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
       create-oids="true" type="update"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portal action="locate">
            <policy-node action="update" label="Mail" type="Mail"
                path="./USA">
                <url>file:///d:/Mail/USAMailChild11.xml</url>
            </policy-node>
        </portal>
    </request>
    

    The following example illustrates an update of the child policy USAMailChild11. This update action imports USAMailChild11 and the child policy USAMailChild111.

    The Path value is the location in the content repository of the policy condition that the USAMailChild11 policy uses, namely ./USA/USAManager.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
       create-oids="true" type="update"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portal action="locate">
            <policy-node action="update" label="Mail" type="Mail"
                path="./USA/USAManager">
                <url>file:///d:/Mail/USAMailChild111.xml</url>
            </policy-node>
        </portal>
    </request>
    

  8. Use the XML configuration interface export command to export one or more levels of the policy hierarchy. The following example illustrates exporting the child policy USAMailChild11 and its child policy USAMailChild111.

    The Path value is the location in the content repository of the policy condition that the USAMailChild11 policy uses, namely ./USA/USAManager.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd" 
        create-oids="true" type="export" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portal action="locate">
            <policy-node action="export" label="Mail" type="Mail"
                 path="./USA/USAManager">  
                <url>file:///d:/Mail/USAMailChild11.xml</url>
            </policy-node>
        </portal>
    </request>
    

    The following example illustrates exporting the child policy USAMailChild111. Note that the Path value is the location in the content repository of the policy condition that the USAMailChild111 policy uses, namely ./USA/USAManager/USALocalityName.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
       create-oids="true" type="export"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <portal action="locate">
            <policy-node action="export" label="Mail" type="Mail"
                path="./USA/USAManager/USALocalityName">
                <url>file:///d:/Mail/USAMailChild111.xml</url>
            </policy-node>
        </portal>
    </request>
    

  9. Use the XML configuration interface delete command to delete one or more levels of the policy hierarchy. The delete command acts on the policy level you have specified and all levels under it.

    The following example illustrates the deletion of the child policy USAMailChild11 and its child policy USAMailChild111.

    The Path value is the location in the content repository of the policy condition that the USAMailChild11 policy uses, namely ./USA/USAManager.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
       create-oids="true" type="update"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <portal action="locate">
    <policy-node action="delete" type="Mail" path="./USA/USAManager">
    </policy-node>
    </portal>
    </request>
    

    The following example illustrates the deletion of the child policy USAMailChild111 only.

    The Path value is the location in the content repository of the policy condition that the USAMailChild111 policy uses, namely ./USA/USAManager/USALocalityName.

    <?xml version="1.0" encoding="UTF-8" ?> 
    <request xsi:noNamespaceSchemaLocation="PortalConfig_1.4.xsd"
       create-oids="true" type="update"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <portal action="locate">
    <policy-node action="delete" type="Mail"
       path="./USA/USAManager/USALocalityName">
    </policy-node>
    </portal>
    </request>
    


Parent topic:

Manage portal resources with policies


Related concepts


Policy principles


Related reference


Mail policy attributes
Sample Policy XML configuration files