Subject: Protocol for MTA filtering language

From: Chris Newman <[email-masked]>
Date: Fri, 28 Mar 1997 21:01:28 -0800 (PST)

The proper place for the MTA filtering language is the same protocol
that's used to configure the MTA.

The proper place to advertise MTA supported filtering extensions should
also be the same protocol that's used to configure the MTA.  I think IMAP
is the wrong place to advertise this because the only place where IMAP
currently has to interface to the final-delivery agent is the mailstore.
If the mailstore is a legacy mailstore, it's quite likely the IMAP server
and final delivery agents will be from different vendors and will know
very little about each other.

ACAP is a reasonable choice for this protocol.  If the filtering langage
were broken out into separate ACAP entries for different rules, this would
allow taking advantage of ACAP's inheritance and large list features.  I
think that would be quite useful.  Ordering can be solved in a number of
ways.

---

From: Randall Gellens <[email-masked]>
Date: Mon, 31 Mar 1997 12:10:48 -0800

> that's used to configure the MTA.

But MTAs often don't have configuration protocols, and when they do they
are likely to be non-standard.  So how is a mail client to know what
filtering is available?

> very little about each other.

It seems to me that the final delivery agent, whatever it is, can always
get a user's filters from ACAP (or even a more efficient non-standard
back-end as an option).  But this still leaves the problem of how to
advertise to the client that final dilvery filtering is available, and what
extensions are supported.

I can think of four choices:

1.  Advertise it in ESMTP (EHLO response).
2.  Advertise it in Submit protocol
3.  Advertise it in an ACAP CAPABILITY
4.  Have an ACAP dataset for "local facilities" which includes an "MTA
Filtering" attribute.  This would be read-only for clients.

I really hate #1.  I could live with #2, but I think these are different
actions, likely to be done by different servers.  #3 makes some sense to
me, but I understand your objections.  #4 would work, especially since ACAP
is the means of communicating filters from client to server.

Date: Mon, 31 Mar 1997 12:10:48 -0800
To: Chris Newman <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Protocol for MTA filtering language
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

> that's used to configure the MTA.

But MTAs often don't have configuration protocols, and when they do they
are likely to be non-standard.  So how is a mail client to know what
filtering is available?

> very little about each other.

It seems to me that the final delivery agent, whatever it is, can always
get a user's filters from ACAP (or even a more efficient non-standard
back-end as an option).  But this still leaves the problem of how to
advertise to the client that final dilvery filtering is available, and what
extensions are supported.

I can think of four choices:

1.  Advertise it in ESMTP (EHLO response).
2.  Advertise it in Submit protocol
3.  Advertise it in an ACAP CAPABILITY
4.  Have an ACAP dataset for "local facilities" which includes an "MTA
Filtering" attribute.  This would be read-only for clients.

I really hate #1.  I could live with #2, but I think these are different
actions, likely to be done by different servers.  #3 makes some sense to
me, but I understand your objections.  #4 would work, especially since ACAP
is the means of communicating filters from client to server.

Date: Mon, 31 Mar 1997 09:53:09 -0800 (PST)
From: Chris Newman <[email-masked]>
Subject: Re: Machine readable vs. Human readable
To: Tim Showalter <[email-masked]>
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

On Sun, 30 Mar 1997, Tim Showalter wrote:

> On Fri, 28 Mar 1997, Chris Newman wrote:
> 
> > On the other hand, I'm not sure we should dismiss human readability
> > completely.  When might be able to find a reasonable compromise where the
> > script is machine readable, but something that wouldn't be too hard for 
> > the average human to hand edit.  I think Applescript is a reasonable 
> > example of this sort of syntax.
> 
> I have avoided applescript to this point in my life.  Can you give a
> syntactic overview of the language?

It reads roughly like English.  Minimal syntatic characters.  Newlines are
used as statement terminators (there's a symbol to indicate the next
line is a continuation).  Mostly infix notation.  As a programmer I always
had trouble getting the for/of/by/to/whatever prepositions right.  But
non-programmers seem to like it.

Date: Mon, 31 Mar 1997 00:19:49 -0500
To: John Mani <[email-masked]>, [email-masked]
From: "Jack De Winter" <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write    filtering scripts?")
Sender: [email-masked]

>> Personally, I think any filtering should be done by
>> the MTA, and I see little applicability in keying some filtering off of the
>> opening of a mailbox.
>
>	Ideally yes, but if the MTA does not implement/permit filtering or 
>does not advertise the necessary hooks for the client to install filters, 
>the client has to do the filtering on its own. And this is typically 
>triggered off during the opening of the INBOX.
> 	It would be nice if the filtering language does not assume that it
>is always executed only by the MTA. Anyways I think MTA side filtering
>capabalities are typically a subset of client-side filtering ....so shouldn't
>be a problem ..

My problems with such filtering are the trigger points and differing
cicumstances.  For the trigger points, what happens if you don't open
you mailbox a lot, and just keep it open?  For the circumstances, what
do you do to make a single script servicable to 2 different filtering
points? (Personally, I would mandate 2 distinct scripts myself)

regards,
Jack
-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Sun, 30 Mar 1997 19:16:08 -0800 (PST)
From: John Mani <[email-masked]>
Reply-To: John Mani <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write    filtering scripts?")
To: [email-masked], [email-masked]
Content-MD5: 8uA9EtHFGvOa6oQbXRa1uQ=
Sender: [email-masked]

> Personally, I think any filtering should be done by
> the MTA, and I see little applicability in keying some filtering off of the
> opening of a mailbox.

	Ideally yes, but if the MTA does not implement/permit filtering or 
does not advertise the necessary hooks for the client to install filters, 
the client has to do the filtering on its own. And this is typically 
triggered off during the opening of the INBOX.
 	It would be nice if the filtering language does not assume that it
is always executed only by the MTA. Anyways I think MTA side filtering
capabalities are typically a subset of client-side filtering ....so shouldn't
be a problem ..

-john

Date: Sun, 30 Mar 1997 20:25:01 -0500 (EST)
From: Tim Showalter <[email-masked]>
To: MTA Filters <[email-masked]>
Subject: Re: Machine readable vs. Human readable
Sender: [email-masked]

On Fri, 28 Mar 1997, Chris Newman wrote:

> On the other hand, I'm not sure we should dismiss human readability
> completely.  When might be able to find a reasonable compromise where the
> script is machine readable, but something that wouldn't be too hard for 
> the average human to hand edit.  I think Applescript is a reasonable 
> example of this sort of syntax.

I have avoided applescript to this point in my life.  Can you give a
syntactic overview of the language?

