Getting Really Organized with Virtual Folders

If filters aren't flexible enough for you, or you find yourself performing the same search again and again, consider a virtual folder. Virtual folders, or vFolders, are an advanced way of viewing your email messages within Evolution. If you get a lot of mail or often forget where you put messages, virtual folders can help you stay on top of things.

A virtual folder is really a hybrid of all the other organizational tools: it looks like a folder, it acts like a search, and you set it up like a filter. In other words, while a conventional folder actually contains messages, a virtual folder is a view of messages that may be in several different folders. The messages it contains are determined on the fly using a set of criteria you choose in advance.

As messages that meet the virtual folder criteria arrive or are deleted, Evolution will automatically place them in and remove them from the virtual folder contents list. When you delete a message, it gets erased from the folder in which it actually exists, as well as any virtual folders which display it.

Imagine a business trying to keep track of mail from hundreds of vendors and clients, or a university with overlapping and changing groups of faculty, staff, administrators and students. The more mail you need to organize, the less you can afford the sort of confusion that stems from an organizational system that's not flexible enough. Virtual folders make for better organization because they can accept overlapping groups in a way that regular folders and filing systems can't.

The Unmatched Virtual Folder: Obveously, not all messages will fit into all your Virtual Folders. That's why Evolution includes an UNMATCHED Virtual Folder. The UNMATCHED Virtual Folder displays messages that are not matched by other rules.

Example 4-1. Using Folders, Searches, and Virtual Folders

To organize his mailbox, Jim sets up a virtual volder for emails from his friend and co-worker Anna. He has another one for messages that have ximian.com in the address and Evolution in the subject line, so he can keep a record of what people from work send him about evolution. If Anna sends him a message about anything other than Evolution, it only shows up in the "Anna" folder. When Anna sends him mail about the user interface for evolution, he can see that message both in the "Anna" virtual folder and in the "Internal Evolution Discussion" virtual folder.

Creating Virtual Folders

To create a virtual folder:

  1. Tools->Virtual Folder Editor

  2. Click Add

  3. Name your virtual folder in the Rule name field.

  4. Select your search criteria. For each criterion, you must first select which of the following parts of the message you want the search to examine:

    • Sender - The sender's address.

    • Recipients - The recipients of the message.

    • Subject - The subject line of the message.

    • Specific Header - The virtual folder can look at any header you want, even obscure or custom ones. Enter the header name in the first text box, and put your search text in the second one.

    • Message Body - Search in the actual text of the message.

    • Expression - For programmers only: match a message according to an expression you write in the Scheme language, used to define virtual folders in Evolution.

    • Date sent - Search messages according to the date on which they were sent: First, choose the conditions you want a message to meet — before a given time, after it, and so forth. Then, choose the time. The virtual folder will compare the message's time-stamp to the system clock when the filter is run, or to a specific time and date you choose from a calendar. You can even have it look for messages within a range of time relative to the filter — perhaps you're looking for messages less than two days old.

    • Date Recieved - This works the same way as the Date Sent option, except that it compares the time you got the message with the dates you specify.

    • Score - Emails have a standard priority range from -3 (least important) to 3 (most important). You can have virtual folders set the priority of messages you recieve, and then have other virtual folders applied only to those messages which have a certain priority.

    • Size (kb) - Sorts based on the size of the message in kilobytes.

    • Status - Searches according to the status of a message, such as 'New'.

    • Attachments - Create a virtual folder based on whether or not you have an attachment in the email.

    • Mailing List - Search based on the mailing list it came from.

    • Regex Match - If you know your way around a regex, or regular expression, put your knowledge to use here.

    • Source Account - Search messages according the server you got them from. You can enter a URL or choose one from the drop-down list. This ability is only relevant if you use more than one mail source.

  5. Select the folder sources. You can select:

    • Specific folders only

      Note: If you select specific folders only, you need to specify the source folders in the box below.

    • All local folders

    • With all active remote folders

    • With all local and active folders

  6. If you want multiple criteria for this filter, press Add criterion and repeat the previous step.

Figure 4-1. Selecting a Virtual Folder Rule