Sieve removeflag Action

Steffen Kaiser skdovecot at smail.inf.fh-brs.de
Fri Jan 13 09:49:13 UTC 2017


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 13 Jan 2017, Thomas Leuxner wrote:
> I recently noticed that some of my automatically processed mails do no longer show flags with current Dovecot builds. This used to work before, not sure what broke it or whether I used it in the wrong way. When the removeflag line is dropped *both* messages get flagged in the client, one in INBOX and one in Trash. With removeflag in place, *both* messages are unflagged, the one in INBOX and the one in Trash. This used to work differently before if memory doesn't fail me.
>
> #Test
> if address :is "From" "user at example.com"
>        {
>        addflag "\\Flagged $MailFlagBit1";
>        keep;
>        removeflag "\\Flagged $MailFlagBit1";
>        fileinto "Trash";
>        }
>

from point of "logic" I would turn around both actions:

removeflag "\\Flagged $MailFlagBit1";
fileinto "Trash";

addflag "\\Flagged $MailFlagBit1";
keep;

Because keep is an action at the end of script processing, so the 
removeflag superceeds the "add". Or use fileinto "INBOX";

- -- 
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQEVAwUBWHiimXz1H7kL/d9rAQJJWggAnF/VfdP4LYIuH4eSG7Pzvu0iwYA4WHQ2
2aJzFzVmtnCNgidJ/SvN6CJ5VLF0K+SjbDT7/VmSV9tOaMjTh1cWqGe5jbJMhgBu
emeHd6sy/XrVYqIhHeLadQGmR4pzT9SQo4Z/6rI5oDzhEhyZC8kXuxOqbtOtUOmr
XyHorah814gxKDHzoTbbTZXeTRa7sCjy0gon60qBWEPEuom2mzyCGIPznLAmme7q
YTfZWEfgfhuN4K6ENn0AJl/BAvpYQW2jUUH+My0ZykwDzqPPkOkOvmPiI/1yG0CB
p34jJrM8f+z3CErWeg+sNXtCvQbjMUVtLRoWjy50ARGs+WekqYzezQ==
=3vQF
-----END PGP SIGNATURE-----


More information about the dovecot mailing list