What I had in mind was prefix-oriented, with a few concessions to my
tendancy to make random typos.  I'll try to post it in the next few days,
and I'm sorry I haven't yet gotten it to a point where it is suitable for
public ridicule.

-- 
                                           Tim Showalter [email-masked]

Date: Fri, 28 Mar 1997 21:09:59 -0800 (PST)
From: Chris Newman <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
To: Amos A Gouaux <[email-masked]>
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

On Fri, 28 Mar 1997, Amos A Gouaux wrote:
> I'm not that familiar with ACAP, but IMSP is used by one mail client I
> know to store its config info.  It is able to keep its message groups in
> the correct order by numbering each message group internally.  Perhaps
> something similar could be used with filters, like you suggest.

ACAP is IMSP mark 2.  As you suggest, ordering isn't a big problem in this
model.

Date: Fri, 28 Mar 1997 21:06:56 -0800 (PST)
From: Chris Newman <[email-masked]>
Subject: Who does the filtering?
To: MTA Filters <[email-masked]>
Sender: [email-masked]

I see two applications for a filtering language:

(1) final-delivery MTA filtering

(2) client filtering

With (1), the filtering happens automatically, which is great if you want
to run a shared folder which doesn't need babysitting.  With (2) you're
likely to get a lot more power and flexability (and have no problems
discovering supported extensions).

Having the IMAP server do filtering is the worst of both worlds (limited
features, and requires babysitting).

There is no reason that (1) and (2) couldn't use the same core language --
and I think that would be a good thing.  However, (1) and (2) do need to
be stored in different places (at least in different ACAP datasets or
options) as they provide different levels of service.

Date: Fri, 28 Mar 1997 21:01:28 -0800 (PST)
From: Chris Newman <[email-masked]>
Subject: Protocol for MTA filtering language
To: MTA Filters <[email-masked]>
Sender: [email-masked]

Date: Fri, 28 Mar 1997 20:51:29 -0800 (PST)
From: Chris Newman <[email-masked]>
Subject: Machine readable vs. Human readable
To: MTA Filters <[email-masked]>
Sender: [email-masked]

I think the primary purpose is to have a machine readable script.  A
lisp-style syntax or postscript-style syntax would maximize machine
readability.

On the other hand, I'm not sure we should dismiss human readability
completely.  When might be able to find a reasonable compromise where the
script is machine readable, but something that wouldn't be too hard for 
the average human to hand edit.  I think Applescript is a reasonable 
example of this sort of syntax.

Date: Fri, 28 Mar 1997 18:40:43 -0800
To: "Jack De Winter" <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write     filtering scripts?")
Cc: [email-masked]
Sender: [email-masked]

At 9:15 PM -0500 3/28/97, Jack De Winter wrote:

> Personally, I think any filtering should be done by
> the MTA, and I see little applicability in keying some filtering off of the
> opening of a mailbox.

I agree.  FIltering should be part of "final delivery".

Date: Fri, 28 Mar 1997 21:15:07 -0500
To: Randall Gellens <[email-masked]>, [email-masked]
From: "Jack De Winter" <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write   filtering scripts?")
Sender: [email-masked]

>I'd go along with either approach.  Personally, I think having each rule in
>its own attribute is easier to manage, but it's not something I feel very
>strongly about.
>
>Here is what I think we need to get server-based filtering moving along:
>
>(1)  A very simple filter language.  Minimal functionality, easy to
>implement, with an extension mechanism.

given...

>(2)  A spec for how to store filters in ACAP.  If all of a user's filters
>are stored in one attribute, it seems kind of silly to have a whole dataset
>for it, but I don't really care that much.

depends... but can be done either way...

>(3)  A spec for how and when filters are to be executed, and what to do in
>case of errors, unrecognized elements, etc.  Also, how to notify users of
>the filter results (if such notification is desired).  Plus, how a delivery
>entity advertises support of filter extensions.  It seems to me that any
>unrecognized filter should result in default action (file in inbox).
>Simple mail messages could be used for notification.  An IMAP CAPABILITY
>keyword seems to make sense for advertising support of filtering (and
>filter extensions), but does tend to blur the lines between the protocols a
>bit.  But it seems the most logical place to start.

This I wonder about.  We may have to develop profiles that are used depending
on its applicability.  Personally, I think any filtering should be done by
the MTA, and I see little applicability in keying some filtering off of the
opening of a mailbox.

regards,
Jack
-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Fri, 28 Mar 1997 17:34:34 -0800
To: Jack De Winter <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write     filtering scripts?")
Cc: [email-masked], [email-masked]
Sender: [email-masked]

At 7:11 PM -0500 3/28/97, Jack De Winter wrote:

> For example, what happens if someone tries to set the value of one of
> the fields of an address book to a GIF image that is over 200K?

As I see it:

(1) If the GIF contains nulls, and the attribute name doesn't end in ".bin"
the STORE can be rejected, I think.

(2) The 200k might exceed the quota, in which case the STORE would be rejected.

Date: Fri, 28 Mar 1997 17:13:49 -0800
To: [email-masked]
From: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write   filtering scripts?")
Sender: [email-masked]

> >I think we really need to focus on keeping the base spec simple, and
> >compatible with IMAP and ACAP.  The simplest way to store the filters in
> >ACAP would be as one attribute, in the user's options dataset.  That would
> >give you the explicit ordering you want, but would make it a bit difficult
> >for some clients to deal with very long sets of filters.  The other
> >approach I see is to store each filter rule in its own attribute.  Ordering
> >could be enforced by an extra attribute (execute-order) which would contain
> >a number.
>
> If anything, they should be in one dataset with 'sieve-filter' or some
>variant
> as the name.  If we have to do individual entries for individual rules, any
> sense of ordering or inclusion would become increasingly difficult.  Even
> if we keep such elements out of a first draft, you don't want to preclude
> them from a future draft.

I'd go along with either approach.  Personally, I think having each rule in
its own attribute is easier to manage, but it's not something I feel very
strongly about.

Here is what I think we need to get server-based filtering moving along:

(1)  A very simple filter language.  Minimal functionality, easy to
implement, with an extension mechanism.

(2)  A spec for how to store filters in ACAP.  If all of a user's filters
are stored in one attribute, it seems kind of silly to have a whole dataset
for it, but I don't really care that much.

(3)  A spec for how and when filters are to be executed, and what to do in
case of errors, unrecognized elements, etc.  Also, how to notify users of
the filter results (if such notification is desired).  Plus, how a delivery
entity advertises support of filter extensions.  It seems to me that any
unrecognized filter should result in default action (file in inbox).
Simple mail messages could be used for notification.  An IMAP CAPABILITY
keyword seems to make sense for advertising support of filtering (and
filter extensions), but does tend to blur the lines between the protocols a
bit.  But it seems the most logical place to start.

