Subject: Sieve extension to expire mails?

From: Michael Haardt <[email-masked]>
Date: Thu, 11 Mar 2004 11:13:06 +0100

Hello,

I use a spam scanner which tags mail, Sieve to filter it in folders and
IMAP to access the folders, but I miss the function "keep mail up to n
days in this folder", as offered by some mail providers, badly.

For that reason, I would like opinions about a Sieve extension, which
allows the mail system to expire mails older than a set amount of time.
I say "allow", as the time of removal should not be specified.  Some
systems may do so in daily cleanup jobs, others when delivering the mail.

It is important that this function is not performed by the client,
because I would like to come back from a longer vacation and have the
last 7 days of a mailing list archived, not my mailbox flooded with it.

I can think of different ways right now:

Add an option to fileinto and keep, like:

  fileinto :expire 7 "inbox.mailinglist";

The advantage is probably easy implementation for cleanup on delivery,
but the disadvantage is having to specify it multiple times, if a script
files mail into that folder at different places, and more complicated
implementation of daily clenaup jobs.  This approach is the opposite:

  expire 7 "inbox.mailinglist";
  [actual filter code inclduing fileinto ... ]

Using expire to specify expiration times once at the beginning of the
script is more modular.  Periodic jobs could extract that information
easily and it separates folder attributes and filter logic.

In case more attributes of folders are required, perhaps a generic
statement would be useful:

  folder :expire 7 "inbox.mailinglist";

Do we need a better granularity than days? Does anybody have a better
idea how to add this feature to Sieve? 

Michael

---

From: "Guðbjörn S. Hreinsson" <[email-masked]>
Date: Thu, 11 Mar 2004 10:35:09 -0000

This is usually a folder property that a mailstore process removes messages
based on. Do you want this to be a message property? I really see no reason
why a sieve extension is needed for this, if you mark a message and the user
prefers to remove such messages after x hours/days then it should be a
function
in the delivery process and mailstore cleanup?

Or is sieve now more than a mta filter language?

Rgds,
-GSH