[Dovecot] IMAP views - and things to make Outlook Express not suck so much

Geo Carncross geocar-dovecot at internetconnection.net
Fri May 28 16:34:37 EEST 2004

On Thu, 2004-05-27 at 20:07, Joshua Goodall wrote:
> On Wed, May 26, 2004 at 07:31:30PM -0400, Geo Carncross wrote:
> > > Just as an implementation point; it would be good if the specification
> > > language was Sieve.
> > 
> > This could require the IMAP server fetch the entire contents of a
> > message before processing something as simple as a FETCH FLAGS command.
> That would be a naive implementation.

I didn't say _would_, I said _could_. Read on...

> > Also, much of sieve would be otherwise useless (fileinto, keep, etc).
> The rationale is this: if a Sieve-based delivery agent exists,
> you'll be using some kind of frontend tool to write configuration
> filters.  It is a big usability win if the delivery filter language,
> and thus the interface, has the same logic as the virtual folder
> specification language and interface.

One might add an "appearin" extension to sieve that would work like
"fileinto" but only be a reference to wherever the message actually

If this were the case, the task could actually be made simpler:
"appearin" would add the message to the mailbox, but mark it with some
special flags that Dovecot would know that actions on this message must
be postprocessed by the sieve program (after mirroring to the original
copy of the message-- wherever it was fileinto'd).

Whenever changes where made, the copies of the messages would be deleted
in such a way that they were REALLY DELETED (without having to EXPUNGE)
and they could be redelivered.

The obvious benefit to this manner is that sieve actually makes this
behavior pleasant, and it requires only MINIMAL changes to dovecot.

_AND_ you get to pretend you can reuse all your helpful sieve scripts
and script generators :)

[[ and in reality, you probably can, with minor adjustments to take
advantage of appearin ]]

With this, the Outbox and Shared virtual folders could be implemented.
One could also implement the PHB-filter I described.

However. This doesn't make it possible to implement the virtual Trashbox
(unless sieve could ask questions about mailboxes instead of "the
current message"), the virtual Junk folder (same reason). Sieve doesn't
MESSAGES" -- instead you have to say "if this message is deleted", or
"if this message is junk" -- something that unless the sieve
implementation was optimized for, would require an extraneous amount of

Much more so than playing IMAP questions, anyway.

> > It'd also require sieve be available to dovecot, which it isn't (yet). 
> Indeed.  If there was a dovecot-API-based delivery agent, I hope it
> would speak Sieve.  Such a thing lurks at the back of my mind in
> the stack marked "interesting projects".

Sieve is not a complicated language, but adding the "appearin" extension
wouldn't require a system so intricately tied to dovecot. One could use
arbitrary scripts, with "appearin" implemented as a simple program. It
might suit some peoples desires, but I don't think it would help mine
out any...

More information about the dovecot mailing list