ietf-mta-filters
[Top] [All Lists]

Re: imapflags is sticky?

2002-07-23 18:10:45

Scott Russell wrote:
On Tue, Jul 23, 2002 at 08:28:59PM -0400, Ken Murchison wrote:

Scott Russell wrote:

Greets.

If this is not the right list please direct me to the right list. I
have a cyrus 2.1.5 box with sieve scripts. I'm wondering a bit about
the functionality of imapflags and fileinto.

Note that Cyrus implements draft -03 of imapflags in which the imapflags list is essentially a global variable. The latest draft makes an attempt to have both per action flags and global flags. The subsequent draft(s) make dispose of the global flags.


Noted. Thanks, this is important.


require ["fileinto", "imapflags"];

if header "subject" :contains "test1" {
 setflag "\\Seen";
 fileinto "test1 folder";
}

if header "subject" :contains "test2" {
 redirect "user(_at_)somewhere(_dot_)com";
 keep;
}

In this case if the header was "Subject: test1 test2" would the
following actions happen:

1) message flagged "Answered"

How would this happen?  You never set this flag.


It wouldn't a typo on my part. :)


4) message filed into INBOX and NOT flagged as seen.

The kept message would also be marked as seen.


Okay, given that, here is a revised script that I think would work the
way I think it would. Am I right?

require ["fileinto", "imapflags"];

if header "subject" :contains "test1" {
   setflag "\\Seen";
   fileinto "test1 folder";
removeflag "\\Seen"; }

if header "subject" :contains "test2" {
   redirect "user(_at_)somewhere(_dot_)com";
   keep;
}

With a header of "Subject: test1 test2" the following events happen
with the above script:

1) message is flagged as seen
2) message is filed into 'test1 folder'
3) flag state 'seen' is unset
4) message is forwarded to 'user(_at_)somewhere(_dot_)com'
5) message is filed into INBOX and seen flag is NOT set

Correct.

--
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp


<Prev in Thread] Current Thread [Next in Thread>