Date: Fri, 28 Mar 1997 19:13:02 -0500
To: Randall Gellens <[email-masked]>, MTA Filters <[email-masked]>
From: "Jack De Winter" <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Sender: [email-masked]

>I think we really need to focus on keeping the base spec simple, and
>compatible with IMAP and ACAP.  The simplest way to store the filters in
>ACAP would be as one attribute, in the user's options dataset.  That would
>give you the explicit ordering you want, but would make it a bit difficult
>for some clients to deal with very long sets of filters.  The other
>approach I see is to store each filter rule in its own attribute.  Ordering
>could be enforced by an extra attribute (execute-order) which would contain
>a number.

If anything, they should be in one dataset with 'sieve-filter' or some variant
as the name.  If we have to do individual entries for individual rules, any
sense of ordering or inclusion would become increasingly difficult.  Even
if we keep such elements out of a first draft, you don't want to preclude
them from a future draft.

regards,
Jack
-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Fri, 28 Mar 1997 19:11:00 -0500
To: Randall Gellens <[email-masked]>, [email-masked], [email-masked]
From: "Jack De Winter" <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write   filtering scripts?")
Sender: [email-masked]

>As I recall it, there was general rejection of the idea that ACAP, as a
>protocol, would enforce syntax.  There was some agreement that one could
>have an implementation that would apply some syntax or content rules, but
>it should be pretty exceptional.  Your example was using ACAP to store
>server configuration, where you wanted to be sure not to let anyone store
>"Hi Mom!" in the "Maximum number of threads" attribute.  That might be OK,
>but having an ACAP server apply all sorts of rules to the data would mean
>that you then have to invent a way for clients to discover the rules, and
>you end up with a very complex mess.  If syntax enforcement is required,
>then it needs to be in the protocol.  I think we've decided it doesn't need
>to be in ACAP.  Maybe I was jet-lagged and wasn't following the discussion,
>but that's how I remember it.  I suppose this is a question for the ACAP
>list.

It was my understanding that the ACAP protocol itself would not impose
any limitations, but any backend coudl reject the data.  If this is not
the case, I will strongly bring this up in Memphis.  If I have to accept
anything that is thrown at me in any case, then ACAP's usefulness for
me goes downhill approaching terminal velocity.

For example, what happens if someone tries to set the value of one of
the fields of an address book to a GIF image that is over 200K?  Am I,
as an ACAP server implementor, supposed to not accept that image and
store it?  If so, its pretty brain dead.

I think Steve Hole's big concern was on checking every piece of data,
and mine was that we were just acting as a generic data store with
absolutely no format.

>> ... I took mail I wanted to deal with and do something, and as the default
>> bounce the message.  These would be hard to convey with an entry by
>> entry basis, as would any idea of including other files.
>
>I really think we need to keep the filtering spec as simple and bare-bones
>as possible, otherwise it will never get consensus.  I recall the BOF in
>San Jose saying explicit inclusion of other filters was too complex for now.

I recall that it would be too complex for a first pass, but there was no
objection to having it included.

>> ...and have the backend verify the script when the script is set up.
>> For example, my backend verifies the script and only generates and
>> updates the 'compiled' script when it detects no errors.
>
>I don't think the ACAP back-end should do anything except store and
>retrieve the data.  No syntax checking.

In that case, I will bring up this point at the ACAP WG meeting in
Memphis, against some of the positions expressed at the conference
we just had in Pittsburg.  Not having ACAP enforcing the data, I can
live with.  Not having any checking of the data I cannot.  Having to
accept "Hi Mom!" for a numeric field is stupid.  Not putting the
focus on the ACAP server, no problems... but not allowing any feedback
to the client that there is a problem or that there may be a problem is
inviting too many problems.

regards,
Jack

p.s. just my own 2 cents, and I am a strong proponent for the ACAP protocol.
-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Fri, 28 Mar 1997 18:13:28 -0600 (CST)
From: Amos A Gouaux <[email-masked]>
Reply-To: [email-masked]
To: MTA Filters <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Sender: [email-masked]

On Fri, 28 Mar 1997, Randall Gellens wrote:

> I think we really need to focus on keeping the base spec simple, and
> compatible with IMAP and ACAP.  The simplest way to store the filters in
> ACAP would be as one attribute, in the user's options dataset.  That would
> give you the explicit ordering you want, but would make it a bit difficult
> for some clients to deal with very long sets of filters.  The other
> approach I see is to store each filter rule in its own attribute.  Ordering
> could be enforced by an extra attribute (execute-order) which would contain
> a number.

I'm not that familiar with ACAP, but IMSP is used by one mail client I
know to store its config info.  It is able to keep its message groups in
the correct order by numbering each message group internally.  Perhaps
something similar could be used with filters, like you suggest.

amos

Date: Fri, 28 Mar 1997 15:32:19 -0800
To: MTA Filters <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Sender: [email-masked]

At 4:53 PM -0500 3/28/97, Tim Showalter wrote:

> I'd like to allow nested conditionals -- this makes things a little bit more
> complicated.  Also, guaranteeing the order of evaluation might be useful,
> but might be difficult to work out with ACAP.

I think we really need to focus on keeping the base spec simple, and
compatible with IMAP and ACAP.  The simplest way to store the filters in
ACAP would be as one attribute, in the user's options dataset.  That would
give you the explicit ordering you want, but would make it a bit difficult
for some clients to deal with very long sets of filters.  The other
approach I see is to store each filter rule in its own attribute.  Ordering
could be enforced by an extra attribute (execute-order) which would contain
a number.

Date: Fri, 28 Mar 1997 15:40:43 -0800
To: [email-masked]
From: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write   filtering scripts?")
Sender: [email-masked]

At 5:24 PM -0500 3/28/97, Jack De Winter wrote:

> >ACAP does not verify syntax on options.  There really isn't any "mapping"
> >when storing filters in ACAP.  The way I see the filter dataset, it is very
> >simple: just a set of entries, each entry consists of an entry (name)
> >attribute and a filter attribute.  The entry attribute is any unique handle
> >assigned by the filter generator (probably the client), and the filter
> >attribute is just a text string.  For example:
>
> Well, to be precise, ACAP does not enforce any syntax, but the gatweway
> between ACAP and the data store may.  For example, ACAP will accept the
> data, pass it to the routines to store that data, and those routines may
> cause the data to be rejected.  This was dicussed at the ACAP meeting,
> where I believe the consensus was that the ACAP datasets did not actively
> do syntax checking but the backend was allowed to reject data.

