[Top] [All Lists]

Re: draft-melnikov-sieve-imapflags-03.txt

2000-08-22 17:12:26
I may have voiced this before, but I don't remember.

I believe that the right way to set IMAP flags is by an optional
argument on the keep and fileinto commands, not a side effect that
effectively munges a global variable.

My primary problem with the current approach that this is the first
Sieve command to have a side effect that affects another action (other
than the reject vs. keep interaction stuff, which is somewhat more
minor).  The way this stuff interacts is potentially annoying.  Given
the existance of tagged optional arguments in the document as is, I
would prefer a different approach.

Assume for a moment the existance of either functions or a preprocessor,
both things that have been discussed and are likely to be developed
later.  In either case (they're more or less the same without varibles,
anyway), addflag/removeflag/setflag affect global state, and it may not
be obvious how these things interact.

Until now, it has always been safe to add code to the bottom of a script
and assume that that code can stand alone.  However, arbitrary flags can
be added, and there's no way to figure out what flags are set, it is
conceivable for "library" macros to set flags that there is no reliable
way to clear.

I would prefer if fileinto and keep were extended to take an optional
:flags argument which would describe the flags to be added to the
message, i.e.,

        if header :matches "Subject" "ADV:*" {
                keep :flags "\\Deleted" ;

Incidentially, among the nits in v03, the grammar at the end of the
document should be removed entirely.  It doesn't match the Sieve grammar
at all (which doesn't define action, for instance).  It is not
necessary; the existing Sieve grammar encompasses everything represented
here.  However, the "Syntax" lines in the base document need to be
on each command to clarify the types.