[oops, apparently I didn't reply this to the list]

Tim Traver wrote:
 Hi all,

ok, I just instealled the dovecot 2.0.0 release, and the latest
mercurial pigeonhole source.

All is well, except for a particular sieve rule that may not be working
right.

It is a simple rule that looks like this :

require ["fileinto","imap4flags"];

# rule:[Past Due Notices]
if allof (header :contains "Subject" "Account Past Due Notice")
{
        fileinto "Billing";
        setflag "\\Seen";
        stop;
}

Anyways, what happens is the message that matches that rule does indeed
get moved to the "Billing" folder, but it does not get marked as read.

BUT! if I change the order of the actions to mark it as read first, then
move it to the "Billing" folder, it does both of those actions...

Is that the way it is supposed to work? or is that a bug?
Yes, this is the way it is supposed to work. The
setflag/addflag/removeflag operate on an internal variable with flags.
The fileinto and keep commands use the current value of this variable to
assign flags. Modifications to the internal flag variable therefore only
have an effect on subsequent keep and fileinto actions and not ones
already executed. Read RFC5232 (http://tools.ietf.org/html/rfc5232) for
more info.

Regards,

Stephan

Reply via email to