[Top] [All Lists]

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

2000-08-24 06:59:33

Tim Showalter wrote:

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.

I agree with this in principal, and would not be opposed to this change.

However, having implemented the current draft in cmu-sieve and being a
user of the functionality, I'll try to make a (possibly weak) case for
why the global variable concept can be advantageous.  Below is a subset
of a script that I currently use:

require ["fileinto", "imapflags", "subaddress"];

# mark (flag) all messages from Tim Showalter
if address :user "from" "tjs" {

# file mailing list stuff
if address :localpart :is ["to", "from", "cc", "resent-to"]
"ietf-mta-filters" {
  fileinto "INBOX.ietf.mta-filters";
elsif address :localpart :is ["to", "from", "cc", "resent-to"]
"ietf-imapext" {
  fileinto "INBOX.ietf.imapext";
elsif address :user :is ["to", "from", "cc", "resent-to"] "info-cyrus" {
  fileinto "INBOX.cyrus";

The upshot of this is that with only one test at the top of my script, I
can flag all of the *extremely* important messages from Tim regardless
of where they get filed/kept.  If we move the imapflags to an optional
argument, I would have to to a test for "tjs" for every fileinto/keep.

This is the only use of the global variable concept that I have come
across, so if the consensus is to make the change to an optional
argument, I would be inconvenienced, but not overly disappointed.

Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--