Sieve removeflag Action

Thomas Leuxner
Thu, 19 Jan 2017 09:43:15 -0000

* Stephan Bosch <stephan at rename-it.nl> 2017.01.19 10:32:

> Could you provide a more detailed example?

Sure. Personal script v

/var/vmail/domains/leuxner.net/tlx/.dovecot.sieve:

require
["include","copy","fileinto","imap4flags","vacation"];
include :global "global";

--

Global script referenced v

/var/vmail/conf.d/leuxner.net/sieve/global.sieve:

require ["fileinto","imap4flags","duplicate"];

#Newsletters

if header :contains "List-Id"
"debian-security-announce.lists.debian.org"
        {
        removeflag "\\Flagged $MailFlagBit1";
        fileinto ":public/Newsletters/Debian/Security";
        addflag "\\Flagged $MailFlagBit1";
        keep;
        }

--
Basically it is reproducible with the same stanza we used before by putting this
in the included script:

#Test
if address :is "From" "user at example.com"
       {
       removeflag "\\Flagged $MailFlagBit1";
       fileinto "Trash";
       addflag "\\Flagged $MailFlagBit1";
       keep;
       }

Regards
Thomas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL:
<http://dovecot.org/pipermail/dovecot/attachments/20170119/fef3d583/attachment.sig>