Index


RISC World

Filtering in Messenger Pro

A quick walkthrough with Hariet Bazley

Filtering and scoring - the difference

In the previous part of this article I discussed scoring rules. The interface for creating a filter is very similar to that used for creating a scoring rule, but filtering is a little more complicated than scoring, since it takes place on a system-wide rather than on a single-user basis. Scoring rules (which only affect the colour and/or score of a message) can vary widely from user to user, since one user's settings cannot have any effect on how the same message is seen by another user reading the same group. Filtering rules, which actually move and/or delete messages, affect all users, and thus can only be set up by a user with the authority to do so - a 'system administrator'.

System privileges in Messenger

a privileged user

If you only have one user on your system, 'tandgwillis' for example, this will have been created with 'sysadmin' status by default. If you create subsequent individual users such as 'tom' and 'gillian', these will not (unless explicitly enabled) have 'sysadmin' status. This is like the concept of root on a Unix system - the idea is that during ordinary usage you do not allow yourself the power to make potentially destructive changes that will affect the whole system.

Non 'sysadmin' users can only alter their own display and editing settings, create scoring rules, and subscribe/unsubscribe to any groups that are already being fetched. The rest of the icons in the Choices panel are greyed out - including the Filtering icon. (This is why I am writing this as "Admin <bazley@freeuk.com>" rather than "Harriet Bazley <harriet@bazley.freeuk.com>" - when logged in as myself, I can't view the filters I've set up!)

Choices greyed out for a non-privileged user

The Choices window as seen by a non-privileged user

Filter priorities are important

We have a lot of filters on our system. One for every user, of which there are seven, one for every mailing list, of which there are five, and a spamtrap to catch all non-addressed e-mail, which necessitated the creation of separate filters to save the various other briefings and digests which are BCC'd to our address.

The Filtering rules window, like the Scoring rules window, displays a list of all the filters currently known to Messenger, in an order defined first of all by their 'priority' setting and secondly by the date on which they were created. The order in which they are listed is important! Since (unlike scoring rules) only newly-arriving messages pass through filters, and since filters, unlike scoring rules, can actually delete or move the messages to which they apply, if a high-priority filter catches a message, any other filters further down the list will never see that message at all.

list of filtering rules

Creating filters

The Edit filter window itself functions very much like the Edit scoring rule window, and most of my comments on the latter can be applied to the former without change. However, there are some important differences in the top section.

Mail and news

First of all, since filters apply to all incoming messages (and only incoming messages), there is no option to specify a specific group or set of groups to which a filter can apply. Instead, there are two option icons marked Mail and News. Most filters will be applied only to incoming e-mail, in which case deselecting the News icon saves Messenger the time and trouble of checking this filter against each and every incoming news posting as well!

top section of window

Deleting messages permanently

filter menu

Secondly, the pop-up menu on the 'If matched' field has two important new entries in it - 'discard message' and 'store message in'. 'Discard message' is the real killfile; where scoring rules simply mark a message as already read, a filter can delete it before it ever enters your inbox (although not until you have already spent ten minutes downloading it....) This is irreversible, which can be unfortunate at times!

'Store message in' is the most widely-used filter option. If you select this, you can then enter the name of a group other than the main inbox (or the newsgroup in question, if the message was originally directed to a newsgroup) to which the message will be moved on arrival.

Mailing groups

Moving messages into separate folders is, of course, a necessary step in order to set up a folder as a mailing list in Messenger. Many mailing lists now seem to use software which inserts the name of the list in square brackets into the subject line of any messages arriving via that list; I suspect this is to make it easier to pick out mailing list content from a Web-based account, or to make it easier to filter in Outlook Express. Other lists, such as the Messenger list, insert a specific Mailing-List: header. Either or both can be filtered on, and getting a filter right for such lists is relatively easy as there is generally a steady stream of arriving posts in your inbox to show you where you have gone wrong!

filtering on List-ID

Setting up a filter to select messages of a type which only arrive weekly or less frequently takes longer to get right. Unlike scoring rules, you cannot 'refresh the display' to reapply an edited filter, since it can have no effect on messages which have already arrived, nor can you use colouring to indicate which filter was applied to a given message. All you can do is wait for the next message to arrive, and try to examine the headers very carefully to discover what went wrong!

Filtering on body text or non-standard headers

A more subtle difference between scoring and filtering lies in the criteria which can be applied. You may have noticed that when defining a filter, the pop-up menu lists many more fields which can be checked against. One difference in this menu which is worth noting is that you can filter for text in the body of a message - although it should be borne in mind that this is considerably slower than just checking headers. For a sample speed comparison, try carrying out a search for text in the message bodies of a large newsgroup, then for the same text in the subject line!

Another difference which is even more significant is that, because the icon into which the name of the header is entered is writable, you can effectively filter on any field. Handy entries which are worth bearing in mind are Content-Type (multipart/alternative is the annoying kind which includes a second copy of the message text bulked out in HTML coding, big5 indicates text in a non-Latin character set) and X-RCPT (of which more in a moment).

writable filter icon

How to 'fake' multiple addresses on a single FreeUK account

ISPs such as Demon allow their users to register a 'domain' such as 'oaktree'. This entitles them to use a range of addresses all ending in oaktree.demon.co.uk, such as quercus@oaktree.demon.co.uk, dubovnuy@oaktree.demon.co.uk, Eiche@oaktree.demon.co.uk.

ISPs such as FreeUK give you just one e-mail address, of the form oaktree@freeuk.com. However, in reality any incoming e-mail addressed to xxx@oaktree.freeuk.com (note the changed position of the @) will arrive at your inbox - leaving it up to your system to do the sorting. For example, we were allocated the e-mail address bazley@freeuk.com. To my knowledge we are using at least seven sub-variants of this at the moment, of which harriet@bazley.freeuk.com is only one!

FreeUK e-mail headers

The X-RCPT header

Incoming messages through FreeUK's systems receive an extra header in the form X-RCPT, specifying the 'innermost part' of the To: address. If someone sends me a message addressed to harriet@bazley.freeuk.com, it contains the header X-RCPT: harriet. If the message had been addressed simply to bazley@freeuk.com, the corresponding header would instead read X-RCPT: bazley. It is easy to filter on the X-RCPT line.

Multiple users, multiple addresses

Every time you create a new user in Messenger, a new inbox is created for that user. You can thus simply redirect messages into the correct inbox in exactly the same way as you redirect them into mailing list folders - and the details for that user can be set up from the Edit settings portion of the Choices window so that outgoing mail always bears a pseudo-address in the form xxx@oaktree.freeuk.com and replies return to the correct user.

The actual name under which you log into Messenger is quite irrelevant to the address you choose to use. Since all the filtering is done by manually created rules, rather than (as in the default setup) by detecting the name of the file downloaded from the server(!), it is quite possible to have a user 'cash' receiving e-mail addressed to finance@oaktree.freeuk.com, provided only that you have a filter checking for "X-RCPT: = finance" and redirecting it to the folder cash/Incoming mail.

multiple inboxes

Harriet Bazley <harriet@bazley.freeuk.com>

 Index