Closed Bug 11051 (vfolders) Opened 21 years ago Closed 15 years ago

Virtual folders / mailboxes (as in Novell (Ximian) Evolution, Opera, or Google GMail labels)

Categories

(MailNews Core :: Backend, enhancement, P3)

enhancement

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: sspitzer, Assigned: Bienvenu)

References

(Blocks 1 open bug)

Details

Attachments

(5 files, 2 obsolete files)

Virtual folders (a folder which doesn't physically exist, but shows the
results of a search across other folders)
Whiteboard: HELP WANTED
Target Milestone: M15
QA Contact: lchiang → laurel
Bulk-resolving requests for enhancement as "later" to get them off the Seamonkey
bug tracking radar. Even though these bugs are not "open" in bugzilla, we
welcome fixes and improvements in these areas at any time. Mail/news RFEs
continue to be tracked on http://www.mozilla.org/mailnews/jobs.html
Reopen mail/news HELP WANTED bugs and reassign to nobody@mozilla.org
Keywords: helpwanted
Summary: [HELP WANTED] Virtual folders → Virtual folders
Whiteboard: HELP WANTED
Target Milestone: M15
A `Special folders' pseudo-account used to show these folders could also contain 
folders representing screen-scraped versions of Web discussions (e.g. Slashdot).
adding blizzard and shaver, they've talked about this in #mozilla recently.
Blocks: 58380
*** Bug 65116 has been marked as a duplicate of this bug. ***
Evolution, http://www.ximian.com/products/ximian_evolution/features.html, has
this feature and it's fast...
*** Bug 119443 has been marked as a duplicate of this bug. ***
see Gmail at
http://gmail.linuxpower.org/
for an implementation of virtual folders ( vFolders ).
It uses MySql for storing messages, and each vFolder is an SQL query.
This is an important enhancement of the mail client!

As of Mozilla 0.9.9 users can label their emails as "Urgent" 

Associating a virtual folder with a serach or message filter, 
so that all email matching certain criteria (e.g. Urgent) can 
be easily accessed in one "virtual folder" is an important
feature for corporate or power users!!

This will facilitate fast access to email which still needs to be
taken care of.. e.g. to do items.. 

PLEASE consider bumping this one up in priority! thx. 

see also comments on <strike><A
HREF=http://bugzilla.mozilla.org/show_bug.cgi?id=138085>Bug 138085</A></strike>

just for completeness, we've got mailviews, but those are subsets of a given folder.

to do this in mozilla, we start with rooting the thread pane in a search view
(like in advanced message search). 
This is a very good feature. Currently supported in Ximian Evolution, this acts
as a very nice tool for users who use a lot of email accounts. Instead of going
in to each folder and reading mails it provides a very convenient and easy mail
sorting and viewing
*** Bug 97390 has been marked as a duplicate of this bug. ***
*** Bug 218317 has been marked as a duplicate of this bug. ***
*** Bug 225124 has been marked as a duplicate of this bug. ***
Blocks: mailviews
*** Bug 230300 has been marked as a duplicate of this bug. ***
*** Bug 240343 has been marked as a duplicate of this bug. ***
*** Bug 203376 has been marked as a duplicate of this bug. ***
How about matching Google's new gmail features?  I've heard Opera's new mail
client has similar features

As I understand it:

 o There's one 'real' folder, the inbox.

 o Every other folder is 'virtual': Search results such as recipient, domain,
sender, or manually created 'virutal' folders holding aliases/shortcuts of
actual e-mails, dragged there by the user.

 o Never delete anything (though I don't quite understand the benefit, at least
not taken literally).

Anyone more familiar with it, or familiar with Opera's features?
*** Bug 242516 has been marked as a duplicate of this bug. ***
Should the severity be changed to "enhancement"?
Marking enhancement -- doesn't meant his bug is any less important.
Severity: normal → enhancement
*** Bug 243211 has been marked as a duplicate of this bug. ***
(In reply to comment #19)
> How about matching Google's new gmail features?  I've heard Opera's new mail
> client has similar features
> 
> As I understand it:
> 
>  o There's one 'real' folder, the inbox.
> 
>  o Every other folder is 'virtual': Search results such as recipient, domain,
> sender, or manually created 'virutal' folders holding aliases/shortcuts of
> actual e-mails, dragged there by the user.
> 
>  o Never delete anything (though I don't quite understand the benefit, at least
> not taken literally).
> 
> Anyone more familiar with it, or familiar with Opera's features?

I am not using Opera but I tried Opera 6.x and recently Opera 7.5 beta, I looked
especially on email client because searching and maintaining email messages in
Mozilla is a nightmare.

On the other hand, Opera is a nightmare because it heavily lacks in usability -
it is too crowded, it has too many applications/features in one box. But the
ability to use virtual folders, there email search features and gui controls are
suberp compared to Mozilla. If Opera would provide a standalone email-client
with a clean and user friendly gui than I would immedetaly switch to it.

Deleting emails - as I remember you delete emails only within the inbox, that's
the folder where emails physically exist.

Virtual Folders in general - I think if the Mozilla email client (or Firebird)
should survive then developers should really keep an eye to enhance the
productivity of the email client, that is by offering a much better search
feature and virtual folders, both are required. Opera and Bloomba go into this
direction. Developers should also look at Powermarks
http://www.kaylon.com/power.html , although a bookmark manager, it was one of
the first applications (which I used!) which uses a similar concept as used to
manage emails in Opera and Bloomba.

Karl
Summary: Virtual folders → Virtual folders [gmail]
Summary: Virtual folders [gmail] → Virtual folders
I agree.  Virtual folders -- as in Ximian Evolution -- is one of our two major
wish-list items for Mozilla.

(The other is having mail lists default to BCC -- which can avoid disastrous
mistakes when one is inattentive!)
*** Bug 248178 has been marked as a duplicate of this bug. ***
Alias: vfolders
Summary: Virtual folders → Virtual folders (as in Novell (Ximian) Evolution, Opera, or Google GMail labels)
Summary: Virtual folders (as in Novell (Ximian) Evolution, Opera, or Google GMail labels) → Virtual folders / mailboxes (as in Novell (Ximian) Evolution, Opera, or Google GMail labels)
taking. I'm going to look at doing virtual folders - our first stab will
probably just be for a single folder (i.e., not cross folder searches) because
we think we can do that in the 1.0 timeframe - ultimately, of course, we need to
do cross-folder searches, so I'm going to keep that in mind as I go.
Assignee: nobody → bienvenu
these are some backend changes that allow front end js code to create virtual
folders, and also some little tweaks to disable some commands for virtual
folders, etc. And I also added some comments related to the global inbox
because I got bit by the functions in the vf work.
Attachment #153674 - Flags: superreview?(mscott)
I'll attach the front end changes when I have them hooked up to the UI
appropriately - I'll add an option to save the current quick search as a virtual
folder (VF), and also an option to save the current view (e.g., view |
important). We'll also add a similar option to the advanced search window.

Some notes on the implementation so far:

There's a new folder flag MSG_FOLDER_FLAG_VIRTUAL. When you click on a folder in
the folder pane, we check if it's a virtual folder. If it is, we get the search
terms from the VF database, and set a global js variable, gVirtualFolderTerms.
We then set the uri of the folder that's getting loaded to the real folder the
virtual folder is based on. Later on, the code that creates the view checks if
gVirtualFolderTerms is set, and if so, does a quick search with the terms, on
the real folder. So, for the most part, the UI thinks it's showing the real
folder, so all the commands on the messages work appropriately.  We'll probably
need to tweak it somewhat so the window title is correct...
Sorry for this spam but I felt that this had to be said.

This is a step in the right direction but is it really worth having this without
multiple folder, multiple account search? The most useful virtual folders I can
currently think of are "All unread messages" and "All flagged/important
messages". I can't really think of a good scenario where only searching a single
folder is enough (maybe if I stopped organizing my messages into folders this
would be good enough).
couple of questions:

1. will this work for IMAP?

2. it seems like searches may be slow if the search is triggered every time,
particularly with IMAP where the search is on a remote system. Is there any way
to optimize this by caching search results in some way and checking non-virtual
folders when doing the search to see if they have changed since the last search
> is it really worth having this without multiple folder, multiple account search
Not for all users, but for some users, yes.

>will this work for IMAP?
this will work for IMAP, news, and local folders. We do the search locally,
after updating with the latest info from the server about the contents of the
folder. We're just using quicksearch, which is local.

there are lots of issues having to do with keeping the virtual folder contents
up to date when the underlying folder is changed. I haven't written the code to
deal with those things yet, but I believe by adding a db change listener on the
underlying folder db, I can keep the virtual folder contents up to date.
Attachment #153674 - Flags: superreview?(mscott) → superreview+
Cool!  Does threading work in virtual folders?
(In reply to comment #33)
> Cool!  Does threading work in virtual folders?

I filed a bug on this issue some time ago:
http://bugzilla.mozilla.org/show_bug.cgi?id=229568

If virtual folders is being developed that bug is probably dependent on this bug.
This makes it so the virtual folders code can add a pending listener to a db,
and when the db is opened, the listener automatically gets added. To do this, I
changed the way db's are opened by adding a msg db service call that everyone
goes through.

I still need to test this some more - I've tried adding new pop accounts,
invalidating msf files, etc but more testing is needed.
this is the front end work so far - needs to be cleaned up, and some problems
fixed, but it basically works.
patch for review.
Attachment #154532 - Attachment is obsolete: true
Attachment #154667 - Flags: superreview?(mscott)
Comment on attachment 154667 [details] [diff] [review]
add ability to add pending listeners to db

new, even bigger, patch upcoming :-(
Attachment #154667 - Attachment is obsolete: true
Attachment #154667 - Flags: superreview?(mscott)
Attachment #154799 - Flags: superreview?(mscott)
Attachment #154799 - Flags: superreview?(mscott) → superreview+
Just as a general heads up to all those interested :

http://appleinsider.com/article.php?id=532

"smart mailboxes" debut in the next version of OS X.
(In reply to comment #39)
> Created an attachment (id=154799)
> add pending listeners to db, expose virtual folder property to rdf, use account
> manager to listen to folder changes.
> 

This has been showing up as patched in recent TB nightlies, but nothing seems to
be exposed to the user.  Is it because the UI and/or backend are not ready yet?
 Any idea if this will be finished soon (0.8 perhaps)?  Would love this feature.
I've only been checking in the backend changes. I've pretty much finished the
front end for the single folder virtual folder. However, it won't be checked in
for .8 since I'd like to get more testing in before putting it into a release.
In the meantime, I've been working on the backend and front end for cross-folder
virtual folders and that's coming along fairly well. After .8 ships, I'll start
checking in the front end changes to expose this to the user, on the trunk first.
This adds backend support for cross-folder virtual folders. I changed db change
listener and announcer interfaces to pass around msg hdrs instead of msg keys
since msg keys aren't sufficient in cross-folder views. I changed the search
scope to be a list of uris and added code to parse them. I added the scope and
search terms to virtual folders.dat so that we could survive the .msf files
getting deleted by the user, or older versions of thunderbird. I added a
cross-folder virtual folders view which inherits most of its functionality from
the search view . (If we wanted, we could now add a message pane directly to
the search results window with very little effort)
Attachment #157059 - Flags: superreview?(mscott)
Comment on attachment 157059 [details] [diff] [review]
backend work to support cross folder virtual folders

> + * Portions created by the Initial Developer are Copyright (C) 2001

oh really?

--

how's the performance on an inbox with 300,000 messages?
My gmail-box only has 80k, but it works fine.
Comment on attachment 157059 [details] [diff] [review]
backend work to support cross folder virtual folders

what does XFV stand for, cross folder virtual?

You'll need to modify the thunderbird factory in mailnews\build to register
your new class for thunderbird.

should we hold off on checking this into the branch until 0.8 goes out the
door?
Attachment #157059 - Flags: superreview?(mscott) → superreview+
yes, XFV stands for cross folder virtual.

I did modify the factory in mailnews/build - it's there buried in the diffs.
Nothing would be working very well if I hadn't done that :-)

I'll definitely hold off until .8 is out before checking this in the branch.

Re scalability, for the single folder case, our performance is the same as
custom views - we basically do a scan through the db matching the terms against
all the headers. For the cross-folder case, we currently re-evaluate the search
when you open the virtual folder. So  performance depends on how large and
numerous your folders are. And in the case of IMAP, how fast your server is.
Utlimately I'd like to cache the result hdrs in the virtual folder db but I may
not get to that for 1.0, unless I get some help.
Looks like some interfaces were tweaked by this patch.  Shouldn't you bump the
UUIDs of those interfaces?
I did actually bump the uuids of the interfaces that a third party might
actually use...but I'll bump the rest as well.
Will this also implement virtual folders that can be based on arbitrary labels
(i.e. and arbitrary large set of arbitrarily many different labels) as in GMail?
Does the latest patch include cross account virtual folders? If not, is this
planned for 1.0?
whatever search you can define with advanced search can be defined as a virtual
folder - so yes, you can search over a set of labels.

cross-account search/virtual folders may not happen for 1.0 - we have no ui for
defining cross-account searches, and the search backend doesn't currently
support cross-account searches. One problem with cross-account searches is that
different accounts have different sets of allowable search criteria and the
backend code is not sophisticated enough to handle that.

That being said, I understand that cross-account virtual folders would be a good
feature to have.
the most recent checkin here caused bug 258138
> the most recent checkin here caused bug 258138

bug 258138 was something else.  I filed bug 258143.
this patch enables the front end for cross-folder virtual folders, and supports
applying quick search and views to virtual folders
Comment on attachment 157984 [details] [diff] [review]
front end changes for cross-folder virtual folders

I need to do the corresponding seamonkey changes in order to not break
seamonkey, but they should look the same.
Attachment #157984 - Flags: superreview?(mscott)
Attachment #157984 - Flags: superreview?(mscott) → superreview+
Virtual folders, based on search results, is great feature. 
Today we can set to every leter one of 6 labels, we can manualy rename every of
labels on a client side.
I think it will be useful to set some label to one letter simultaneously - for
example, by project and by product. 
In this case, one letter will be placed in virtual folder, formed with search by
standart RFC822 attributes, like "from:" or "subject", and in other folders,
assigned by my own assigned attributes , like "project a", "project a-hardware"
and "project c".
I just tried the feature for the first time. I'm using GTK2 build 2004090722 on
Linux. (Most of) my mail is on an IMAP server. Some comments:

1) This will be awesome when the few remaining glitches are resolved. However,
to use the feature's full potential, I guess I will need a much more powerful
IMAP server. I've created a virtual folder that searches through all the real
folders on my main account, and opening the folder takes about five minutes of
my mail server thrashing the disk. Is there a good IMAP server for Linux that
keeps indexes of the folders in some kind of a database for fast access, and at
the same time is able to use the standard mbox format (or at least, import it
without problems)?

2) There is a problem with accented letters. I used one in the name of my new
virtual folder an it's displayed as &AOE- in the folder pane. (I mean just the
one letter, not the whole name.) The folder does work, though.

3) Thanks to this new folder, I discovered some old spam filtering false
positives. I marked them as not junk, and then sorted the view on the spam flag
to see if there were any more. The view was sorted as if those false positives
were still marked as junk, which they weren't anymore. When I opened the folder
again and sorted on the spam flag, it was OK.

4) When playing with the (non-working) quick-search and the (working) View
drop-down menu, I managed to crash Mozilla. The talkback incident ID is
TB762462E. I lost the rest of this message (I had saved the beginning before
then), which, I believe, was it item number 13. Let's see how much I can
remember or rediscover. Interestingly, after the crash the virtual folders I
created do exist and work, but the one with the accented letter has a different
name: now, there's a pound sign instead of the accented letter (which was 'a'
with an acute).

5) I can't rename or move the virtual folders. It's trying to rename a folder on
the IMAP server, which doesn't exist. The server reports that RENAME command failed.

6) However, when trying to rename the vfolder with the accented letter (now
pound-sign), the error is invalid or missing argument to LSUB.

7) I didn't dare trying to delete a vfolder. ;-)

8) I can't search the vfolders. (SELECT command failed, UID FETCH failed.)

9) Quick-search doesn't seem to work. When I type something and wait or press
Enter, the Clear button stays disabled, the view blanks and repopulates, but all
mails in the vfolder are displayed.

10) The View drop-down does work, but there's a minor cosmetic problem:
initially, when I open the folder, there is nothing selected in the View drop-down.

11) Compact This Folder probably doesn't make sense in the vfolder's context menu.

12) There's no easy/obvious way to create a vfolder as a subfolder of another
folder, or in a different account.

13) I haven't found a way to display how the vfolder is defined, or to change
the definition, or even just to find out that a folder is virtual.

14) This is not really about virtual folders, but they kind of make it more
important that there is a powerful search feature. Even in creating the first
query that I tested vfolders with, I found Mozilla's message search too
limiting. I realize that creating a full boolean search would be a UI nightmare,
but perhaps it would be possible and reasonably easy to create a
search-within-search or combine-searches feature? Better yet, search within a
union of search results. In fact, if searching within virtual folders worked,
then "union folders" would be about the only thing missing. Hmm, actually, other
set operations, too... ;-) Nah, I'm getting too carried away.

These points aside, this is a really useful and great feature. Great job, thanks
a lot!
thx for your comments and testing. I can't address everything right now, but
here are some comments that will address a few of your comments.

One big remaining task is some UI to define and edit virtual folders. It would
allow you to edit the search terms, pick which folders to search, and probably
allow you to say that you want the search to be offline/local (as long as you're
not searching on message bodies, that would help your performance problem).

We were not planning on supporting vfolders that are subfolders of vfolders
initially.

I've seen the crash, but haven't been able to find reproducible steps...

Deleting a virtual folder should actually work. Renaming might just end up being
disabled and we'd allow you to edit the name in the properties dialog. Quick
search should work - it works for me. The accented characters must have to do
with some confusion over whether the folder name is imap mod-utf7-encoded.
(In reply to comment #57)
> 3) Thanks to this new folder, I discovered some old spam filtering false
> positives. I marked them as not junk, and then sorted the view on the spam
> flag to see if there were any more. The view was sorted as if those false
> positives were still marked as junk, which they weren't anymore. When I
> opened the folder again and sorted on the spam flag, it was OK.

Bug 181143.
(In reply to comment #57)

Where can i check out this new feature?  Where can i get the build that you are
talking about (GTK2 build 2004090722) ? ....i tried the ftp site
(ftp://ftp.mozilla.org/pub/mozilla.org/thunderbird/nightly/2004-09-08-14-0.8/),
but this doesnot seem to have the virtual folder feature in it.....

thanks for the help in adavance.....

> I just tried the feature for the first time. I'm using GTK2 build 2004090722 on
> Linux. (Most of) my mail is on an IMAP server. Some comments:
Kudos to alert user Vaclav for even finding the feature :-) it's rather hidden
right now. You can save an advanced search as a virtual folder. Also, a quick
search, or a view, using the quick search menu or view dropdown menu, respectively.

Eventually there will be a menu command to create a new virtual folder.
(In reply to comment #61)
> Eventually there will be a menu command to create a new virtual folder.

I'm thinking of virtual folders as the views in Opera. 

There are some default views. For Mailing Lists, Active Threads, Active Contacts 
and Attachements. Each has sub entries. 

Mailing lists has thunderbird-list, mozilla-list, etc. 

Active Threads contains all messages I've sent and their replys in a threaded 
view.

Attachements is devided into documents, pictures, audio, ...
(In reply to comment #62)
> (In reply to comment #61)
> > Eventually there will be a menu command to create a new virtual folder.
> 
> I'm thinking of virtual folders as the views in Opera. 
> 
> There are some default views. For Mailing Lists, Active Threads, Active Contacts 
> and Attachements. Each has sub entries. 
> 
> Mailing lists has thunderbird-list, mozilla-list, etc. 
> 
> Active Threads contains all messages I've sent and their replys in a threaded 
> view.
> 
> Attachements is devided into documents, pictures, audio, ...

Hi there,

I am not sure if this message arrives at the right recipient.
However, notes to Virtual Folders.
I have tested Opera 7.5 in June, the Virtual Folders where actually confusing,
especially when trying to delete emails, though I am not sure if there were
still some bugs in 7.5 or some other quirks.
Though my conclusion for Mozilla is that it should
a.) Keep the real folders as they are
b.) Add Filters instead of Virtual Folders. Well, a Filter behave the same as a
Virtual Folder though it is probably less confusing than Virtual Folders only. I
envision this filters to be displayed below the folders. I have started to play
around with user interaction scenarios for Mozilla but did never have the time
to complete them, including screenshots of the GUI of how it should look like.
This is real complex staff.

If this message arrives at the developer working on this staff and if you are
interested in the conceptual design of this staff then please drop me an email
and I will check if I am able to complete the docs I started working on.
Another point what I would find very convinient, in combination with filters, is
to allow to add multiple keywords to an email and then search emails by this
keywords, a concept used in Powermarks(Bookmark Manager) which is really
extremely helpful.

Thanks,

Karl 
(In reply to comment #63)
> I have tested Opera 7.5 in June, the Virtual Folders where actually confusing,
Indeed, it's a complete other approach from what's usual, but I find it more 
convenient this way. I now use the 7.6 Preview of Opera.

> Though my conclusion for Mozilla is that it should
> a.) Keep the real folders as they are

Real folder should be still present of course.

> b.) Add Filters instead of Virtual Folders.
Filters are already implemented. I use them to move messages to different 
folders. The advantage of Virtual Folders is, that you don't have to sort the 
mails manually and you can have one mail in more than one folders. That's a 
reason why deleting is more complicated. Should the mail only deleted from this 
Virtual Folder or entirely?

> I envision this filters to be displayed below the folders.

I would like the conventional folders under my virtual ones because I'd use them 
more often. My categories as Mailing lists and attachements, would be under the 
root in the navigation pane. Why not let the user chose or build his preferred 
structure?
> > b.) Add Filters instead of Virtual Folders.
> Filters are already implemented. I use them to move messages to different 
> folders. The advantage of Virtual Folders is, that you don't have to sort the 
> mails manually and you can have one mail in more than one folders. That's a 
> reason why deleting is more complicated. Should the mail only deleted from
this Virtual Folder or entirely?
Well, here comes the problem.
YES, if you delete an email then it is deleted, regardless where you view this
email. And there shouldn't be any nonsense messages which ask you if you want to
delete this email from this folder only.
Though I think you didn't understand what I mean.
A "virtual folder" is nothing else than a "filter". What you call a "virtual
folder" I would call a "filter", that's the only difference. I call it a filter
because if you *delete* a filter it is clear that you only delete the *filter*
and not any email messages. If you call it *virtual folder* then this phrase
contains the word *folder* which opens the question if emails are deleted if you
delete the *virtual folder*.
My feeling is that the term *virtual folder* is a fashion term only and the only
effect it has is to confues the average user.
So, why not keep it simple, there are *folders* and *filters*.

> > I envision this filters to be displayed below the folders.
> 
> I would like the conventional folders under my virtual ones because I'd use them 
> more often. My categories as Mailing lists and attachements, would be under the 
> root in the navigation pane. Why not let the user chose or build his preferred 
> structure?
I think if filters (virtual folders) are displayed on top or on bottom is a
secondary issue. I would display them on bottom because you still have the
*Inbox*, *Unsend messages*, *Send*, etc. folders. And again, keep it simple!
What I like in Mozilla is that I don't have hundreds of GUI options to set, make
*one* but good and simple GUI and you don't need all this extra options like
other vendors.
Just let ppl build the folder structure they like, and everyone will be pleased
without needing any new UI menu that will not suit all the people's need
- clicking on a vFolder change the sorting preference of the inbox (ascending vs
descending order)  (Win)
- the vFolders have no default filter: the combobox is not set to "All" so its
size is not the same as the combo box on the right(Win)
(In reply to comment #65)
> A "virtual folder" is nothing else than a "filter". What you call a "virtual
> folder" I would call a "filter", that's the only difference. I call it a filter
> because if you *delete* a filter it is clear that you only delete the *filter*
> and not any email messages. If you call it *virtual folder* then this phrase
> contains the word *folder* which opens the question if emails are deleted if you
> delete the *virtual folder*.
> My feeling is that the term *virtual folder* is a fashion term only and the only
> effect it has is to confues the average user.
> So, why not keep it simple, there are *folders* and *filters*.

Well, as my understanding goes, A "virtual folder" is different from a "filter"
in a small but powerful way. Let me see if i can explain this clearly (to the
best of my understanding).

When you apply a filter to a message in the Inbox, the message is "moved " to
the new folder (say, mozilla-list). So the message now exists only in the filter
folder (mozilla-list ) and not in the Inbox. (of course there are other kinds of
filters which allows you to copy, label, mark, delete etc ). So a purpose of the
filter is the automate the moving of the message from the Inbox to a different
folder, in this case mozilla-list.

If you create a "virtual folder" mozilla-list . It acts pretty much like the
filter. But the message is not moved to the mozilla-list folder, but a hard link
to the message is created in the mozilla-list folder. Thus now the message
exists in both the Inbox and the  virtual folder (mozilla-list). so you can read
the same message from either the mozilla-list folder or the Inbox and have to
delete the message from only one of the folders.

A use-case of this is let us say you have a virtual folder for mails from your
friend Mark and another virtual folder for mails with "Sex" in the subject. Now
Mark sends you a mail with "Sex" in the subject line. In the virtual folder
case, the message not only stays in the Inbox but also shows up in both the
virtual folders (Mark and Sex). And both the messages in the virtual folders
(Mark and Sex) are hard links to the message in the Inbox. 

If you use filters for the same , then the message not only moves out of Inbox,
It will only show in one of the "actual folder" (either Mark or Sex) depending
on which filter is run first.

hope that clears the difference between the two a little bit.....



(In reply to comment #65)
> > > b.) Add Filters instead of Virtual Folders.
> > Filters are already implemented. I use them to move messages to different 
> > folders. The advantage of Virtual Folders is, that you don't have to sort the 
> > mails manually and you can have one mail in more than one folders. That's a 
> > reason why deleting is more complicated. Should the mail only deleted from
> this Virtual Folder or entirely?
> Well, here comes the problem.
> YES, if you delete an email then it is deleted, regardless where you view this
> email. And there shouldn't be any nonsense messages which ask you if you want to
> delete this email from this folder only.
> Though I think you didn't understand what I mean.
> A "virtual folder" is nothing else than a "filter". What you call a "virtual
> folder" I would call a "filter", that's the only difference. I call it a filter
> because if you *delete* a filter it is clear that you only delete the *filter*
> and not any email messages. If you call it *virtual folder* then this phrase
> contains the word *folder* which opens the question if emails are deleted if you
> delete the *virtual folder*.
> My feeling is that the term *virtual folder* is a fashion term only and the only
> effect it has is to confues the average user.
> So, why not keep it simple, there are *folders* and *filters*.

I think one correct term could be *Views*
> Well, as my understanding goes, A "virtual folder" is different from a "filter"
> in a small but powerful way. Let me see if i can explain this clearly (to the
> best of my understanding).
> 
> When you apply a filter to a message in the Inbox, the message is "moved " to
> the new folder (say, mozilla-list). So the message now exists only in the filter
> folder (mozilla-list ) and not in the Inbox. (of course there are other kinds of
> filters which allows you to copy, label, mark, delete etc ). So a purpose of the
> filter is the automate the moving of the message from the Inbox to a different
> folder, in this case mozilla-list.

I am thinking of this different, the email message exists in the Inbox or any
other physical folder. The filter is not a folder but a filter only, it will
show you all messages of "mozilla-list", it does this by some sort of reference
or keywords. With the filter approach I have in mind you can't move(drag)
messages to filters or between filters, though you could move a message from the
filter view  to a different physical folder. However, if you click on the filter
"mozilla-list" then it would show you all messages which contain the keyword
mozilla-list.
 
> If you create a "virtual folder" mozilla-list . It acts pretty much like the
> filter. But the message is not moved to the mozilla-list folder, but a hard link
> to the message is created in the mozilla-list folder. Thus now the message
> exists in both the Inbox and the  virtual folder (mozilla-list). so you can read
> the same message from either the mozilla-list folder or the Inbox and have to
> delete the message from only one of the folders.

I think that's exactly what I described above. The critical point here is how
you reference the messages so that they can be found by a filter. It doesn't
make sense that Mozilla starts searching through all messages as in the current
version, that takes too much time. It needs some kind of indexing - a tricky part.

> A use-case of this is let us say you have a virtual folder for mails from your
> friend Mark and another virtual folder for mails with "Sex" in the subject. Now
> Mark sends you a mail with "Sex" in the subject line. In the virtual folder
> case, the message not only stays in the Inbox but also shows up in both the
> virtual folders (Mark and Sex). And both the messages in the virtual folders
> (Mark and Sex) are hard links to the message in the Inbox.

With filters, the message will also show up in the Inbox and in any filter with
keyword Mark or Sex. Though the filters are not "hard links", the filter would
just look up for all messages with keyword Mark and Sex.

> If you use filters for the same , then the message not only moves out of Inbox,
> It will only show in one of the "actual folder" (either Mark or Sex) depending
> on which filter is run first.

With filters, the message will always be in one physical folder and will show up
in any filter which matches the keword(s) of this message. The physical folders
remain as in the current version, there is no difference of how to maintain
folders or how to move messages. The filters are just an add on to quickly show
messages with certain keywords or criteria, almost the same as currently in the
top pane from where you label the messages as Important, Work, etc. Though the
filters shouldn't be in the top pane as in the current Mozilla version because a
Label is something different than a filter. And, filters require a data
structure and indexing mechanismn which instantly displays the messages with the
specified criteria.
 
> I think one correct term could be *Views*

I like the term "Views", the only thing that worries me with this term is that
it is very generic, folders are also a "view", the folders view and the other
would be filter view, or whatever other view.

How could it be perfect (In my opinion) :

1. There should be an hierarchy of labels
 - Personal > Friend > From 2000-2001 school year

2. There should be filters applied to every mail reiceived (not a per-inbox
filter as now)
 - if from:paul@domain.tld, label "Personal > Friend > From 2000-2001 school year"
 - if List-Id exists, label "Mailing-List"
 - if List-Id contains "aaa@b.c" label "Mailing-List > aaa"

3. Any mail could get an unlimited number of labels

4. True folder doesn't exists anymore (Maybe one folder per account physicaly
but not displayed), even the "Inbox" item should be able to be a Search Folder

5. All "Folders" are in fact "Views"
 - Inbox is a view of Everything
 - Friends is a view of any mail with label "Personal > Friend" (SubLabels has
rom 2000-2001 school year included)

6. "Views" are in fact filters of another sort who permit filters like : 
 - Mail with label "Personal > Friend" including subLabels
 - Mail receivied in the last week
 - Mail (not) contained in another "View" (Usefull for not having to change all
filters if they are often the same in a big number of views)
 - Unread Mails

7. Filters are Expressions (Hard for the UI i think) like :
 - Unread and (friends or newsletters)
--> Not very dificult if filters have name and we could enter an expression but
non-geeks could have problems with that concept, maybe a choice between a
simplified UI and a text box with the expression is the
usable-powerfull-and-easy solution)

8. Spam filter is just an hardcoded Mail filter who add a special label...

9. The Adress book became an hardcoded label hierarchy (so they are usable in
View-Filters as other)
   AdressBook > Professionnal Contacts > Some Company > John Acroft

10. Ease creation of new "Views" with popup menu :
 - Create Views for a label hierarchy (Could emulate a folder way of organisation)
 - Mails in this view, Reiceived in the last 3 Days
 - Mails in this view who are Unread
Having recently looked at POPFile on SourceForge, I was wondering whether their
scheme of adding custom headers to an email might be useful for implementing the
assignment of unlimited multiple categories to any single email.  The added
headers could be something like:

X-Mozilla-Mail-Category: personal
X-Mozilla-Mail-Category: friends

etc.

of course, the downside is that you're modifying the headers in the original
email, but that could also be viewed as a plus.  Or is there maybe a way to
store these custom headers in a separate location, linked by message ID?

I tried adding my own custom header filter in TB 0.8 (Win) to test out this
approach, and found that I was getting everything - is filtering on custom
headers not yet fully working?  I tried searching for a bug related to this but
couldn't find one.  Please let me know if I missed it.

Along these lines, I think a useful filter would be 'all messages from this
sender', where it would filter on the 'from' field based on the currently
selected message.  I can't imagine this is a new idea, but am somewhat daunted
by the prospect of trying to find it - if someone more knowledgeable could point
out to me an RFE that is dealing with improvements to available filters, I'll go
there and add my vote.  We could make this feature even fancier if we allowed a
filter such as "show messages from all people in this address book group".  Some
interesting UI issues to resolve for this, but what awesome potential!

thanks,
Shi.
Note sure these are worth reporting at this stage, but here are a couple things
I've noticed (in the 20040924 & 20040930 TB builds on WinXP):

(1) Inside a virtual folder, the sort order of messages in the message-list is
not preserved. If I search all folders in an account and save this as a virtual
folder, the virtual folder seems to list messages according to the order of the
folders in which they reside. If I click to sort them by date or sender they do
snap to the correct order, but if I click on another folder and then click back
to the virtual folder, all the messages will be in the original sort order
again, rather than the one I set.

(2) I cannot delete a virtual folder through the UI. If I right-click and
delete, it seems to get deleted OK, but when I exit the app and restart, the
folder again appears in the folders pane (but now with no contents). The only
way I can get rid of a virtual folder is to delete virtualFolders.dat from the
profile.

Anyhow, thanks much for your work on this. I'm looking forward to seeing where
this feature goes in the future.
(1) is fixed on the aviary branch and will be fixed on the trunk soon.

re (2), what kind of folder was deleted, and was it deleted to the trash?
(In reply to comment #75)
> re (2), what kind of folder was deleted, and was it deleted to the trash?

Not sure what you mean by "what kind", but I was talking about a virtual folder
in a POP3 account (no global inbox) created through Edit > Find > Search
Messages. I've tried it with 2 different profiles, including a brand new one
that doesn't even contain any messages. 

To delete, I'm right-clicking on the virtual folder and selecting Delete Folder.
The virtual folder then disappears from the folders pane and doesn't seem to get
sent to Trash, and the file and its .msf counterpart both immediately vanish
from the profile directory. But when I restart the app, the virtual folder
reappears in the folders pane (on disk as well). It doesn't make any difference
if I empty Trash and compact folders before exiting, either.
If you've been using virtual folders on the 1.0 aviary branch, you'll need to
redefine your virtual folders with today's build, because I changed the format
of virtual folders.dat to bring it in sync with the trunk format. Sorry for the
inconvenience.
I have observed the following problem with current implementation of Virtual
olders (Oct 6 branch):

I use IMAP and I do some pre-filtering in .procmailrc. All my mailboxes are
stored in ~/Mail/ directory. Now when I want to create a virtual folder which 
ould contain search results among all my mailboxes, I go to Edit->Find->Search
Messages and select myaccount@domain.tld/Mail as the parent for the search. But
when doing so, Thunderbird pops up an alert window:

The current command did not succeed. The mail server responded: SELECT failed:
Can't open Mail: not a selectable mailbox.

Note that so far this has nothing to do with the virtual folders feature. But
the annoying thing is that once I confirm the alert dialog and save search
results as a virtual folder, the same alert box pops up all the time when I want
to access the virtual folder.

Solution could be either to supress the alert window from showing up (maybe
there already is an option for that in about:config ?) for virtual
folders or to allow to select multiple parents in the Search Messages dialog.
I created a Virtual Folder only to see what it is. Before I saved the Virual
Folder, I changed the name from Inbox-view to Inbox xxx-viw. Then I could not
delete it. I  mean I deleted it and after Tb restart, it  reappeared. So I had
to uninstall Tb and install with a clean profile..
Windows XP SP1, Tb version 0.8 (20041008) branch.
The Virtual Folders implementation in TB is very restricted - it is more of a
saved search term rather than a folder. The gmail implementation is rather more
complete with a tagging based categorization. Typically we use a "folder" to
categorize incoming emails based on subjective criteria which a simple
search-term cannot satisfy. Provision should be made to tag each email with any
arbitrary tag and any number of such tags and then use those tag names as a
virtual folder. The emailshould show up in all "tag-folders" to which it is
attached.

Another implementation that falls along this line is photo categorization Adobe
Photoshop Album. 

The above would make Virtual Folders really useful rather just acting as a quick
search means.
I totally agree with Ravi. And I think that with a good virtual folder
implementation would heavily contribute to make TB a real killer application.

I would support the idea of allowing easy custom headers, as an easy way which
would avoid more complicated external dbase issues.
(In reply to comment #81)

> I would support the idea of allowing easy custom headers, as an easy way which
> would avoid more complicated external dbase issues.

I think the custom headers is a more elegant and superior way of implementing
virtual folders. With a localized database for virtual folders, the user would
be completely lost if he were accessing his IMAP mails from a different
location, unlike Gmail where the same set of virtual folders show up independent
of which computer is being used. If we use virtual headers that are saved back
in the email on the IMAP server, the categorization information is available
everywhere IMAP is accessed from. And in addition, this implementation may
extend even to other non-TB clients in future as standard virtual folder
implementation!


yes, our virtual folders are just saved searches - adding the ability to attach
arbitrary labels to messages would be nice. It would only work on some imap
servers, and it would be difficult for us to implement for local folders because
of our berkeley mailbox format (without using a side database). But if we did,
and you could search on the arbitrary labels, then the existing virtual folders
mechanism could be used. So the approaches could be complementary.
That's the way I was meanining it. Custom header and VF the way they are would
be great. Stupid question: which limitations do local folders presently have?
Actually I can add custom headers, through third party applications, and it
would be nice to do it in a simpler way from within TB itself

Other possible enhancement: folders and subfolders.
(In reply to comment #0)
> Virtual folders (a folder which doesn't physically exist, but shows the
> results of a search across other folders)

Could this also be used to create a virtual folder of a local archive folder
with its related folder on IMAP? This would be a practical approach to archiving
older emails without breaking threads and the ability to search within complete
folder.

Background: I am subscribed to a number of mailing lists for a project and it is
getting too big to fit in the IMAP folders. So, I want to archive the older
messages but still be able to access them and their email-threads.

Kind regards,
               Dennis Bijwaard
I just tried 1.8A4 and have the following findings:
- great to see all my project mailing lists (21 with regular crossposts) in one
view!
- threading does not yet work, in my view this is essential
  - this would fix the broken email-threads that travel accross mailing lists
- you also need to give a search item, whereas I would just like to see a
combination of multiple folders
  - having an virtual view without a search could be faster (e.g. a null search)
- it is not yet possible to select multiple folders (only subfolders)
  - therefore not yet usable to view local archive folder together with IMAP folder
  - I would suggest a selection tool like "Folders for Offline use".

Kind regards,
              Dennis
Product: MailNews → Core
marking fixed - we'll deal with remaining issues in other bugs.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
(In reply to comment #87)
> marking fixed - we'll deal with remaining issues in other bugs.

so, what about custom-header-based folders? For example, like in
https://bugzilla.mozilla.org/show_bug.cgi?id=11051#c73 ?
Does it need to create new enh rq about "Gmail labels - like folders"?
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.