[Dovecot] LDA Sieve feature request

Mark E. Mallett mem at mv.mv.com
Sat May 13 00:52:58 EEST 2006


On Fri, May 12, 2006 at 03:23:22PM +0200, Steffen Kaiser wrote:
> On Fri, 12 May 2006, Timo Sirainen wrote:
> 
> >The problem with this is that I'm not sure how exactly it should work.
> >For example if the Sieve script has "keep" command, should it really
> >save it to INBOX, or should it just ignore and let the next script
> >handle it (and only use the final script's "keep")?

I think of "implicit keep" as being an application-level thing, although
that's not specified in any detail.  But since implicit keep is
performed after script execution, it's not really hard to think of it as
an application parameter.

With this perspective, if a single application is able to execute
multiple scripts sequentially, then the implicit keep is still done at
the end of processing.  Any one of the scripts can cancel the implicit
keep (e.g. via "discard"), but if none do, the application will still
file the message into the default box.

If an application can only invoke one script, one alternative is to have
a special way of invoking the program in a "pass-through" mode, such
that implicit keep doesn't really write to the mailbox but allows the
next application to deal with it.  That's tricky (but doable) for a
pipeline, where the implicit keep would write to stdout:

    deliver -p script1 | deliver -p script2 | deliver script3

but much less tricky if with the qmail (.qmail) model of having a list of
actions including running multiple processes one after another:

   deliver -p script1
   deliver -p script2
   deliver script3

where any script along the way can signal that it has completely handled
the message and thus the controlling process should not bother proceeding
to the next step.  Of course, one problem with using multiple applications
is that you lose a lot of other context; e.g. it's hard to collapse
multiple requests to file into the same mailbox into one.


> >What if the first script eg. forwards the message somewhere, should the
> >second script still be run?
> >
> >I think there should be some "exit" command in Sieve so you could
> >specify which behavior you want, but there isn't..

Like "stop" ?  Or something else?


> Hmm, Sieve is sort of extensible, I'd suggest to look at the 
> multiple-Sieve-script problematic like
> 
> as if all Sieve scripts had be written into one file, e.g. like C's 
> #include preprocessor directive.

Hmm, good idea :)
(just a joke, since mine does that)

There is an "include" draft for sieve that has been floated, but it
uses the word "include" in a different way, which I think is problematic.

mm


More information about the dovecot mailing list