Tag Archives: Public Folder store

Migration: Exchange Public folders and its future


Public Folders are used in earlier versions of Microsoft Exchange Server to store free/busy data and files. From Microsoft Exchange Server 2007, free/busy data is no longer stored in public folders. It’s recommend that you do not store files in public folders in Exchange 2007. Instead, consider using Microsoft Office SharePoint, or Windows SharePoint Services. Public folders are included and supported in Exchange 2007 and 2010. However, future releases of Microsoft Exchange might not include public folders. You can visit http://blogs.technet.com/b/exchange/archive/2006/02/20/419994.aspx. Also, you can refer MS Exchange team blog have posted the updated public folder guidance for versions of Exchange past Exchange 2007.

So, what are my options?

If you’re building something new, you should look at the requirements and building on the SharePoint Technologies platform:

+ Starting with Exchange 2007, we recommend that applications use the Availability service to provide free/busy data for Exchange mailbox users. Windows SharePoint Services replaces the file sharing functionality that public folders provide. You must redesign applications that use public folders to use Exchange Web Services.
+ Also consider redesigning custom applications as early as possible as future versions of Microsoft Exchange may not contain public folders.
+ In addition to that you can refer the wonderful blogpost by Joel.

Exchange Server Utility : PFDAVAdmin update is released


I use PFDAVAdmin  utility [Exchange Server Public Folder Distributed Authoring and Versioning (DAV)-based Administration tool]  to perform various management tasks related to public folders and mailboxes. An updated version of the PFDAVAdmin tool has been released to the web on 04/06/2010 (the prior version on the Download Center was from April of 2007) @ Microsoft Download Center. You can get it from the download center at this link: http://www.microsoft.com/downloads/details.aspx?familyid=635BE792-D8AD-49E3-ADA4-E2422C0AB424.

Per MSExchange.com’s blog post, this update contains various bug fixes that have been made over the last three years. It also has some changes that make it work better against Exchange 2007. If you need similar functionality for Exchange 2010, use ExFolders instead

Please note:

  • The dependency on .NET Framework 1.1 remains, which means you should run PFDAVAdmin from a workstation with Framework 1.1 installed – you should not install this old version of the framework on your Exchange servers, because it makes IIS unhappy.
  • PFDAVAdmin still cannot connect to Exchange 2010 servers, because WebDAV is gone from 2010.

Tutorial : Free/Busy data – Series # 1


Publishing Free/Busy data:


Free/busy data is published information that contains a user’s personal availability data based on the user’s schedule. Microsoft Exchange Server uses the information extensively when users schedule meetings.



  • Exchange Server 2003 stores free/busy information in a dedicated public folder that is named SCHEDULE+ FREE BUSY. This folder contains a separate subfolder for each administrative group in your Exchange organization. When a user publishes free/busy data, Exchange Server 2003 posts the information in a message in the appropriate free/busy subfolder. The free/busy folders are system folders and function in a manner that is similar to offline address book folders.

  • Exchange Server 2007 uses the availability service.

Free/Busy data & different versions of Outlook and Exchange Server :



  • The process of publishing free/busy data from the user’s client application to the appropriate free/busy folder depends in part on the client that the user has.

  • Outlook and other MAPI-based clients function somewhat differently in this respect from Web-based clients such as Microsoft Office Outlook Web Access for Exchange Server 2003 and Microsoft Outlook Mobile Access.

  • The Availability service for Microsoft Exchange Server 2007 provides calendar information for your users. This information is known as free/busy information.

How Outlook publishes free/busy data?


By default, Outlook publishes the free/busy data for a user one time every 15 minutes, and again when Outlook shuts down. When publishing, Outlook updates the entire free/busy message instead of just adding changes to the existing message. The message includes free/busy data that ranges from the current month to two months in the future.


How to customize with Outlook?


Outlook users can customize the free/busy settings, including the following:




    • Publishing interval, which can be as short as one minute.

    • Number of months in the future to publish, which can be as long as 36 months.

Outlook 2007 with different Exchange Servers:


