The IMAP Way of Deleting a Message

With IMAP, deleting a message is a two-step process:
  1. Set the \Deleted IMAP system flag.
  2. Expunge (which is called "purge" or "compact" in some email clients).
Expunging can be "expensive" and any email client that is primarily an IMAP client, for example Mulberry or Pine, will discourage users from doing frequent expunges.

SeaMonkey Suite and Thunderbird are examples of email clients that were not originally designed as IMAP clients and have not (yet) converted to the IMAP way of deleting a message. The default in these email clients is to "move it to the Trash folder." To switch to the IMAP way of deletion in SeaMonkey Suite on OS X, go to the Mail & Newsgroups window and from the Edit menu, choose Mail & Newsgroups Account Settings > Server Settings. One of the configuration settings in this window is this:
  • When I delete a message:
    • Move it to the Trash folder
    • Mark it as deleted
    • Remove it immediately
The first and third of these options can put a strain on your IMAP server and can be confusing if you use multiple IMAP clients [*]. To avoid slow downs and confusion, and to switch to the IMAP way, choose the second option, Mark it as deleted.

In Horde/IMP, you can use the IMAP way of deleting a message by going to Options > Mail > Deleting and Moving Messages, and make sure that the following two options are not checked:
[ ] When deleting messages, move them to your Trash folder instead of marking them as deleted?
[ ] Use Virtual Trash Folder?
Many IMAP clients make it easy for a user to view a virtual mailbox [**] of either of the following:
  1. all messages in a mailbox with the \Deleted flag not set
  2. all messages in a mailbox with the \Deleted flag set
The first of these virtual mailboxes is useful if you do not want to be distracted by deleted messages. The second is sometimes called a virtual trash mailbox and is especially useful for managing a mailbox that contains spammy messages that had the \Deleted flag automatically set by the message delivery agent (MDA). My MaybeSpam virtual trash mailbox is analogous to the red (rubbish) actual mailbox that I discuss on the Reverse Spam Filtering page.

Most IMAP clients can be set up to automatically expunge messages when you close a mailbox and I recommend that you set up at least one of your IMAP clients to do this. I use Pine as my automatic expunger because I can set it up to prompt me whenever it is about to do an auto expunge. Here are the Pine configuration settings (which are the Pine default settings) that do this:
[ ]  expunge-only-manually
[ ] expunge-without-confirm
[ ] expunge-without-confirm-everywhere
Mulberry can also be set up so that it will prompt you when it is about to do an auto expunge. The relevant Mulberry Mailbox Preferences are:
[X]  Expunge on Close
[X] Warn on Expunge
As far as I can tell, SeaMonkey Suite and Thunderbird can not be set up to warn on expunge, but please post a comment about this if you know the story.

Tip: If you are paranoid about accidentally expunging an important message, I recommend that you use a backup-all mailbox. This way you will have a backup copy of every message you have ever received.

[*] With any setting other than "Mark it as deleted," the Mozilla-based email clients will completely hide any message in a mailbox that has the \Deleted flag set. For a discussion about how confusing this is to IMAP users, see this and this bug in

[**] A virtual mailbox or saved search is a set of messages that match a set of conditions. The messages might be a subset of a single actual mailbox or might come from multiple actual mailboxes. To learn more about this, see Sometimes a Mailbox is Just Not a Mailbox.

Hashtag: # [?]

Post & Read Comments (located elsewhere)



Post & Read Comments (located here)

Post a Comment



Links to this page

Create a Link



Each item © Nancy McGough
Each comment © the author of the comment web site hosted by
deflexions powered by Delicious · reflexions powered by Blogger
More deflexions & reflexions, & feeds available via the sidebar top & bottom

[link] For bookmarks & links, please use this page's permalink [link]