Mailbox Scheduled Delete Service
You can schedule your mailbox to delete messages meeting specified criteria.
- Message name pattern
- Mailbox
- Extractability status
- Message age
For example, it is possible to create a configuration of the Mailbox Scheduled Delete service to periodically delete all messages more than a week old.
The Mailbox Scheduled Delete service can be configured to run once at a specified date and time, or periodically, such as once a month or twice a week.
Alternative for Mailbox Scheduled Delete Service for Global Mailbox
Mailbox Scheduled Delete Service is not available for Global Mailbox. However, as an alternative, you can implement the below Business Process (BP) to delete the messages from Global Mailbox (GM) Mailboxes.
The BP scans through all the GM mailboxes and delete messages accordingly. The maximum number of messages that can be deleted from a specific GM mailbox is limited to 10000, however, you can configure this limit. You can limit the number of messages to be deleted using the property com.ibm.mailbox.message.query.results.max.size in the global.properties file. This property will limit the number of messages to be retrieved as a query result which can be used to delete the messages. The default value is 10000.
<process name="Mailbox_Delete_GM_All_Mailboxes">
<rule name="Mbx_Count">
<condition>count(/ProcessData/Mailboxes_To_Delete/MailboxPath)> 0</condition>
</rule>
<sequence name="Delete">
<assign to="UseGlobalMailboxes">YES</assign>
<operation name="MailboxListServiceType">
<participant name="MailboxList"></participant>
<output message="MailboxListServiceTypeInputMessage">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="Mailboxes_To_Delete" from="*"></assign>
</input>
</operation>
<sequence name="Delete_Loop">
<choice>
<select>
<case ref="Mbx_Count" activity="Delete_Batch"/>
</select>
<sequence name="Delete_Batch">
<assign to="." from="/ProcessData/Mailboxes_To_Delete/MailboxPath[position() < 6]"></assign>
<operation name="Mailbox Delete Service">
<participant name="MailboxDelete"/>
<output message="DeleteRequest">
<assign to="." from="*"></assign>
</output>
<input message="inmsg">
<assign to="DeleteResults" from="*"></assign>
</input>
</operation>
<operation name="Release Service">
<participant name="ReleaseService"/>
<output message="ReleaseServiceTypeInputMessage">
<assign to="." from="*"></assign>
<assign to="TARGET">/ProcessData/Mailboxes_To_Delete/MailboxPath[position() < 6] | /ProcessData/MailboxPath</assign>
</output>
<input message="inmsg">
<assign to="." from="*"></assign>
</input>
</operation>
<repeat name="RepeatDelete" ref="Delete_Loop"/>
</sequence>
</choice>
</sequence>
</sequence>
</process>