As we know that Microsoft Office Outlook 2007 works well with a variety of e-mail servers, and you can take advantage of an even richer feature set by using Outlook with the latest version of Microsoft Exchange Server. Some features of Office Outlook 2007 require or work better with Microsoft Exchange Server 2003 or later.



  • Free/Busy information is always up-to-date for users with Exchange 2007 Availability service. But it’s not the case with Exchange 2003.

  • Tentative calendar booking is managed on the Exchange Server. Users do not need to run Outlook for others to see their Free/Busy status. This feature is only available in Exchange Server 2007, not with Exchange Server 2003.

MadFB, Autodiscover & Outlook clients:



  • The Autodiscover service provides information for the Availability service by locating and providing the external and internal URLs for the Outlook 2007 client.

  • If your Microsoft Office Outlook 2007 users cannot view calendar information for other Outlook 2007 users in your Exchange 2007 environment, the problem may involve a failure in either the Autodiscover service or the Availability service.

  • Microsoft Entourage for the Macintosh also relies on this MadFB(MSExchangeFBPublish) process to publish free/busy data.

  • Outlook Web Access and Outlook Mobile Access do not publish free/busy data directly to the public folder store.

  • Instead, they rely on a free/busy publishing agent that is named MadFB (also known as MSExchangeFBPublish), which runs as part of the Microsoft Exchange System Attendant service (MSExchangeSA).

  • MadFB has two functions.


    • It publishes free/busy messages for Outlook Web Access and Outlook Mobile Access

    • It deletes duplicate free/busy messages

Note: Because most of the processing is handled by the Exchange servers instead of the client, using Outlook Web Access and Outlook Mobile Access can provide performance and reliability advantages over Outlook.


There are various other issues happens with respect to Free/Busy data when we do with programming as well as with the Outlook clients. I tried to catch up some of them and summarize for your view….


1. Troubleshooting the Free/Busy information for Outlook 2007 by reading this technet article or you can check it through the error codes available. Some of them are,



  • 0x80072EE7 – ERROR_INTERNET_NAME_NOT_RESOLVED – This error is usually caused by a missing host record for the Autodiscover service in the Domain Naming service.

  • 0X80072F17 – ERROR_INTERNET_SEC_CERT_ERRORS – This error is usually caused by an incorrect certificate configuration on the Exchange 2007 computer that has the Client Access server role installed.

  • 0X80072EFD – ERROR_INTERNET_CANNOT_CONNECT – This error is usually caused by issues that are related to Domain Naming service.

  • 0X800C820A – E_AC_NO_SUPPORTED_SCHEMES – This error is usually caused by incorrect security settings in Outlook 2007.

2. If you use Exchange Server 2007, you can determine whether the Availability service is not functioning properly or not:
(i) using Event log (ii) using Test-OutlookWebServices cmdlet
.


Using Event log:


When we try to review the application event log on the Exchange 2007 Client Access server and check for events that are generated by the Availability service. There are common events that are associated with the availability service as described. Some of them are,


  • 4001 The Availability service could not discover an Availability service in the remote forest   If you see this event, verify that the Autodiscover service in the remote forest is functioning correctly.

  • 4003 PublicFolderRequestFailed   This event usually indicates a failure to look up free/busy information for legacy mailboxes. Typically, this information comes from public folders. This error might be caused if the public folders are configured incorrectly or if the Availability service has not been configured to look up public folders for the legacy mailboxes. The description of this event will usually include the URL to the target public folder and one of the following HTTP errors:


    • 401   If you see this HTTP error, Integrated Windows authentication is probably disabled on the /public virtual directory.

    • 403   If you see this HTTP error, the Client Access server may be offline or it does not contain a replica. This might occur if Secure Sockets Layer (SSL) is not enabled on the /public virtual directory.

    • 404   This HTTP error can occur if the /public virtual directory could not be found.

  • 4005 Could not find information in Active Directory to allow cross-forest requests   If you see this event, you must configure the Availability service across forests.

  • 4011 Cross-forestRequestFailed   This usually indicates a failure to locate an AvailabilityAddressSpace object that is required to proxy the Availability service request to a different forest.

  • In this case, we will see how to find and troubleshoot the issue using the Event log. A 4003 event indicates a failure to look up free/busy information for legacy mailboxes. Typically, this information comes from public folders. The following is an example of a 4003 event.




    Event ID : 4003


    Raw Event ID : 4003


    Category : Availability Service


    Source : MSExchange Availability


    Type : Error


    Message : Process 4664[w3wp.exe:/LM/W3SVC/1/ROOT/EWS-1-128114978363374212]: Microsoft.Exchange.InfoWorker.Common.Availability.PublicFolderRequest failed. The exception returned is Microsoft.Exchange.InfoWorker.Common.Availability.PublicFolderRequestProcessingException


    This may be due to Exchange 2007 users are unable to see the free/busy information for users whose mailboxes reside on the Exchange 2003 server. The free/busy information displays as hash marks for these users in the Outlook Scheduling Assistant page.


    Using Test-OutlookWebServices cmdlet:


    When you try to test through cmdlet test the service using, 
                            Test-OutlookWebServices -id:user1@contoso.com -TargetAddress: user2@contoso.com



    • The Test-OutlookWebServices cmdlet uses a specified e-mail address to verify that the Outlook provider is configured correctly.

    • The optional MonitoringLogFile parameter indicates whether the results are written to the log file for Microsoft Operations Manager (MOM).

    • Using the Test-OutlookWebServices cmdlet to verify the Autodiscover service settings for Microsoft Outlook on a computer that is running Microsoft Exchange Server 2007 that has the Client Access server role installed.

    • This will provide the error details about the Availability service.

    For example, as specified in the following article and code example verifies the service information that is returned to the Outlook 2007 client from the Autodiscover service for a user who is named monika@contoso.com. The code example verifies information for the following services:



    • Availability service

    • Outlook Anywhere

    • Offline Address Book

    • Unified Messaging

    test-OutlookWebServices -identity:monika@contoso.com

    This code example tests for a connection to each service. This example also submits a request to the Availability service for the user monika@contoso.com to determine whether the user’s free/busy information is being returned correctly from the Client Access server to the Outlook 2007 client.


    3. Free/Busy Options Not Unique to Each Profile:


    On a computer that contains multiple profiles, the Free/Busy options will be the same for every profile. This information is defined in the KB article. The Free/Busy information is stored on a per-user basis rather than a per-profile basis. If the user who is logged on to the computer defines multiple profiles, each profile will contain the same Free/Busy information.

    To set the calendar Free/Busy information, follow these steps:


    1. On the Tools menu, click Options.


    2. On the Preferences tab, click Calendar Options.


    3. Click Free/Busy Options. In the Free/Busy Options dialog box you can set the following items:



    • How many months of Free/Busy information to publish.


    • How frequently the information should be updated.


    • Whether the information should be published on the Internet.


    • The Internet URL address for storing and searching for the information.


    4. Conditions that affect the display of Free/Busy time in Outlook:

    After you make an appointment in your active Calendar in Microsoft Outlook, other people may not immediately see that time as busy. This condition may also occur when someone attempts to invite you to a meeting.


    There are three possible causes for this behavior:



    • By default, Outlook updates your Free/Busy time every 15 minutes. If the update is not complete, others will not see your appointment as busy time.


    • Outlook publishes your Free/Busy time for only the next two months. If your appointment is beyond the published limit, others will not see your appointment as busy time.


    • If the appointment Show Time As property is set to Free, others will not see your appointment as busy time.


    The unavailability of Free/Busy information appears as black hatched lines in the Attendee Availability dialog box.


    Resolution:



    • If the cause is how often Outlook updates Free/Busy time, follow these steps as described in the support KB.

    • If the cause is how far ahead Outlook publishes Free/Busy time, follow these steps as described in the support KB

    • If the cause is that the Appointment Show Time As property is not set to Free, follow these steps as described in the support KB

    5. Legacy free/busy information no longer appears for appointments that are booked against a mailbox in Exchange Server 2007:


    In a Microsoft Exchange Server 2007 environment, you configure a room mailbox to have the AllBookInPolicy attribute set to “false.” When you do this, the legacy free/busy information no longer appears for the appointments that are booked against the mailbox. For example, when you examine the free/busy information by using the Scheduling Assistant, the room mailbox shows a status of No Information.


    This issue occurs because the default permission is changed to “None” when the AllBookInPolicy attribute is set to “false.” This situation prevents the Exchange System Attendant from publishing the legacy free/busy information. By default, when any mailbox is created, the free/busy permissions are set as follows:


    Default: Read: Free/Busy time
    Anonymous: None


    This condition is also true for resource mailboxes.


    To go through the following article to resolve this problem in Exchange Server 2007 Service Pack 1.


    6. Resolving problems in Outlook for delegated Exchange Server 2003 mailbox users :


    As stated above, we need to perform this procedure if delegated users are receiving error messages such as “Unable to open the free/busy message” when they try to modify the mailbox owner’s calendar.




    1. Request that all delegate users and the mailbox owner shut down Outlook.



    2. Request that the mailbox owner start Outlook with the /cleanfreebusy switch. The mailbox owner can do this from the command prompt by typing: outlook/cleanfreebusy


      Outlook will re-create the LocalFreeBusy message and synchronize the other mailbox folders to use it.



    3. Resume using Outlook. Delegates should now be able to use the mailbox as expected.


    7. Cleaning Mailbox stores using MadFB:


    As stated above, and in the over time, the free/busy folders may accumulate duplicate free/busy messages. In addition, Outlook and the free/busy folders may become unsynchronized, especially for mailboxes that have multiple delegate users. This section provides information about how Exchange Server 2003 automatically maintains free/busy data according to a configurable schedule, and about how you can repair synchronization problems.


    The cleanup process includes:



    • Deleting duplicate free/busy data messages.
      These are messages with an appended –x in the URL, where x is the number of the duplicate message. For each set of duplicates, MadFB keeps the oldest message and deletes the rest.

    • Repairing the URLs of free/busy messages.
      The URL of a free/busy message must be in canonical format, ending with subject(based on legacyExchangeDN).EML.
      Messages that are duplicates of existing free/busy messages have non-canonical URLs because of the appended -x. Messages that have been upgraded or replicated from Microsoft Exchange Server version 5.5 have URLs that contain GUIDs. These messages are also considered non-canonical.

    8. Calendar support in an Exchange and Non-exchange environment:


    As stated in the following article regarding the calendar support in an Exchange and Non-exchange environment (for ex. using the Microsoft Exchange Connector for Lotus Notes and the Microsoft Exchange Connector for Novell GroupWise) perform several functions to support calendaring capabilities between the foreign system and Exchange Server 2003:



    • Replicate directory information so that both Exchange users and foreign system users have access to calendaring data.

    • Convert meeting request items from Exchange format to the foreign format and from the foreign format to the Exchange format.

    • Detect Exchange Server 2003 free/busy requests and look up the appropriate free/busy data in the foreign system. This free/busy lookup is bidirectional.

    Exchange Server 2003 & Public folders


    Some organizations use public folders heavily, while others do not. The degree to which public folders are used in your organization may have a large effect on how you plan for migration and coexistence of public folders and the data stored therein. Factors to consider include:

    • The total number of public folders and the amount of data contained in them. Many organizations choose to remove unneeded folders from their public folder structure as part of their migration process.

    • The number of existing replicas and where they are located. Because Exchange public folders can be easily replicated between servers, many organizations have placed public folder servers at remote sites to improve access for remote users; as part of server consolidation, these replicas will normally be re-homed elsewhere.

    • The extent to which public folders are used as part of normal operations. If public folder-based applications are in use, how much are they used? Do users depend on them for their key tasks, or are they of secondary importance?

    • The messaging clients to be used after the consolidation. Outlook 2003 can be configured to cache users’ public folder favorites; this makes public folder access in Cached Exchange Mode seamless, but it increases the size of the OST file, and it causes additional synchronization traffic. Requests for public folder items will be automatically directed to the best available replica, which may be in a distant site across a slow or high-latency link.  

    Even if your organization does not use public folders for business reasons, Exchange still uses two important system public folders that must be accounted for in your planning.

    First, the Schedule+ Free/Busy folder is where Exchange stores free/busy status for individual mailboxes. Outlook publishes users’ calendar status to this folder, as does the Exchange System Attendant.

    Having multiple replicas of this folder helps ensure quick and consistent access to schedule data throughout the organization; however, these replicas have to be synchronized, which can add a substantial amount of network traffic.

    When a user creates a new meeting request, Outlook opens a connection to find each attendee’s free/busy data. First, Outlook retrieves the user’s legacy distinguished name, which it then uses to identify the name of the free/busy folder it needs. Outlook then searches for the correct folder and message for the specified user’s schedule data. This means that a single meeting request may generate multiple un-cached connections to different servers.

    On the other hand, adding multiple replicas of the free/busy folder means that changes made to one replica may take time to propagate to other replicas. Adjusting the number of replicas, their location, and the replication schedule used may be necessary to ensure the right balance between minimized access time and replication convergence.

    Offline Address book is one of the advantage when you make use of public folder. The OAB provides offline and Cached Exchange Mode users access to a subset of properties for all objects in the global address list.

    Exchange generates updates to the OAB periodically, and Outlook automatically downloads available changes once a day (in online mode) or when the user goes online (in Cached Exchange Mode).

    In general, Microsoft’s normal recommendation is to maintain OAB replicas on each server that contains user mailboxes. As you consolidate user mailboxes, you should bear in mind that when the OAB changes, a large number of clients may need to download OAB changes at once, and plan network capacity and CPU allocation accordingly.

    Public folder support for Exchange Server 2007 till 2016 ?


    I went through the following Technet article which talks about one such a interesting question of my favortie “What is happening with public folders ?”


    Please find the excerpts “…Exchange 2007 de-emphasizes public folders. Public folders may not be included in future releases, but support for public folders will be maintained through at least 2016. Current Microsoft Exchange customers should plan to migrate to Outlook 2007 and Exchange 2007. We recommend that you investigate integrating Microsoft Windows SharePoint Services with Exchange Server 2007 if you must have an application that supports sharing documents, calendar items, contacts, and tasks and archiving distribution lists. For other customized applications that are being developed, you should use Microsoft .NET ..”


    For more information, you can have a look at this Technet article.

    Rules series # 1 : There is not enough space on the Microsoft Exchange Server to store all of your rules


    When you use rules in Outlook, you may receive the following error message:


    There is not enough space on the Microsoft Exchange Server to store all of your rules. The rules that failed to upload have been deactivated.



    To work around this issue:


    Create distribution lists (DLs) to group recipients in rules, instead of using individual recipients.


    • Keep the number of recipients small in rules.


    • Keep the names of recipients as small as possible.

    Cached Exchange Mode


    Cached Exchange Mode is a new feature in Outlook 2003.


    When you turn on Cached Exchange Mode in Outlook 2003, and when the connection from your computer that is running Outlook 2003 to the Exchange Server 2003 computer is not available, Outlook switches to the Trying to connect state or to the Disconnected state. If the connection is restored, Outlook switches to the Connected state or to the Connected (Headers) state. Any changes that you made while you were offline are synchronized automatically when a connection to a server is available. You can continue to work while changes are synchronized.

    Outlook 2003 Cached Exchange Mode offers you the following benefits:


    • After messages have been cached locally, typical user operations do not cause interactions that block the server.


    • Quickflagging, marking a message as read, replying, and editing require a small amount of data to be pushed up to the server to keep the mailboxes synchronized. However, the pushing of data occurs in the background. This behavior causes much faster access to messages and to attachments, because you work from the local copy instead of the server copy.
     
    • Additionally, Cached Exchange Mode causes no loss of conventional functionality. New e-mail notifications, full Global Address List details, free/busy lookup, public folder access, and delegate support function as expected. However, this is true only when a network connection to an Exchange Server computer is present.
     
    • Cached Exchange Mode provides intelligent use of bandwidth. This functionality is enabled by synchronizing only headers on slow connections (connections that are slower than 128 kilobits per second [Kbps]). This functionality works only when a network connection is present. 


    Additionally, Cached Exchange Mode offers administrators the following benefits:


    • Reduced server load. After messages are cached locally, re-opening the same message does not require server transactions.
     
    • Reduced network load. After messages have been pulled over the network one time, subsequent access to those messages does not cause additional network traffic. Because messages are also compressed, there is an additional reduction on network load.

    Part # 4 – Configure Public folder permissions


    Configure Public folder permissions


    Please find the lists of management tasks that you can perform to configure and maintain public folder permissions:



    • How to Add Permissions for Client Users to Access Public Folder Content
      You can use the Add-PublicFolderClientPermission cmdlet or the AddUsersToPFRecursive.ps1 user management script to specify the permissions for the client user. You can create the access rights by using either the predefined permission roles or by creating custom access rights.

    • How to Remove or Replace Public Folder Client Permissions
      You can use the Remove-PublicFolderClientPermission cmdlet or the RemoveUserFromPFRecursive.ps1 script to remove permissions for the client user. You can remove access rights by using either the predefined permission roles or by using the access rights.
      You can use the ReplaceUserWithUserOnPFRecursive.ps1 and ReplaceUserPermissionOnPFRecursive.ps1 scripts to replace client permissions on a public folder.


    • How to View Public Folder Client Permissions Settings
      You can use the Get-PublicFolderClientPermission cmdlet to view the client access rights associated with a public folder.

    • How to Grant the Send As Permission for a Mail-Enabled Public Folder
      You can use Send As permissions to configure a mail-enabled public folder so that users other than the public folder owner can use the mail-enabled public folder to send messages.
      The Send As permission is not granted until after replication has occurred. Replication times depend on your Microsoft Exchange and network configuration.

    • How to Add Administrative Permissions for Users to Access Public Folders
      You can use the Add-PublicFolderAdministratorPermission cmdlet, the Add-ExchangeAdministrator cmdlet, or the Add Exchange Administrator wizard to grant administrative rights for a user to access a public folder or public folder hierarchy.

    • How to Remove Public Folder Administrative Permissions
      You can use the Remove-PublicFolderAdministratorPermission cmdlet, the Remove-ExchangeAdministrator cmdlet, or the Add Exchange Administrator wizard to remove administrative access rights from a user for a public folder or public folder hierarchy.

    • How to View Public Folder Administrative Permission Settings
      You can use the Get-PublicFolderAdministratorPermission cmdlet, the Get-ExchangeAdministrator cmdlet, or the Organization Configuration node to view the administrative rights that are associated with a public folder or public folder hierarchy.

    Part # 3 – Managing mail-enabled Public Folders


    Managing mail-enabled Public Folders 


    Please find the following topics provide instructions for the management tasks that you can perform for mail-enabled public folders.


    Part # 2 – Managing Public Folders


    Monitoring Event Sink # 10 – How to Register Store Event Sink


    Registering Store Event Sink – Three Sample attached


    Example 1: The above command example is to register a specific mailbox. To register event sinks to a specific store with the regevent.vbs script, here is an example:

    cscript regevent.vbs add OnSyncSave test.sink “file://./backofficestorage/contoso.com/MBX/SystemMailbox{9ADEA9EA-3924-401F-9C70-0 3B6B7378C9D}/StoreEvents/GlobalEvents/testsink” -m deep

    In the above command, the event sink is actually registered to the system mailbox named SystemMailbox{GUID} in the mailbox store.

    To determine the GUID:









    1. In the Exchange System Manager, find the mailbox store that you want to register the event sink to.
    2. Select the “Mailboxes” node under the mailbox store to see the list of its’ mailboxes. You will see a mailbox called “SystemMailbox{GUID}.” The GUID is the GUID you want.

    Example 2 :The following example uses the RegEvent script to register an OnSyncSave event to a mailbox:

    cscript regevent.vbs add OnSyncSave ExOleDB.ScriptEventSink.1 “file://./backofficestorage/contoso.com/user1/inbox/eventsink1” -m deep -file “c:script1.vbs”

    Example 3: The following example uses the regevent script to register an OnSave and OnDelete event to the public folder named folder1 under the Public Folders tree:

    cscript regevent.vbs add “OnSave;OnDelete” ExOleDB.ScriptEventSink.1 “file://./backofficestorage/contoso.com/Public Folders/folder1/testsink” -m deep -file “c:vbscript1.vbs”

    Monitoring Event Sink # 8 – Register a store event sink using Regevent.vbs on Exchange


    Step-by-step guide on how to register store event sinks


    Per KB, Before you use regevent.vbs to register the event sink VB script, you need to register a new COM+ application on the Exchange server to properly execute script-based store events. Please follow the steps below:




































    1. To start the Component Services console, click Start, select Programs, Administrative Tools, and Component Services.
    2. In the Component Services snap-in, expand the list in the following order: Component Services, Computers, and My Computer.
    3. Right-click COM+ Applications in the left pane, and select New and Application.
    4. Click Next and then choose the “Create An Empty Application” button.
    5. Enter ScriptEventSink as the name for the new application.
    6. Confirm that the Server Application radio button is selected and click Next.
    7. Click Next and click Finish.
    8. Select a user that will have owner permissions for the application you are creating, or choose the current user by selecting “Interactive User – The Current Logged On User” radio button.

    Note If you choose Interactive User, make sure the account that you are currently logged on with has one of the following permissions:








    Explicit “Full mailbox access” right on the mailbox you plan to publish the sink to
    Explicit Allow for the “Receive As” right on the mailbox store
    9. Open the newly created COM+ Application you just created, right-click on the Components subfolder, and choose New and, then, select Component.
    10. Click Next, then choose Install New Component(s).
    11. Browse the file system and select ExchsrvrBinexodbesh.dll. Click Next and Finish.
    After registering the new COM+ application, you need to write the event sink VB script file. Here is a sample event sink that does nothing but log its’ existence:

    Option Explicit

    Public Sub ExStoreEvents_OnSave(pEventInfo, bstrURLItem, lFlags)

    LogFile “ExStoreEvents_OnSave”

    End Sub

    public Sub ExStoreEvents_OnDelete(pEventInfo, bstrURLItem, lFlags)

    LogFile “ExStoreEvents_OnDelete”

    End Sub

    Public Sub ExStoreEvents_OnSyncSave(pEventInfo, bstrURLItem, lFlags)

    LogFile “ExStoreEvents_OnSyncSave”

    End Sub

    Public Sub ExStoreEvents_OnSyncDelete(pEventInfo, bstrURLItem, lFlags)

    LogFile “ExStoreEvents_OnSyncDelete”

    End Sub

    public Sub LogFile(MyString)

    Dim fso

    Dim txtfile

    Set fso = CreateObject(“Scripting.FileSystemObject”)

    Set txtfile = fso.OpenTextFile(“c:LogFile.log”, 8, True)

    txtfile.WriteLine (MyString)

    txtfile.Close

    End Sub

    We assume that the sink is now saved in the testscript.vbs., you can now register this event sink VB script using the following steps:













    1. Click Start, select Run, and type “cmd” (without the quotation marks) to enter the command prompt.
    2. Change the directory to ExchsrvrBin and type the following 2 commands:

    regsvr32 exodbesh.dll
    regsvr32 exodbprx.dll
    3. Copy the regevent.vbs (located in the Program FilesExchange SDKSDKSupportOLEDBScripts directory.) and the event sink VB script files onto the root of the C drive.
    4.

    Start the command prompt, and change to the directory of C:. Type the command to run the regevent.vbs. The following command is one example:

    cscript regevent.vbs add “onsave;ondelete” ExOleDB.ScriptEventSink.1 “file://./backofficestorage/contoso.com/MBX/smith/inbox/testsink” -m deep -file “c:testscript.vbs”

    Note:



    • This command is used to register the event sink VB script named testscript.vbs in the Inbox of the mailbox named smith.

    • In the command above, you replace contoso.com with the default domain name referenced on the “Local path” field in the Virtual Directory tab of the Exchange virtual directory properties in the Internet Information Services snap-in.