[Top] [All Lists]

Re: How to rearrange the sequence of filters

Subject: Re: How to rearrange the sequence of filters
From: "Alexey Feldgendler"
Date: Mon, 21 Nov 2005 13:23:13 +0600
Newsgroups: opera.mail+news
On Sun, 20 Nov 2005 08:11:41 +0600, Rijk van Geijtenbeek <[email protected]> wrote:

In those software, the sequence in which the filter are listed
of moving some particular filter up and down in the sequence.


To V S Rawat and everyone interested.

There are two major conceptual approaches to mail sorting. Let's call them procmail way and gmail way, after two well-known pieces of software. Though the details vary, people want the same thing: their mail sorted into several folders basing on some conditions specified upon messages.

Procmail way is more traditional, and for years it has been the only way to sort mail. The well-known mail filtering tool, procmail, delivers messages into different folders depending on what conditions does a message satisfy. When a new message arrives, procmail checks the conditions in order and takes appropriate actions (deliver to a folder, redirect, discard etc). With each condition-action pair a flag is associated which indicates whether to continue testing following conditions after taking the action. This way, a message can, for example, end up in several folders at once, which is sometimes the desired result. Anyway, most procmail setups deliver each message to at most one folder, which corresponds to the metaphor of physically sorting postage mail into folders. When no conditions match a message, the default action takes place, which is usually delivery to some kind of INBOX folder.

Gmail way was invented before Google, but it was Google's webmail service which popularized this way of thinking. While procmail way is procedural and is backed by a strong real-world metaphor, gmail way, being declarative, gains popularity as searching and search-related technologies become more and more important in the modern informational infrastructure. In gmail way, a folder is not a location, it's a filter. Looking into a folder is the same as doing a specific preconfigured search within all of the saved mail. Creating a folder is the same as storing a search bookmark. Unlike procmail way, in gmail way most setups have intersecting filters, with one message ending up in multiple folders because it matches several orthogonal conditions. While procmail can deliver a single message into several folders, it's usually done by copying a message, but gmail shows one message in multiple folders, so, for example, deleting a message deletes it from the entire message database, not only from the current folder. Of course, instant searching when viewing a folder's contents is not necessarily how gmail way is actually implemented; the list of folders a message belongs to can be calculated when the message arrives and refreshed when the folder setup changes.

Procmail way and gmail way have their strengths and weaknesses. Which is better depends on the way how the user thinks of his filters. If one regards a folder as a PLACE where messages can be put to and removed from, and just wants the computer to put the right messages into the right folders for him, it's clearly procmail way. The advantage is that the user can move messages between folders easily. The disadvantage is that when the user changes the filtering setup, it doesn't affect the already-stored messages, though it's often what the user wants (some software offers an option to refilter already-stored mail when changing the configuration). On the contrary, if the user thinks of a folder as a filtered VIEW into his message archive, it's gmail way. The advantage of gmail way is that added or modified filters immediately affect all previously stored mail. The disadvantage is that messages usually cannot be manually moved between folders.

Opera M2 implements something in between of these two. Each folder is a place, and messages can be manually moved between folders, that's procmail way. But instead of specifying a procmail-style ordered set of rules which decide what messages go where, Opera associates a filtering condition with each folder, that's gmail way. As a consequence, the filtering conditions are unordered, unlike procmail-style rules, and a matched condition doesn't prevent other filters from also being triggered. Only newly received or created messages are automatically tested against the conditions and sorted into the folders, that's a bit of procmail way, but when creating or modifying a filter, there is an option to recheck every message which is currently outside the filter, that's a bit of gmail way. In fact, M2 has much of gmail in that it offers a broad selection of built-in filters (or views): by contact, by label, by thread, by attachment.

There are three alternative paths that Opera M2 might take in its development:

1. Finally become procmail way by allowing filters to be ordered and adding a checkbox "Stop processing filters after this one" to each filter. This indeed would provide what V S Rawat and possibly others want, but it would also make filter setup more complicated because a filter's contents would become implicitly affected by other filters.

2. Finally become gmail way by giving up on the ability to manually add and remove messages to and from filters. Instead, changes in a filter's conditions would immediately affect what the user sees inside, as if it was a search query.

3. Remain the hybrid as it is. Because Opera M2 exists this way for a long time already, and there are many users who like it as it is and prefer it to other MUAs, it seems to me the most probable course of action.

Opera M2 9.0 TP1 on Debian Linux 2.6.12-1-k7

<Prev in Thread] Current Thread [Next in Thread>