How do I delete old messages in a mailbox using IMAP?
Mirapoint appliances permit the automatic deletion of old messages from a folder. This requires LDAP service, Cos Enable Msgexpiration, and the miMailExpirePolicy attribute in LDAP.
It is also possible to delete old messages without the aid of LDAP, using the IMAP Search command in IMAP, rather than Mirapoint administration service.
You can base your search on the date a message arrived in the folder, or on the Date: header field written by the sending client's system clock, with the following command sets, respectively:
tag Search Before dd-mmm-yyyy
tag Search On dd-mmm-yyyy
tag Search Since dd-mmm-yyyy
tag Search Sentbefore dd-mmm-yyyy
tag Search Senton dd-mmm-yyyy
tag Search Sentsince dd-mmm-yyyy
To delete messages in a folder using the IMAP service:
1. Connect to IMAP (port 143).
2. Log in as an administrator.
3. Issue the appropriate Search command, as follows:
tag Search Before 01-Apr-2003
* Search 1 2 3 4 5 6
4. Replace the spaces in the output results with commas, and use it in the Store command, as follows:
tag Store 1,2,3,4,5,6 +flags.silent \deleted
5. Issue the Expunge command, as follows:
* 1 Expunge ...
tag OK Completed
6. Log out of IMAP.
Please sign in to leave a comment.