Deleting messages in IMAP accounts

From MozillaZine Knowledge Base
Revision as of 23:42, 30 January 2008 by Tanstaafl (talk | contribs)
Jump to navigationJump to search
This article was written for Thunderbird but also applies to Mozilla Suite / SeaMonkey (though some menu sequences may differ).

It is perfectly appropriate for a deleted message in a IMAP account to be visible in webmail or other email clients. Deleting a message just sets a flag, and it's up to the GUI what it should do when there is a message with that flag set. However, once Thunderbird compacts (expunges) that folder, the deleted message shouldn't be visible any more from webmail or any email client because it has been physically deleted.

IMAP accounts provide several options to delete messages that aren't available in POP accounts. Tools -> Account Settings -> Server Settings -> "When I delete a message" has choices for "Move it to the Trash folder", "Mark it as deleted" and "Remove it immediately".

"Move it to the Trash folder" is very similar to deleting a message in a POP account. The main difference is that if you set mail.imap.expunge_after_delete to true using the Config editor Thunderbird will compact the folder after it successfully copies the message to the trash folder. [1] The same thing occurs if you move a message to another folder since moving a message deletes a message and then copies it. Shift+Delete deletes the message without copying it to the trash folder, and is also supposed to compact the folder (if you have that preference set). However, some users report that Shift+Delete doesn't always compact the folder. [2]

"Remove it immediately" doesn't actually remove the message despite its name. It just hides it from view and flags the message as deleted. That appears to be because Thunderbird doesn't support the optional UID Expunge command, which requires the server to support the optional UIDPLUS capability. It will be physically deleted when you compact the folder.

The only difference between "Mark it as deleted" and "Remove it immediately" is that it doesn't hide the message. It draws a line through the message in the folder listing. You can undelete the message by deleting the message again.

The Penelope extension and Eudora add some additional delete options. Some of this functionality might eventually be merged into Thunderbird.

Tools -> Account Settings -> Server Settings -> Clean up ("Expunge") Inbox on Exit will compact the Inbox folder when you exit Thunderbird. If you check "Empty Trash on Exit" it will also empty and compact the Trash folder when you exit.

See also