Subject: sieve lunch meeting notes

From: Lawrence Greenfield <[email-masked]>
Date: Thu, 20 Mar 2003 15:27:20 -0800

Our Sieve lunch meeting was surprisingly productive. Many drafts were 
discussed---pretty much the only thing we missed was "notify".

We danced around variables a lot and there is deep suspicion of variables 
but also a clear idea that they could make certain operations significantly 
easier.

Larry

---

From: [email-masked]
Date: Thu, 20 Mar 2003 15:57:08 -0800 (PST)

> discussed---pretty much the only thing we missed was "notify".

FYI, I'm trying a little experiment with the datatracker on these
drafts -- I've entered the meeting results as comments for all of them into
tracker.

				Ned

---

From: Simon Josefsson <[email-masked]>
Date: Fri, 21 Mar 2003 18:18:50 +0100

Lawrence Greenfield <[email-masked]> writes:

>    [12:37]<leg> Why not use LDAP instead of Managesieve? Rant, rant, rant

How would LDAP return a useful error message when the Sieve script
doesn't parse correctly?  How would LDAP switch among active scripts?
It seems LDAP would have to be profiled to provide these features,
which effectively creates a new protocol, one that would be more
complicated than Managesieve.  Implementation wise, except for
profiling the LDAP implementation, it would also have to interact with
a Sieve parser.  It just seems bloated to me, since this LDAP server
isn't likely to be reused for any other purpose, which supposedly was
the point of using LDAP in the first place.

Generally I'm glad to see that there are thoughts about making Sieve a
turing complete language (which I believe it should have been from the
start), with variables and regexps.  To cater for big sites that
doesn't want to spend CPU time on behalf of their customers, the
inefficient language constructs could be made optional [1].  No need
to rule out useful language constructs for everyone just because
someone can't implement them.

[1] require ["variables", "while", "backreferences"]

---

From: Alexey Melnikov <[email-masked]>
Date: Fri, 21 Mar 2003 16:16:20 -0700

[As a person who was actually taking notes for this meeting I though I should
comment]

> the point of using LDAP in the first place.

Exactly. You need at least some schema and probably some integration with Sieve
engine.

ACAP was also mentioned, with a comment that nobody implemented it.

> [1] require ["variables", "while", "backreferences"]

There is a fair interest in introducing variables, so join the discussion.

Regards,
Alexey
__________________________________________
R & D, ACI Worldwide/MessagingDirect
Watford, UK

Work Phone: +44 1923 81 2877
Home Page: http://orthanc.ab.ca/mel

I speak for myself only, not for my employer.
__________________________________________

---

From: "Matthew Elvey (FM)" <[email-masked]>
Date: Fri, 21 Mar 2003 17:06:11 -0800

>[12:02]<leg> Jutta: want to set From address for vacations
I've seen that it's a popular request of users to be able to set the 
 From (in both Header and Envelope, to answer the later question) for 
reject:,  so here's a thumbs up for that.

Re Timestamps: There are many in a given email and I can see a potential 
use for all of 'em.
 From most to least important:
1)The one in the top (most trusted) Received: header, and the (often 
incorrect/forged) one in the Date: Header.  (Some MUAs sort by the 
latter; the former should be used IMO)
2)The one in the bottom Received header and
3)The others (which can show time delays)
 A timezone-aware DateDiff type function would be MOST useful; with it, 
I'm thinking that explicit TZ and other conversion, extraction, and 
comparator functions would not be needed!

Re. Simon's comment: are variables inherently dangerous/CPU 
hogs/contrary to the original SIEVE CPU-safe goals?  Why?  I don't see 
it.  Obviously "while" and less obviously regexps are not safe.  Perhaps 
someone could make these clearer.  (Sorry if I'm jumping in way late on 
this one.)

Oh and one more vote for ManageSieve.  LDAP and ACAP are cooler (as 
ManageSieve admits, IIRC) but the explanations of why ManageSieve is 
necessary win me over.

---

From: Cyrus Daboo <[email-masked]>
Date: Sat, 22 Mar 2003 10:52:17 -0800

Hi Matthew,

--On Friday, March 21, 2003 5:06 PM -0800 "Matthew Elvey (FM)" 
<[email-masked]> wrote:

| Oh and one more vote for ManageSieve.  LDAP and ACAP are cooler (as
| ManageSieve admits, IIRC) but the explanations of why ManageSieve is
| necessary win me over.

Agreed.

A client that already implements IMAP is not going to have much work to do 
to support ManageSIEVE. Its worth noting that ManageSIEVE does not preclude 
storage of SIEVE scripts in LDAP - ManageSIEVE can simply be a front-end 
for the LDAP store and hide the complexity of any LDAP schema from the 
client.

-- 
Cyrus Daboo

---

From: "Matthew Elvey (FM)" <[email-masked]>
Date: Sat, 22 Mar 2003 11:41:07 -0800

Matthew Elvey wrote:

> From notes:

Any demand or support for reject: logging of some sort?  Perhaps an 
option to log the emails without the body to a folder would be simplest.

> comparator functions would not be needed! 

:datediff would be an addition to relational extension.  Any support for 
that?

> Re. Simon's comment:... 

variables aren't inherently dangerous per the variables draft.

The variables draft has an editing error in 3.2:

           if header :regex "From" "^

is missing the regexp and close quote.

---

From: Kjetil Torgrim Homme <[email-masked]>
Date: 22 Mar 2003 21:41:29 +0100

[Matthew Elvey (FM)]:
>
>   Any demand or support for reject: logging of some sort?  Perhaps
>   an option to log the emails without the body to a folder would be
>   simplest.

extend fileinto ?

this could also be a job for NOTIFY.

btw, the syntax for variables available in NOTIFY should be reconciled
with the variables draft.  this could go either way, of course.  my
preferred tack would be to add an action to the notify draft which
creates the variables "from", "env_from", "subject", and "text".  the
variables draft could also use a substring modifier.  this isn't
strictly necessary, since with regex you can express it like this:

    require [ "regex", "variables", "notify" ];
    if string :regex "${text}" "(.{,100})" {
        notify :low "${from}: ${1}";
    }

this is a bit awkward for the user and doesn't lend itself to
efficient implementation, though.  unfortunately, the
variable-modifier is limited to function name, with no way of
specifying an argument.  that may be too inflexible for future
expansion, but on the other hand, string interpolation shouldn't
become too complex either.

changing variable-modifier syntax:
  "${substr(0,200):text}"

adding slice explicitly to the syntax:
  "${text[0..199]}"
or even
  "${text[0-4,5,6-199]}"

>   is missing the regexp and close quote.

thanks, I should read my roff output more carefully.  it was supposed
to say
           if header :regex "From" "^\"?([^ \"]*).*<" {

(it's not a good example, really, the regex is cryptic and becomes the
focus of attention.)

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html