As I recall it, there was general rejection of the idea that ACAP, as a
protocol, would enforce syntax.  There was some agreement that one could
have an implementation that would apply some syntax or content rules, but
it should be pretty exceptional.  Your example was using ACAP to store
server configuration, where you wanted to be sure not to let anyone store
"Hi Mom!" in the "Maximum number of threads" attribute.  That might be OK,
but having an ACAP server apply all sorts of rules to the data would mean
that you then have to invent a way for clients to discover the rules, and
you end up with a very complex mess.  If syntax enforcement is required,
then it needs to be in the protocol.  I think we've decided it doesn't need
to be in ACAP.  Maybe I was jet-lagged and wasn't following the discussion,
but that's how I remember it.  I suppose this is a question for the ACAP
list.

> ... I took mail I wanted to deal with and do something, and as the default
> bounce the message.  These would be hard to convey with an entry by
> entry basis, as would any idea of including other files.

I really think we need to keep the filtering spec as simple and bare-bones
as possible, otherwise it will never get consensus.  I recall the BOF in
San Jose saying explicit inclusion of other filters was too complex for now.

> ...and have the backend verify the script when the script is set up.
> For example, my backend verifies the script and only generates and
> updates the 'compiled' script when it detects no errors.

I don't think the ACAP back-end should do anything except store and
retrieve the data.  No syntax checking.

Date: Fri, 28 Mar 1997 17:48:30 -0500 (EST)
From: Tim Showalter <[email-masked]>
To: MTA Filters <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write  filtering scripts?")
Sender: [email-masked]

