Issue
How do I delete messages, an inbox, and subfolders?
Solution
The following procedure can also be scripted by an administrator if desired (i.e., IMAP can be used like an API).
Deleting Contents of Inbox
This procedure does not delete the inbox or the user.
From IMAP (port 143), do the following commands:
Login administrator password
tag OK User logged in
Setacl user.fred Administrator Lrswipcda
tag OK Completed
Select user.fred
* FLAGS (\Answered \Flagged \Draft \Deleted \Seen)
* OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen \*)]
* 11263 EXISTS
* 12 RECENT
* OK [UNSEEN 1]
* OK [UIDVALIDITY 989348176]
tag OK [READ-WRITE] Completed
tag STORE 1:* +flags.silent \deleted
tag OK Completed
Expunge
* 1 EXPUNGE
* 1 EXPUNGE
* 1 EXPUNGE
* 0 EXISTS
* 0 RECENT
tag OK Completed
tag Logout
* BYE LOGOUT received
tag OK Completed
Alternatively, after,
tag Setacl user.username Administrator lrswipcda
use your favorite email client to delete and compact the mailbox using IMAP.
Deleting Inbox and Subfolders
From administration protocol or the CLI, enter the following commands:
Setacl user.username Administrator Lrswipcda
Mailbox Delete user.username
Mailbox Add user.username
Deleting a Range of Messages
From IMAP (port 143), do the following:
Login Administrator password
Setacl user.username Administrator Lrswipcda
Select user.username
Search All Before 30-Apr-2001 And After 01-Jan-2001
The list return is space separated. Change the spaces to commas and enter:
Store <list> +flags.silent \deleted
Expunge
Logout
Comments
0 comments
Please sign in to leave a comment.