Deleted messages (IMAP mode) cannot be hidden from the main view



Mail Window Front End
14 years ago
9 years ago


(Reporter: Preston Hunt, Assigned: Scott MacGregor)


Firefox Tracking Flags

(Not tracked)



(3 attachments, 1 obsolete attachment)



14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

Under the IMAP account settings for each mail server, one of the options is to
mark a message for deletion instead of moving it to a trash folder.  This is a
nice option because it is much quicker than moving a message to the trash folder.

However, Thunderbird does not have an option to "hide deleted messages" when
displaying the list of messages in the main frontend screen.  One possible
incarnation of this feature could be under the View -> Messages menu (add a new
menu selection, "view undeleted messages only").  

Without this feature, the mailbox will continue to display deleted messages
(with a tiny red X on the icon) until the folder is compacted.  This can result
in a very cluttered display.

Many other programs (e.g., Outlook 2003, Eudora, etc.) offer this feature; I
feel it would be a useful addition to Thunderbird as well.

Reproducible: Always
Steps to Reproduce:
1. Set Tools -> Accounts -> Server Settings -> When I delete a message = "Mark
it as deleted" for an IMAP server.
2. Delete a message from any folder.

Actual Results:  
Notice that the message is still visible in the list of messages, but now with a
red x over its icon.

Search under the View menu; no option exists to hide these deleted messages from
view until the folder is compacted.

Expected Results:  
The View menu (or somewhere else) should have an option to automatically hide
deleted messages from view until the folder is compacted.

Comment 1

13 years ago

I actually find the deleted mark somewhat helpful, as if a message was to all of
a sudden disappear when I hit delete, I'd be a bit more tempted to freak out and
wonder what's going on (or worry about making accidents), but I digress.

I sometimes use pine on the same account that I use thunderbird on, and pine
uses the 'deletion' mark just like Thunderbird does, by showing a big D next to
the message in the folder view.  What Thunderbird lacks, and what I find is a
useful feature to check before I expunge my deleted messages is a view of all
the messages I've marked for deletion: I'll commonly delete (mark as deleted)
all my spam/junk/etc, and then use pine to 'zoom in' on the messages marked
deleted, so I can make sure I don't expunge any accidentally deleted messages.  

As such, attached is a patch which adds the ability to search on a messages
deleted status, which would allow you to create a Thunderbird view which shows
only not-deleted messages, and allows me to get the above mentioned pine
behaviour from within Thunderbird.  It is made against current CVS, with 'cvs
diff -bu8pN' (as using 'write' to edit the source files doesn't make cvs diff


Comment 2

13 years ago
Created attachment 155361 [details] [diff] [review]
[DEFUNCT] Proposed patch to add 'Deleted' status search term

This patch adds the ability to search on a messages 'Deleted' status to the
Status search category of the message search tool in Thunderbird.

This 'works around' the author of this bugs problem, and adds additional
functionality I find incredibly useful.

I have tested this patch functions as billed, and it WFM in terms of not
causing my IMAP account to suddenly burst into flame and fall into the pacific


13 years ago
Attachment #155361 - Attachment description: Proposed patch to add 'Deleted' status search term → [DEFUNCT] Proposed patch to add 'Deleted' status search term
Attachment #155361 - Attachment is obsolete: true

Comment 3

13 years ago
Created attachment 155695 [details] [diff] [review]
Updated deleted view patch.  Now saves correctly.

My previous patch did not save the view properly if you created one, this patch
includes that fix as well.  Use this one.  My apologies to those I fuddled with
my other one.

Comment 4

13 years ago
Is there a more recent version of the suggested patch? While I can manually
adapt it to the current cvs, it doesn't seem to do anything. I wonder if its
patching an obsolete path in the code.

Comment 5

13 years ago
XRef Bug 247977

(Hi KM.)

Comment 6

12 years ago
As an update,the problems I had with Greg's patch were a couple of small errors
and assumptions I made in adapting it to recent builds. In fact it works quite

How do we get this integrated?

Comment 7

12 years ago
The patch doesn't really fix the reported problem, does it? Presumably you have
to use a saved search or something to make use of it - and hence have a saved
search for each folder.

