Re: [Exim] storing filter 'files' in a db

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Philip Hazel
Date:  
À: George Schlossnagle
CC: exim-users
Sujet: Re: [Exim] storing filter 'files' in a db
On Tue, 7 Nov 2000, I wrote:

> Cross your fingers and hope I manage to get to the Wish List item! Very
> shortly I shall be stopping development in order to pull the next
> release together. This is a small item; I *may* get to it.


I have just got to look at it. I think I can get it done as the last
item before the gates clang shut. Here is some discussion:

I have realized that the forwardfile and aliasfile directors are really
very similar, the main difference being that the former just takes the
entire contents of a file, while the latter uses the file as a database
(or looks in a real database) to extract something. Once they have a
list of items to process, there's very little difference, though at
present, only forwardfile can do the filtering thing.

One of the things I am planning to propose in the "White Paper" I'm
planning to write early in the new year is to amalgmate these two
drivers into a single driver called "redirect". (The two old names,
inherited from Smail, are increasingly inaccurate.)

In a combined driver, setting "file" without "search_type" would do the
forwardfile thing; setting both "file" and "search_type" would do the
aliasfile thing; setting "query" or "queries" instead of "file" would
also do the aliasfile thing. In all cases, filtering would be possible.

However, we aren't there yet. The most logical way to add the filtering
feature you want to the existing drivers would be to add a "filter"
option to aliasfile. However, that is an annoyingly large amount of
work, because of the associated options that forbid various things.

Therefore: In the expectation that this is in some sense a stop-gap,
temporary solution, I propose to add "query" and "queries" options to
forwardfile, mutually exclusive with the "file" option. The text looked
up by the query will be handled as if it were the contents of a .forward
file. For filtering, either it will have to contain \n characters, or
you will have to use the ${sg} string operator to turning something else
into \n for Exim to process. The reason \n characters are needed is to
terminate comment lines, and the initial "# Exim filter" line (which is
a sort of comment).

OK?

-- 
Philip Hazel            University of Cambridge Computing Service,
ph10@???      Cambridge, England. Phone: +44 1223 334714.