Adding Custom MS Exchange Plans into Parallels H-Sphere

Since version 2.5 Parallels H-Sphere provides integration with Microsoft Exchange mail hosting plans. The following four default MS Exchange plans are already included into Parallels H-Sphere as resources:

Parallels H-Sphere admin can also import more plans created on MS Exchange server into Parallels H-Sphere as MS Exchange hosting resources. This document is an example of a step-by-step procedure on how to do it:

  1. Create a custom msExchangePlans.xml file with description of your new custom MsExchange plan (it will be merged with the standard msExchangePlans.xml):

    <plans>
       <plan type="new_plan">
          <planName>NewPlanName</planName>
          <planDescription>New MS Exchange Plan Name</planDescription>
          <planFeatures>
    . . . .
             <feature>
                <featureName>some_feature</featureName>
                <featureDescription>This feature's description</featureDescription>
                <featureValue>some_value</featureValue>
             </feature>
    . . . .
          </planFeatures>
       </plan>
    </plans>

  2. Create the msexchange.xml file that will be merged with the standard hsphere plan wizard xml (msexchange.xml):

    <PlanWizard name="msexchange" description="planeditor.res_msexchange">
    <categories>
       <category description="planeditor.other">
          <resource name="new_plan" required="1" class="psoft.hsphere.resource.mpf.hostedexchange.HostedExchangePlan"/>
       </category>
    </categories>
    <resources>
       <res_bizuser>
          <mod name="new_plan">
             <initresource name="new_plan"/>
          </mod>
       </res_bizuser>
    </resources>
    </PlanWizard>

    where new_plan is the name of the MS Exchange hosting plan you are adding. This name must not exceed 10 symbols.

    Notes:

    1. Don't copy content of the existing standard HS MsExchange plan xml file.
    2. Parallels H-Sphere 2.5 and up implements a Java utility that fetches this information from MS Exchange hosting server:

      java psoft.hsphere.tools.HePlanExctractor

      This utility prints XML output with properties of all available MS Exchange hosting plans. Or, you can obtain plan features in XML form in the HostedExchange Web interface under the GetPlanDetail service.

    3. Read more how to merge custom XML files in Customization Guide.
  3. Log into the CP server as the cpanel user.
  4. Create a special location where you will assemble and build a package describing your MsExchange plan, for example, ~cpanel/shiva/custom/Packages:

    mkdir ~cpanel/shiva/custom/Packages

  5. Run package configurator:

    cd ~cpanel/shiva/custom/Packages

    java psoft.hsp.tools.PkgConfigurator --with-prefix=./ms_customization --with-xmls --with-properties --with-sql

    Package configurator will create the ms_customization directory, which includes the following structure:

  1. Set the package name, version, build, vendor, description in src/_pkg.xml:

    <?xml version="1.0" encoding="UTF-8"?>

    <pkg build="00" description="Description for test package" info="Additional information" name="MSExchangeCustomization"

    vendor="Vendor" version="00.00.00">

    <xmls src="pkg_xmls/"/>

    <config path="pkg_config/default.properties"/>

    Note: Package name can't contain spaces and special characters.

  2. Edit src/_SCRIPTS/_pkg.sql. Add the following line into it:

    INSERT INTO type_name (id, name, price, description, rprice) VALUES ('resource_type_id', 'new_plan', 'RFS', 'resource_type_description', 'RFS');

    where:

  3. Copy the prepared msExchangePlans.xml and msexchange.xml files to ms_cutomization/src/pkg_xmls/:

    cp /some/location/msExchangePlans.xml ~cpanel/shiva/custom/Packages/ms_customization/src/pkg_xmls/

    cp /some/location/msexchange.xml ~cpanel/shiva/custom/Packages/ms_customization/src/pkg_xmls/

  4. Edit src/pkg_config/default.properties:

    Add properties that specify location of xml file implemented in this package:

    PLAN_WIZARDS_DIR=.

    HOSTED_EXCHANGE_PLANS = msExchangePlans.xml

    Return from the package directory and run package builder:

    cd ~cpanel/shiva/custom/Packages

    java psoft.hsp.tools.PkgBuilder --with-source=ms_customization

The hsp package, for example, MSExchangeCustomization-00.00.00-01.hsp, will be created in the directory.