The original report (which seems to be a dupe of bug #98097 - a bit of
housekeeping wouldn't go amiss on these bugs ;) - and what would be *really*
nice imho - is an option to hide deleted messages from *all* folders by default,
rather than having to do separate searches.

This patch *does* fix bug #247977 though?

Comment 8

12 years ago
With the patch, you don't exactly need to do a search to get an "undeleted"
view. You can simply add "undeleted" via the customize view option. It then
appears in the view pull down menu and you can select it instead of "all" for
any folder you like. In fact I extended the patch a bit, so that the "undeleted"
entry comes up in the default "view menu" without having to customize at all.

What this patch doesn't do is hide the deleted message after each deletion the
way evolution does. The new deletions only get hidden when you switch folders or
change views. At first, I thought this was undesirable. However, in practice it
makes it much easier to undo recent deletions when you are a bit too quick to
delete. In evolution the undelete is much more awkward in the hide mode.

This patch may not be perfect, but it helps a lot, and I think it should be

Comment 9

12 years ago
Um...  don't want to sound too stupid, but how do you apply this patch and where
is it?

Phil - newbie
This is an automated message, with ID "auto-resolve01".

This bug has had no comments for a long time. Statistically, we have found that
bug reports that have not been confirmed by a second user after three months are
highly unlikely to be the source of a fix to the code.

While your input is very important to us, our resources are limited and so we
are asking for your help in focussing our efforts. If you can still reproduce
this problem in the latest version of the product (see below for how to obtain a
copy) or, for feature requests, if it's not present in the latest version and
you still believe we should implement it, please visit the URL of this bug
(given at the top of this mail) and add a comment to that effect, giving more
reproduction information if you have it.

If it is not a problem any longer, you need take no action. If this bug is not
changed in any way in the next two weeks, it will be automatically resolved.
Thank you for your help in this matter.

The latest beta releases can be obtained from:

Comment 11

12 years ago
I have not applied this patch to my installation, but AFAICT, it has not been
integrated into the current branch or the trunk.  I am running the latest
nightly branch build, version 1.5 Beta 1 (20050925), and this feature is not

Also, to reiterate, resolving this bug should also resolve bug 247977.

I do not have sufficient privileges to change this bug status from UNCONFIRMED
to NEW, but this bug has been confirmed by more than one user, and there appears
to be a viable patch.  All it needs is a little attention from an authorized
developer to get it integrated into the main code base.

Comment 12

12 years ago
(In reply to comment #10)
I totally agree to Alan, this bug is definitely not solved.

Is there a chance to get a patched version (for Windows) to check the reported

Actually, it seems to me that the "IMAP way" is not very common under TB
developers at all, as most reports seem to be ignored as these do not use it
themselves. I hope someone accepts that this small change to be integrated.

Comment 13

12 years ago
Please excuse the crosspost, but if anyone is interested in discussing the validity of this bug, please read and respond to the topic "IMAP Users Feeling Neglected" in the MozillaZine Thunderbird Features forum:

Comment 14

12 years ago
Created attachment 213263 [details] [diff] [review]
Adds a Deleted or Not Deleted View for IMAP

Comment 15

12 years ago
Created attachment 213264 [details] [diff] [review]
Patch to allow "status deleted" imap search

Comment 16

12 years ago
I've just added two related patches to this bug. The first adds two views to the default views menu, one for "Not Deleted" and one for "Deleted" for use with IMAP.

The second patch adds in an "is deleted" or "isnot deleted" choice in the status drop down for boolean IMAP searches. Besides doing searches, it allows you to create custom view involving the "deleted" status.

The patches can be used together or separately. There is nothing totally new here, these are variations of the ideas in the 2004 patches. These are up to date, a bit refined, and apply directly to Thunderbird 1.5. They also work fine with the trunk.

Can we finally get this integerated some how?

Comment 17

12 years ago
Ideally, we'd only show this search term if the user was using the imap delete model - otherwise, it probably won't do the right thing. That might be hard with our current mechanism for populating the search terms. And we'd definitely only want to add the deleted/not deleted views if the user is using the imap delete model. If we can do this, then I'm happy to add this. 

Comment 18

12 years ago

The "view" patch I posted includes additions to the default Mailvews.dat as a convenience. If that part of the patch is deleted Imap/delete model users could still add them tehmselves through the "customize" menu. The default views would look no different than now.

As to the status/search item, just change the label from "deleted" to "Imap Deleted" or something else descriptive. I don't see how that would hurt or confuse  non Imap users, and certainly helps a lot for Imap/delete model users.
*** Bug 222405 has been marked as a duplicate of this bug. ***
QA Contact: front-end

Comment 20

10 years ago
Just though I'd let you know that this issue can be a complete block to using thunderbird in a small business. We use currently use mdeamon and make extensive use of shared/IMAP folders and this one issue (no hide deleted) means I just cant deploy thunderbird.

Comment 21

10 years ago
Seconded. This is a big usability deficit.


9 years ago
Flags: blocking-thunderbird3?
I could see this being able to speed up the ability to quickly delete folders from IMAP servers with what feels like little technical risk.  At the same time, I'm not sure I fully understand the UX issues involved.  Tweaking flags to put it on radar.
Flags: wanted-thunderbird3.0a2?
Flags: wanted-thunderbird3+


9 years ago
Attachment #213264 - Flags: ui-review?(clarkbw)

Comment 23

9 years ago
Jeff's patch in bug 190974 should fix this.
Last Resolved: 9 years ago
Flags: wanted-thunderbird3.0a2?
Flags: wanted-thunderbird3+
Flags: blocking-thunderbird3?
Resolution: --- → DUPLICATE
Duplicate of bug: 190974
Comment on attachment 213264 [details] [diff] [review]
Patch to allow "status deleted" imap search

removing review on this, something from bug 190974 was checked in
Attachment #213264 - Flags: ui-review?(clarkbw)
You need to log in before you can comment on or make changes to this bug.