HOWTO: Access, Restore, Delete Soft Deleted Item Exchange Server

ID: Q232265


The information in this article applies to:


SUMMARY

On a Microsoft Exchange server, when a message or a folder is deleted from a Public or Deleted Items Folder, a backup copy of that item is kept for a defined period of time. This period of time is known as deleted item retention time (The backup item will be referred to as a Soft Deleted Item or a Tombstone). Outlook allows you to get a list of the Soft Deleted messages in a folder and to either restore the messages back to the original folders or permanently remove the messages from the system. This article shows you how to use Extended MAPI with the SHOW_SOFT_DELETES and DELETE_HARD_DELETE flags, to programatically access, restore, and permanently delete these Soft Deleted Items.


MORE INFORMATION

The same Extended MAPI commands that are used with regular items (messages and folders) are used with Soft Deleted Items. In order to access these Soft Deleted Items, you must use the SHOW_SOFT_DELETES flag defined in the following. Here are a list of options that one can perform on the Soft Deleted Items.

To permanently remove items, Soft Deleted or not, one must use the DELETE_HARD_DELETE flag defined below. However, once an item has been permanently deleted, the item can NOT be restored on the Exchange Server. The following steps show two ways in which to implement the DELETE_HARD_DELETE flag.

NOTES:

The deleted item retention time is zero by default, and it can be specified in the General tab of Private or Public Information Store Properties page from Exchange Administration program. It can also be set for individual recipients or public folders (the Information Store settings by default).

  • The SHOW_SOFT_DELETES flag is defined as follows:
    
       #define SHOW_SOFT_DELETES		((ULONG) 0x00000002) 


  • The DELTETE_HARD_DELETE flag is defined as follows:
    
       #define DELETE_HARD_DELETE		((ULONG) 0x00000010) 


  • Additional query words: Tombstones Soft Delete Hard DELETE_HARD_DELETE SHOW_SOFT_DELETES kbMAPI kbGrpMsg kbMsg kbDSupport

    
    Keywords          : kbMAPI kbMsg kbGrpMsg kbDSupport 
    Version           : WINDOWS:1.0
    Platform          : WINDOWS 
    Issue type        : kbhowto 

    Last Reviewed: July 13, 1999