ChangeMessageClassPF (CMClassPF) for MS Exchange 2000/2003 event sink application 

Updated: 19-February-2007



Purpose


A property of the item called message class determines the form the item uses. This application can help you to change the message class for incoming messages from the default to custom one. For example, you create a custom Outlook form with IPM.Note.Sales message class and you need that each message e-mailed to your Exchange 2000/2003 Sales public folder will be converted to your custom form (IPM.Note.Sales) immediately after receiving to display information in a Sales custom form. See a good article that describes an Exchange 5.X - based application to support group mailbox functionality: Implementing a Group Mailbox or Public Folder (http://www.exchangeadmin.com/Articles/Index.cfm?ArticleID=4855).  Using  ChangeMessageClassPF application you can implement the same functionality in your Exchange 2000/2003 - based system.

Application is an Exchange store event sink. 



Benefits

- Message type conversion is processed instantly, before any rules are applied

- You can set up CMClassPF on per-folder basis or as "store-wide" application, i.e. it will work on each public folder

- The application is server-centric, so you do not need to install any extra software on the client side 



Installation

On your Exchange 2000/2003 Server computer:

1. Create a new mail-enabled public folder named PFCMCTEST1
   Create a new mail-enabled public folder named PFCMCTEST2
 
2. Select (or create) user account that is a member of the local Administrators, Domain Admins, Domain Users and Exchange Domain Servers security groups.
That account must have full permissions on the public folder store. Open ESM (Exchange System Manager) and drill down to the public folder store. Now open the properties and select the Security tab. Add your account and allow full control.
See also these MS articles: 
Exchange 2000 Permissions Required to Configure an Event Sink (http://support.microsoft.com/default.aspx?scid=kb;en-us;812861)
and 
How to Get Service Account Access to All Mailboxes in Exchange 2000 (http://support.microsoft.com/default.aspx?scid=kb;en-us;262054)

3. Log on as that user.

4. Create C:\Program Files\CMClassPF\ directory.

5. Download CMClassPF.zip archive file to C:\Program Files\CMClassPF\ directory and extract all files.

6. Run C:\Program Files\CMClassPF\CMClassPFSetup.exe

7. Place the #2 account name (using <domain>\<account> syntax) and password in the appropriate fields. Place * to the Original Message Class field. 
Place IPM.Note.MyForm to the New Message Class field. Click Install button.

8. Select in the list the PFCMCTEST1 and PFCMCTEST2 and mark their checkboxes. Click CHANGE button. The list will be refreshed. Make sure both PFCMCTEST1 and PFCMCTEST2 public folders are still checked.
 
9. Click Exit button.




Cluster Installation Specifics

1. Open Computer Management, double-click Services and Applications and click Services. In the details pane, double-click Cluster Service. On the Log On tab you can find the name of the Cluster Service Account. This account hast to be mailbox-enabled. Make sure the account fits all requirements described in step #2 of Installation section.

2. In order for CMClassPF to failover to another node, on the Exchange cluster shared drive (for example, E:) create CMClassPF directory. Copy there CMClassPF.dll and CMClassPFSetup.exe files. Create there CMClassPF_Reactivation.bat batch file that includes the following:
   Rem Reactivation of CMClassPF
   E:
   CD \CMClassPF
   E:\CMClassPF\CMClassPFSetup.exe -b
   Rem Done

3.Create a cluster resource for CMClassPF_Reactivation.bat: On the active node of the cluster, open the Cluster Administrator. Right-click on the group corresponding to the Exchange Virtual Server and select New > Resource to start the resource creation wizard. In the New Resource panel, type
   CMClassPF_Reactivation
in the Name field.
Select Generic Application as the Resource Type and the group corresponding to the Exchange Virtual Server in the Group field. Click Next.
In the Possible Owners panel, accept the default setting of having both nodes as possible owners and click Next.
In the Dependencies panel, select the Exchange Information Store and the shared drive as dependencies and then click Next.
In the Generic Application Parameters panel, type
   CMD /K "E:\CMClassPF\CMClassPF_Reactivation.bat"
for the command line and
   E:\CMClassPF
for the current directory.
Select the option to allow application to interact with desktop.




Testing

1. Using Outlook, navigate to PFCMCTEST1 public folder. Create a custom view that shows Message Class column. For details see http://www.outlook-tips.net/howto/custom_views.htm

2. Send a message to PFCMCTEST1

3. Make sure the message you just sent is placed in the PFCMCTEST1 public folder and its Message Class is set to IPM.Note.MyForm.

Do the same thing for PFCMCTEST2 public folder.


I have tested CMClassPF with Outlook 2003 and Exchange 2003 SP1 on Windows 2003 SP1. 



How to assign the public folder unique conversion settings

Suppose you need to convert messages delivered only to PFCMCTEST2 public folder to IPM.Note.AnotherForm message class. 

1. Using Outlook, navigate to PFCMCTEST2 public folder. Right-click and select Properties. Place the following in the Description field:

<OrigMsgCl>*</OrigMsgCl>
<TargetMsgCl>IPM.Note.AnotherForm</TargetMsgCl>

Click Apply button. Click OK button.

The first string describes the message class to convert. * means any message class will be converted. The second string represents the message class after transformation.
TargetMsgCl parameter can be set to NULL to delete the item. Be careful, because the following combination: 

<OrigMsgCl>*</OrigMsgCl>
<TargetMsgCl>NULL</TargetMsgCl>

will delete any incoming item.
  
2. Send a message to PFCMCTEST2

3. Make sure the message you just sent is placed in PFCMCTEST2 public folder and its Message Class is set to IPM.Note.AnotherForm.




Uninstallation

1. Start C:\Program Files\CMClassPF\CMClassPFSetup.exe

2. Unmark all marked public folders in the list. Click Change button.

3. Click Uninstall button.

4. Press Exit button.




About this demo version

CMClassPF demo version works only for public folders whose names include "TEST". Examples:
      CMClassPF1TEST
      TEST2
Other public folders are unavailable. Also you can not register this demo version for all public folders at once (store-wide). Full product version has no limitations. 





The last-time updates you can find at http://www.ivasoft.com/cmclasspf.shtml



Feel free to send me your comments and criticism.

Thank you,

Victor Ivanidze,
software developer. 
IvaSoft

http://www.ivasoft.com