(I trimmed the To/CC lines, since everyone's reading the list anyway...)

The filtering draft I've been working on was based on a document that
happened well before we got as worried about ACAP as we are now.  It is
basically a flat-file script/program that has a bunch of if/elsif/endif
clauses.  I rather like the format, because it means it can be edited by
hand, and it has no particular dependancies on ACAP.

If we take the if/elsif/endif clauses and push them into sparate ACAP
entries, you get the same thing, except you have no guarantee on order of
evaluation, which is a fairly useful thing to have if you'd prefer to toss
out any message you don't filter.

if any-of (header ("subject") contains ("HEY-TIM-ACTUALLY-READ-THIS"),
	header ("from" "sender") contains ("wall" "wcw" "weiler" "rob") then
	fileinto "INBOX"
elsif header ("to" "cc") contains ("[email-masked]") then
	fileinto "INBOX.mta-filters"
else
	reply message
I dropped your message, because I don't know you, and I think
your message is unsolicited.  If this is not the case, send mail with the
subject "HEY-TIM-ACTUALLY-READ-THIS".
.
	toss  # throw message away, it's probably spam
endif

(This script might actually comply with the syntax I was working on.)

As I understood the example, it could be difficult to get this sort of
split.  Did I take too slim a view?  The above is a really paranoid
approach ...

I want to advocate an approach that allows savvy script authors to bunch
together similar cases to save space and time.

If the message is from anyone at CMU.EDU then
	If the message is from wall then
		put it in INBOX.from.wall
	If the message is from rob then
		put it in INBOX.from.rob
	If the message is from shadow then
		toss
	stop
Else [ Sort on mailing lists here or something ... ]
	If ...
	... Endif
	stop
Endif

toss

> >Yes, there needs to be a way for a site to advertise which filter
> >extensions it supports, and there needs to be a default action for
> >unrecognized filter clauses or actions.  I think filter extensions should
> >be advertised as part of advertising filtering support, in an IMAP
> >CAPABILITIES.  This does beg the question of how to advertise non-IMAP
> >support, but at least it is a start.  I agree that default action should be
> >to file in INBOX.
> 
> This gets hairy fast... how do you differ between a script that is supposed
> to be run from an IMAP section and one that is not?

What's the difference, other than mailbox names?

I suggest a "normal" action, which is "do whatever you'd do if you weren't
actually filtering this stuff."  Under IMAP, it's file into INBOX.

> Unless you have a
> modifier at the top that says 'ENFORCE-EXTENSIONS <x> <y>' where <x> and <y>
> are extensions that must be supported, it gets difficult.

I suspect this is a good idea to have anyway.

> The other question is what to do when a script fails?  If you have one
> operating mode 'when MTA is about to put in mailbox', you do not have to
> worry about different modes and you just make sure to only update the
> current script version when the script is valid.  Adding different modes
> will start to make the script knowledgable about where it is run from,
> how to send any errors to the user to get them to fix the script.

I believe the thing to do when a script fails is
   * drop the message into INBOX (or the local equivalent)
   * drop another message into INBOX, saying "An error occurred...",
     although the filtering agent has to be sure not to do this too often

-- 
                                           Tim Showalter [email-masked]

Date: Fri, 28 Mar 1997 17:24:01 -0500
To: Randall Gellens <[email-masked]>, Tim Showalter <[email-masked]>
From: "Jack De Winter" <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

>ACAP does not verify syntax on options.  There really isn't any "mapping"
>when storing filters in ACAP.  The way I see the filter dataset, it is very
>simple: just a set of entries, each entry consists of an entry (name)
>attribute and a filter attribute.  The entry attribute is any unique handle
>assigned by the filter generator (probably the client), and the filter
>attribute is just a text string.  For example:

Well, to be precise, ACAP does not enforce any syntax, but the gatweway
between ACAP and the data store may.  For example, ACAP will accept the
data, pass it to the routines to store that data, and those routines may
cause the data to be rejected.  This was dicussed at the ACAP meeting,
where I believe the consensus was that the ACAP datasets did not actively
do syntax checking but the backend was allowed to reject data.  My argument
was for a good method to find out any format or syntax to allow for a generic
client to determine 'what is acceptible'. (I will be coming up with a 
'datasets' dataset that I will hope that people will use for their dataset
definitions. )

>\user\fred\filters
>	dataset.entry = "make-money-fast"
>	filter = "if = ( subject, "make-money-fast" ) then trash"
>
>	dataset.entry = "peggy-sue"
>	filter = "if = ( from, "[email-masked]" ) then file
>			("personal")"
>
>This way the dataset knows very little of the structure of the filters, and
>it is easy to extend.

Hrmmm... I can see why you might want to do this, but I see problems.  I
might want to create a script for a given sub-mailbox or a script where
I took mail I wanted to deal with and do something, and as the default
bounce the message.  These would be hard to convey with an entry by
entry basis, as would any idea of including other files.  I would rather
see something like:

\sieve-filter\users\fred -> filter.name = "main filter"
filter.script = "if () if() dodefault"

and have the backend verify the script when the script is set up.
For example, my backend verifies the script and only generates and
updates the 'compiled' script when it detects no errors.

>Yes, there needs to be a way for a site to advertise which filter
>extensions it supports, and there needs to be a default action for
>unrecognized filter clauses or actions.  I think filter extensions should
>be advertised as part of advertising filtering support, in an IMAP
>CAPABILITIES.  This does beg the question of how to advertise non-IMAP
>support, but at least it is a start.  I agree that default action should be
>to file in INBOX.

This gets hairy fast... how do you differ between a script that is supposed
to be run from an IMAP section and one that is not?  Unless you have a
modifier at the top that says 'ENFORCE-EXTENSIONS <x> <y>' where <x> and <y>
are extensions that must be supported, it gets difficult.

The other question is what to do when a script fails?  If you have one
operating mode 'when MTA is about to put in mailbox', you do not have to
worry about different modes and you just make sure to only update the
current script version when the script is valid.  Adding different modes
will start to make the script knowledgable about where it is run from,
how to send any errors to the user to get them to fix the script.

regards,
Jack

-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Fri, 28 Mar 1997 16:53:00 -0500 (EST)
From: Tim Showalter <[email-masked]>
Reply-To: Tim Showalter <[email-masked]>
To: Randall Gellens <[email-masked]>
cc: MTA Filters <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Sender: [email-masked]

On Fri, 28 Mar 1997, Randall Gellens wrote:

> If the filters are being run by the client, then the client should run them
> after receiving the message via POP and before storing the message in a
> folder.  In this situation, "final delivery" means delivery via POP.

Ok.

> > If a filter script looks like a simple set of "if A then do B" statements,
> > this works.  If a filtering script is more complicated -- nested
> > conditionals -- I don't think the mapping is so clear.
> >
> > I also have concerns with extensions.  In the case of an IMAP server doing
> > filtering, the extensions supported will not be clear to the ACAP server
> > accepting scripts.  The ACAP server should not be expected to verify the
> > syntax of scripts; the store-this-script-client needs to do that, and I'm
> > not sure how it finds out that the IMAP server supports some random
> > extension.
> 
> ACAP does not verify syntax on options.  There really isn't any "mapping"
> when storing filters in ACAP.  The way I see the filter dataset, it is very
> simple: just a set of entries, each entry consists of an entry (name)
> attribute and a filter attribute.  The entry attribute is any unique handle
> assigned by the filter generator (probably the client), and the filter
> attribute is just a text string.  For example:
> 
> \user\fred\filters
> 	dataset.entry = "make-money-fast"
> 	filter = "if = ( subject, "make-money-fast" ) then trash"
> 
> 	dataset.entry = "peggy-sue"
> 	filter = "if = ( from, "[email-masked]" ) then file
> 			("personal")"

I'd like to allow nested conditionals -- this makes things a little bit more
complicated.  Also, guaranteeing the order of evaluation might be useful,
but might be difficult to work out with ACAP.

> > The best I could come up with to solve this was to just demand that sites
> > advertise supported extensions and if filtering fails, messages get dumped
> > into INBOX.
> 
> Yes, there needs to be a way for a site to advertise which filter
> extensions it supports, and there needs to be a default action for
> unrecognized filter clauses or actions.  I think filter extensions should
> be advertised as part of advertising filtering support, in an IMAP
> CAPABILITIES.  This does beg the question of how to advertise non-IMAP
> support, but at least it is a start.  I agree that default action should be
> to file in INBOX.

Advertising filtering support in CAPABILITIES only answers the question for
IMAP, but it might be a workable approach.

-- 
                                           Tim Showalter [email-masked]

Date: Fri, 28 Mar 1997 13:32:33 -0800
To: Tim Showalter <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

At 3:56 PM -0500 3/28/97, Tim Showalter wrote:

> On Fri, 28 Mar 1997, Randall Gellens wrote:
>
> > It seems to me filtering should be done during final delivery, before
> > placing the message in any mailbox.  This was the filter rules can file,
> > forward, trash, etc. the message before it has been delivered.  Which
> > software module actually runs the filter rules of course depends on the
> > implementation.
>
> I agree with you, except this isn't possible in a POP3 environment where
> folders are maintained on the client's end only.  I believe this is
> important because there are a number of people who want to use a filtering
> language cooperatively to stop spam, many of whom are not using IMAP.

If the filters are being run by the client, then the client should run them
after receiving the message via POP and before storing the message in a
folder.  In this situation, "final delivery" means delivery via POP.

> > I think ACAP is the logical place to store the filter rules.  In many ways,
> > filter rules look like a subset of an address book, and so would probably
> > go in the user's options, perhaps in a new dataset, which would be defined
> > and agreed to for interoperability.
>
> If a filter script looks like a simple set of "if A then do B" statements,
> this works.  If a filtering script is more complicated -- nested
> conditionals -- I don't think the mapping is so clear.
>
> I also have concerns with extensions.  In the case of an IMAP server doing
> filtering, the extensions supported will not be clear to the ACAP server
> accepting scripts.  The ACAP server should not be expected to verify the
> syntax of scripts; the store-this-script-client needs to do that, and I'm
> not sure how it finds out that the IMAP server supports some random
> extension.

ACAP does not verify syntax on options.  There really isn't any "mapping"
when storing filters in ACAP.  The way I see the filter dataset, it is very
simple: just a set of entries, each entry consists of an entry (name)
attribute and a filter attribute.  The entry attribute is any unique handle
assigned by the filter generator (probably the client), and the filter
attribute is just a text string.  For example:

\user\fred\filters
	dataset.entry = "make-money-fast"
	filter = "if = ( subject, "make-money-fast" ) then trash"

	dataset.entry = "peggy-sue"
	filter = "if = ( from, "[email-masked]" ) then file
			("personal")"

This way the dataset knows very little of the structure of the filters, and
it is easy to extend.

> The best I could come up with to solve this was to just demand that sites
> advertise supported extensions and if filtering fails, messages get dumped
> into INBOX.

Yes, there needs to be a way for a site to advertise which filter
extensions it supports, and there needs to be a default action for
unrecognized filter clauses or actions.  I think filter extensions should
be advertised as part of advertising filtering support, in an IMAP
CAPABILITIES.  This does beg the question of how to advertise non-IMAP
support, but at least it is a start.  I agree that default action should be
to file in INBOX.

Date: Fri, 28 Mar 1997 15:56:56 -0500 (EST)
From: Tim Showalter <[email-masked]>
Reply-To: Tim Showalter <[email-masked]>
To: MTA Filters <[email-masked]>
cc: Randall Gellens <[email-masked]>
Subject: Re: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Sender: [email-masked]

On Fri, 28 Mar 1997, Randall Gellens wrote:

> It seems to me filtering should be done during final delivery, before
> placing the message in any mailbox.  This was the filter rules can file,
> forward, trash, etc. the message before it has been delivered.  Which
> software module actually runs the filter rules of course depends on the
> implementation.

I agree with you, except this isn't possible in a POP3 environment where
folders are maintained on the client's end only.  I believe this is
important because there are a number of people who want to use a filtering
language cooperatively to stop spam, many of whom are not using IMAP.

> I think ACAP is the logical place to store the filter rules.  In many ways,
> filter rules look like a subset of an address book, and so would probably
> go in the user's options, perhaps in a new dataset, which would be defined
> and agreed to for interoperability.

If a filter script looks like a simple set of "if A then do B" statements,
this works.  If a filtering script is more complicated -- nested
conditionals -- I don't think the mapping is so clear.

I also have concerns with extensions.  In the case of an IMAP server doing
filtering, the extensions supported will not be clear to the ACAP server
accepting scripts.  The ACAP server should not be expected to verify the
syntax of scripts; the store-this-script-client needs to do that, and I'm
not sure how it finds out that the IMAP server supports some random
extension.

The best I could come up with to solve this was to just demand that sites
advertise supported extensions and if filtering fails, messages get dumped
into INBOX.

-- 
                                           Tim Showalter [email-masked]

Date: Fri, 28 Mar 1997 10:53:49 -0800
To: John Mani <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Filtering Infrastructure (was "Re: Who will write filtering scripts?")
Cc: [email-masked], [email-masked]
Sender: [email-masked]

At 9:48 AM -0800 3/28/97, John Mani wrote:

> Now that we have some activity in this mailing list, I'd like to hear ideas
> and opinions about the infrastructure for filtering:
>
> + Who runs the filter ? Choices:
>  1. The delivery agent at the time of delivery to one's
>     INBOX ? How does the delivery agent have access to the user's folders ?
>     Thru IMAP ? (which means that the delivery agent needs an open connection
>     to the server all the time ... and the server may need to support shared
>     read-write access to folders ..)
>  2. The IMAP server ? So that the filtering happens when the INBOX is
>selected ?
>     Or should there be an extension to the server to start filtering ?

It seems to me filtering should be done during final delivery, before
placing the message in any mailbox.  This was the filter rules can file,
forward, trash, etc. the message before it has been delivered.  Which
software module actually runs the filter rules of course depends on the
implementation.

> + Where/how is the filter installed ?
>     The filter has to be installed in a user-preference repository. ACAP/LDAP
>     seems to be the obvious way to setup/access the filter.

I think ACAP is the logical place to store the filter rules.  In many ways,
filter rules look like a subset of an address book, and so would probably
go in the user's options, perhaps in a new dataset, which would be defined
and agreed to for interoperability.

The user would store/update the filters using ACAP.

The server could access the filters also via ACAP, or via some back-end
protocol or common back-end between it an ACAP.  That is
implementation-dependent.  There is a need for close integration between
IMAP and ACAP in general, but there are several ways an implementation can
do this.  For interoperability, all implementations should be able to fall
back on using ACAP in the normal way, but may be able to use local
optimizations as well.

Date: Fri, 28 Mar 1997 10:47:03 -0800
To: Tim Showalter <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Who will write filtering scripts?
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

I've changed my mind -- I now agree that the syntax should be biased
towards machine-readability.  This will make it easier to implement (at
least on servers) and thus more widespread.

Date: Fri, 28 Mar 1997 13:52:58 -0500 (EST)
From: Tim Showalter <[email-masked]>
Reply-To: Tim Showalter <[email-masked]>
To: John Mani <[email-masked]>
cc: MTA Filters <[email-masked]>
Subject: Re: Who will write filtering scripts?
Sender: [email-masked]

On Fri, 28 Mar 1997, John Mani wrote:

> + Who runs the filter ? Choices:

I would like to integrate filtering into the Cyrus deliver program, which
takes mail from sendmail (or whatever other MTA is in use) and puts it in an
IMAP mailbox and updates the cache files.

I see no reason why one language couldn't be used to support multiple
attitudes on when to filter -- for example, in Cyrus, we might not allow as
much flexibility as a user might like, but if his client supported
filtering, he might be able to get his client to do it.

>  1. The delivery agent at the time of delivery to one's
>     INBOX ? How does the delivery agent have access to the user's folders ?
>     Thru IMAP ? (which means that the delivery agent needs an open connection
>     to the server all the time ... and the server may need to support shared
>     read-write access to folders ..)

Shared read-write access to folders isn't a big problem for us, but it is
for others.  I believe delivery is the best answer, but that it can't be
implemented for everyhone.

>  2. The IMAP server ? So that the filtering happens when the INBOX is selected ?
>     Or should there be an extension to the server to start filtering ?

If I have a mailbox called "user.tjs.foo", and I want others to read it, I
need a way to submit messages to it.  By having filtering happen at
select-of-INBOX time, we have a number of serious problems with this model
(which several people have wanted to use under CMU's legacy system, but
haven't been able to).

a) Until I select my INBOX, no one else can read the messages.  I might
   go on vacation, or I might be lax and not read my mail for three days.
b) If it's a client extension, filtering requires client support -- I
   consider this just another obstacle.  Multiple folder support is enough
   to do filtering, and I'd rather not impose other requirements on it.

> + Where/how is the filter installed ?
>     The filter has to be installed in a user-preference repository. ACAP/LDAP
>     seems to be the obvious way to setup/access the filter.

Disclaimer: I'm biased towards ACAP.  In CMU's legacy system, a common
networked file system was used (AFS), and I suspect a shared file system
will be good enough for a lot of sites.

-- 
                                           Tim Showalter [email-masked]

Date: Fri, 28 Mar 1997 13:12:46 -0500
To: John Mani <[email-masked]>, [email-masked]
From: "Jack De Winter" <[email-masked]>
Subject: Re: Who will write filtering scripts?
Cc: [email-masked]
Sender: [email-masked]

At 09:48 AM 3/28/97 -0800, John Mani wrote:
>Now that we have some activity in this mailing list, I'd like to hear ideas
>and opinions about the infrastructure for filtering:
>
>+ Who runs the filter ? Choices:
> 1. The delivery agent at the time of delivery to one's
>    INBOX ? How does the delivery agent have access to the user's folders ?
>    Thru IMAP ? (which means that the delivery agent needs an open connection
>    to the server all the time ... and the server may need to support shared
>    read-write access to folders ..)
> 2. The IMAP server ? So that the filtering happens when the INBOX is
selected ?
>    Or should there be an extension to the server to start filtering ?

For our server, we run the filters against the mailboxes, hence the MTA does
it.  However, we make sure that the MTA does it as the user in question,
to make sure permissions are adhered to.
    
>+ Where/how is the fil+ Where/how is 
>    The filter has to be installed in a user-preference repository. ACAP/LDAP
>    seems to be the obvious way to setup/access the filter.

Well... LDAP might be useful, but for this, I think not.  ACAP on the
other hand was created to do stuff like this.

Just from my experience people think LDAP = the world, and ACAP = treading
on LDAP's fingers and toes.  From the powers that be in both the LDAP camp
and the ACAP camp, LDAP = the world viewing you and ACAP = you viewing the
world.  i.e. LDAP is for making your presence known to the world and how they
can reach you, and ACAP is information you are storing about how to access
the world.

regards,
Jack
-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Fri, 28 Mar 1997 09:48:00 -0800 (PST)
From: John Mani <[email-masked]>
Reply-To: John Mani <[email-masked]>
Subject: Re: Who will write filtering scripts?
To: [email-masked]
Cc: [email-masked]
Content-MD5: Z1QCKGGdbeKOJYClwYFyig=
Sender: [email-masked]

Now that we have some activity in this mailing list, I'd like to hear ideas
and opinions about the infrastructure for filtering:

+ Who runs the filter ? Choices:
 1. The delivery agent at the time of delivery to one's
    INBOX ? How does the delivery agent have access to the user's folders ?
    Thru IMAP ? (which means that the delivery agent needs an open connection
    to the server all the time ... and the server may need to support shared
    read-write access to folders ..)
 2. The IMAP server ? So that the filtering happens when the INBOX is selected ?
    Or should there be an extension to the server to start filtering ?
    
+ Where/how is the filter installed ?
    The filter has to be installed in a user-preference repository. ACAP/LDAP
    seems to be the obvious way to setup/access the filter.
    
Comments/Ideas ?

-john mani
    	
> From: Amos A Gouaux <[email-masked]>
> To: Tim Showalter <[email-masked]>
> cc: MTA Filters <[email-masked]>
> Subject: Re: Who will write filtering scripts?
> MIME-Version: 1.0
> 
> As I already mentioned to Tim, I personally think machine-readable is more
> important.  Even if it were to be human-writable, from what I've seen
> between Elm Filter and Procmail debates, folks are going to find it
> difficult to write correct filtering rules unless the language is
> simplistic to the point of being almost useless.  At my previous job, when
> faculty wanted their mail filtered, we ended up writing the procmail
> script ourselves (support staff).  So I would prefer to see this new
> filtering language machine-readable and then have a tk or even java app as
> the configuration tool.  Then eventually some kind of ACAP interface. 
> 
> Besides, with the movement towards client-server mail access with IMAP (or
> POP), I think server-side filtering is going to be an increasingly
> pressing issue.  It might even get to the point were editing local files
> like one's ~/.forward is a less common occurrence.  And even if folks
> still edited their own filter file, I would still prefer it to be
> machine-readable so that the mail delivery mechanism would be as fast and
> efficient as possible.
> 
> As for question of syntax, I'm certainly agreeable to it being LISP-like.
> Hmmm, I wonder if I could then plug it into GNUS..  ;-)
> 
> amos
> 
> 
> On Thu, 27 Mar 1997, Tim Showalter wrote:
> 
> > I'm working on a draft for a filtering language.  I have one fairly
> > fundamental question: should the language be geared to be machine-readable
> > or human-writable?  It would be far easier to write a prefix-oriented
> > language with lots of LISP-like syntax, but I believe most users find that
> > difficult to use (and it is my limited experience it's hard to balance
> > parens without an editor that helps out).
> > 
> > If it's machine readable, logical operators should be prefix.  Syntax should
> > not be overly important.
> > 
> > If it's human writable, logical operators should be infix.  Syntax should be
> > geared towards preventing syntax errors and readability.
> > 
> > Any comments will be appreciated.
> > 
> > -- 
> >                                            Tim Showalter [email-masked]
> > 
> > 
> 
> 
> 

