What is message undelete, and how do I set up this feature?
This document details the setup procedure for message undelete and explains how users and administrators can recover messages and mailboxes.
About Message Undelete
The message undelete feature allows the retrieval of individual messages and mailboxes that were accidentally deleted, without an administrator having to perform a restore from a backup. When a user deletes a message, it is moved to a "deletedmessages" folder. Users and administrators can go to this folder and copy specified messages or subfolders back to a user's inbox. Message undelete is essentially an extra trash folder.
The benefits of message undelete are related to backup and restore. This feature lets you take advantage of Mirapoint's NDMP image-backup solutions and still have a means for individual message and mailbox recovery.
Overview of the Setup Process
Message undelete can be enabled without LDAP or class of service. However, every user gets the feature and everyone's quota is the same. This can be set up with the CLI Mailbox Set Undeletequotacommand. For example, to give every user the message undelete feature and a uniform undelete quota, use the following CLI command:
where size-in-kilobytes is a numeric value for the size of the undelete quota in megabytes (for example, 1024 for a 1MB undelete quota).
For more information, see "Additions to Mailbox Hierarchy" in this article and Help Mailbox Set Undeletequota.
Message undelete can also be set up using LDAP and class of service. Class of service (COS) controls which users can access a list of available services. An LDAP lookup is done before permitting users to access the service. User and class information is stored in LDAP. The LDAP Routing license is required to set up message undelete using COS.
The set up process is in two stages:
- Modify LDAP entries.
- Activate the undelete feature.
Modify LDAP Entries
The LDAP attribute miMailUndeleteQuota:size-in-bytes is used to specify the undelete quota. The undelete quota is the maximum size of messages in bytes that can be in the deleted messages folder. This value cannot be unlimited (-1) or larger than the size of the disk. For example, to set the undelete quota to 10 megabytes, the LDAP attribute would read:
The presence of this LDAP attribute turns the feature on for the specified users or class. The attribute can be added to individual LDAP user entries. See the user entry example below:
Message undelete can also be configured using indirect COS. The LDAP attribute miCosDN: dn in a user entry refers to a different LDAP class entry. The LDAP class entry lists the services available for that class. Included in the LDAP class entry is the miMailUndeleteQuota attribute. All user entries that referred to the same miCosDN entry have the same services and undelete quota. See the indirect CosDN example below:
For more information on how to set up COS, refer to the Administrator's Guide for your MOS release.
Activate Message Undelete
To turn on COS checking for this feature, issue the CLI command Cos Enable Msgundelete.
Additions to Mailbox Hierarchy
The mailbox hierarchy on the Mirapoint appliance changes by adding a new top-level folder called "deletedmessages". This top-level folder includes a user folder that maps to all users on the Mirapoint system that have this feature enabled. For example, a user called "Larry" has a mailbox name of "user.larry". His "deletedmessages" folder would be "deletedmessages.user.larry". See Figure 1 below:
Figure 1 Deleted Messages Folder Screen
The "deletedmessages" folder is not created until a message is expunged (compacted) from the trash folder, or a mailbox is deleted. The "deletedmessages" folder stores as many deleted messages as allowed by the "miMailUndeleteQuota" attribute.
If the messages being placed in a users "deletedmessages" folder put the folder over the undelete quota, the oldest messages in the "deletedmessages" folder are removed until 10% of the quota space is free and the new message(s) are stored. Additionally, if a message being deleted is larger than the undelete quota, it is allowed in the "deletedmessages" folder and kept temporarily. The next message that is added to the "deletedmessages" folder removea the large message. For example, suppose the undelete quota is 10MB, and a deleted message was 20MB. All messages previously in the "deletedmessages" folder are removed and the 20MB message is saved in the "deletedmessages" folder. The next message that is deleted, even if it is only 1KB, removes the 20mb message.
Message and Mailbox Recovery
To recover messages or mailboxes, the Mailbox Undelete Mailbox command is used. This moves all messages from the "deletedmessages" folder to the corresponding mailbox parameter. For example, if an administrator issues the command Mailbox Undelete user.larry, all the messages from deletedmessages.user.larry are moved to user.larry.
IMAP users can retrieve mailboxes and messages without administrator involvement by subscribing to their "deletedmessages" folder. In their email client, the user would subscribe to this folder and then copy messages from his "deletedmessages" folder back into his inbox. If using MS Outlook or Outlook Express mail clients, there is an issue to be aware of. These clients assume the mail server is using the University of Washington (UW) namespace, meaning all folders are at the same level in the mailbox hierarchy. If the root folder is set to inbox, you will not be able to see the "deletedmessages" folder.
Figure 2 Example Mailbox Hierarchies
The Mirapoint system by default uses the Cyrus namespace (see Figure 2 above). One workaround is to create a second profile, with a different name, in MS Outlook and Outlook Express clients with a different root folder path, something other than the Inbox. A better solution is to switch your user community to UW namespace using the CLI Imap Set Namespace Uw command.
Administrators can copy messages and mailboxes from the "deletedmessages" folder back into the inbox's for POP and WebMail users. Administrators must add the access control list (ACL) permissions "l r s w i d" for the mailboxes deletedmessages.user.mailbox and user.mailbox. See the following CLI commands:
The administrator must then log in to deletedmessages.user.mailbox and copy the message back to the user's inbox.