Date: Fri, 28 Mar 1997 09:02:29 -0600 (CST)
From: Amos A Gouaux <[email-masked]>
Reply-To: [email-masked]
To: Tim Showalter <[email-masked]>
cc: MTA Filters <[email-masked]>
Subject: Re: Who will write filtering scripts?
Sender: [email-masked]

As I already mentioned to Tim, I personally think machine-readable is more
important.  Even if it were to be human-writable, from what I've seen
between Elm Filter and Procmail debates, folks are going to find it
difficult to write correct filtering rules unless the language is
simplistic to the point of being almost useless.  At my previous job, when
faculty wanted their mail filtered, we ended up writing the procmail
script ourselves (support staff).  So I would prefer to see this new
filtering language machine-readable and then have a tk or even java app as
the configuration tool.  Then eventually some kind of ACAP interface. 

Besides, with the movement towards client-server mail access with IMAP (or
POP), I think server-side filtering is going to be an increasingly
pressing issue.  It might even get to the point were editing local files
like one's ~/.forward is a less common occurrence.  And even if folks
still edited their own filter file, I would still prefer it to be
machine-readable so that the mail delivery mechanism would be as fast and
efficient as possible.

As for question of syntax, I'm certainly agreeable to it being LISP-like.
Hmmm, I wonder if I could then plug it into GNUS..  ;-)

amos

On Thu, 27 Mar 1997, Tim Showalter wrote:

> I'm working on a draft for a filtering language.  I have one fairly
> fundamental question: should the language be geared to be machine-readable
> or human-writable?  It would be far easier to write a prefix-oriented
> language with lots of LISP-like syntax, but I believe most users find that
> difficult to use (and it is my limited experience it's hard to balance
> parens without an editor that helps out).
> 
> If it's machine readable, logical operators should be prefix.  Syntax should
> not be overly important.
> 
> If it's human writable, logical operators should be infix.  Syntax should be
> geared towards preventing syntax errors and readability.
> 
> Any comments will be appreciated.
> 
> -- 
>                                            Tim Showalter [email-masked]
> 
> 

Date: Thu, 27 Mar 1997 23:22:09 -0500 (EST)
From: Tim Showalter <[email-masked]>
Reply-To: Tim Showalter <[email-masked]>
To: MTA Filters <[email-masked]>
cc: Jack De Winter <[email-masked]>
Subject: Re: Who will write filtering scripts?
Sender: [email-masked]

On Thu, 27 Mar 1997, Jack De Winter wrote:

> At 06:09 PM 3/27/97 -0800, Brian Moore wrote:
> >I believe machine readable is more important.
> >
> >Let the user agent figure out a way to make it pretty: a filtering set
> >should be quickly parsed by a machine.  It's not too hard to make a gui
> >filter-maker that lets you cover various levels of user sophistication
> >(from full egrep parsing of headers and/or body to just 'has bob in the from
> >line').
> 
> If it isn't too much problem, it would be interesting if there was
> a switch, and a cannonicalization that explains how to go from one
> to the other.  This could simply be considered an extra pass on the
> script human->machine->compiled and turned on by default.  Kind of
> like how the unix shell scripts work.

This is a good excuse to write a machine-parsable language and worry about
high-level languages in some other context.  This might encourage GUIs for
the language as well.

> I realize that it makes a bit more work for Tim, but as I outlined
> to him earlier at the ACAP conference, having a simplist, yet effective
> scripting language is a powerful tool.  I got a sneak peak, and the line
> "if size over 10K then bounce ... endif" was pretty straight forward.
> if you take it a step further and throw out any words that your grammar
> does not recognize, "if the message size if over 10K then bounce end"
> becomes very useful.

Allowing random "harmless" words in the grammar does not seem like a good
idea, especially if anyone wants a chance to ever extend it.  I do not
believe there is any utility in this; it presents the illusion of usability
to programmers without presenting any usability to users.

Would there be any violent objections if I tried to write something geared
towards machine-parsing (strictly prefix, probably a LISP like syntax
because I believe it's easiest to parse), but still editable by mere
mortals?  We could layer a readable language over top of that.

(I like LISP anyway, so I'm sort of becoming biased towards this approach.)

-- 
                                           Tim Showalter [email-masked]

Date: Thu, 27 Mar 1997 23:04:04 -0500
To: Brian Moore <[email-masked]>, Tim Showalter <[email-masked]>
From: "Jack De Winter" <[email-masked]>
Subject: Re: Who will write filtering scripts?
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

At 06:09 PM 3/27/97 -0800, Brian Moore wrote:
>I believe machine readable is more important.
>
>Let the user agent figure out a way to make it pretty: a filtering set
>should be quickly parsed by a machine.  It's not too hard to make a gui
>filter-maker that lets you cover various levels of user sophistication
>(from full egrep parsing of headers and/or body to just 'has bob in the from
>line').

If it isn't too much problem, it would be interesting if there was
a switch, and a cannonicalization that explains how to go from one
to the other.  This could simply be considered an extra pass on the
script human->machine->compiled and turned on by default.  Kind of
like how the unix shell scripts work.

I realize that it makes a bit more work for Tim, but as I outlined
to him earlier at the ACAP conference, having a simplist, yet effective
scripting language is a powerful tool.  I got a sneak peak, and the line
"if size over 10K then bounce ... endif" was pretty straight forward.
if you take it a step further and throw out any words that your grammar
does not recognize, "if the message size if over 10K then bounce end"
becomes very useful.

my 2 cents.
regards,
Jack
-------------------------------------------------
Jack De Winter - Wildbear Consulting, Inc.
(519) 576-3873		http://www.wildbear.on.ca/

Author of SLMail for 95 & NT (http://www.seattlelab.com/)

Date: Thu, 27 Mar 1997 18:09:10 -0800 (PST)
From: Brian Moore <[email-masked]>
To: Tim Showalter <[email-masked]>
cc: MTA Filters <[email-masked]>
Subject: Re: Who will write filtering scripts?
Sender: [email-masked]

I believe machine readable is more important.

Let the user agent figure out a way to make it pretty: a filtering set
should be quickly parsed by a machine.  It's not too hard to make a gui
filter-maker that lets you cover various levels of user sophistication
(from full egrep parsing of headers and/or body to just 'has bob in the from
line').

On Thu, 27 Mar 1997, Tim Showalter wrote:

> I'm working on a draft for a filtering language.  I have one fairly
> fundamental question: should the language be geared to be machine-readable
> or human-writable?  It would be far easier to write a prefix-oriented
> language with lots of LISP-like syntax, but I believe most users find that
> difficult to use (and it is my limited experience it's hard to balance
> parens without an editor that helps out).
> 
> If it's machine readable, logical operators should be prefix.  Syntax should
> not be overly important.
> 
> If it's human writable, logical operators should be infix.  Syntax should be
> geared towards preventing syntax errors and readability.
> 
> Any comments will be appreciated.
> 
> -- 
>                                            Tim Showalter [email-masked]
> 

Date: Thu, 27 Mar 1997 14:41:46 -0800
To: Tim Showalter <[email-masked]>
From: Randall Gellens <[email-masked]>
Subject: Re: Who will write filtering scripts?
Cc: MTA Filters <[email-masked]>
Sender: [email-masked]

At 4:38 PM -0500 3/27/97, Tim Showalter wrote:

> I'm working on a draft for a filtering language.  I have one fairly
> fundamental question: should the language be geared to be machine-readable
> or human-writable?  It would be far easier to write a prefix-oriented
> language with lots of LISP-like syntax, but I believe most users find that
> difficult to use (and it is my limited experience it's hard to balance
> parens without an editor that helps out).

I think we should gear it towards human use.  That makes it easier to
debug, easier for people to create their own scripts without a user agent,
etc.  If we keep it simple enough, it will still be able to be read,
edited, and generated by a GUI user agent.

Date: Thu, 27 Mar 1997 16:38:57 -0500 (EST)
From: Tim Showalter <[email-masked]>
To: MTA Filters <[email-masked]>
Subject: Who will write filtering scripts?
Sender: [email-masked]

I'm working on a draft for a filtering language.  I have one fairly
fundamental question: should the language be geared to be machine-readable
or human-writable?  It would be far easier to write a prefix-oriented
language with lots of LISP-like syntax, but I believe most users find that
difficult to use (and it is my limited experience it's hard to balance
parens without an editor that helps out).

If it's machine readable, logical operators should be prefix.  Syntax should
not be overly important.

If it's human writable, logical operators should be infix.  Syntax should be
geared towards preventing syntax errors and readability.

Any comments will be appreciated.

-- 
                                           Tim Showalter [email-masked]