<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I tried it like you... doesn't work. The message gets all the
other flags, but not the \Seen-Flag.</p>
<p>My repo is</p>
<pre><a class="moz-txt-link-freetext" href="https://repo.dovecot.org/ce-2.3-latest/debian/stretch">https://repo.dovecot.org/ce-2.3-latest/debian/stretch</a> stretch
dpkg -l|grep dove
ii dovecot-core 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - core files
ii dovecot-imapd 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - IMAP daemon
ii dovecot-ldap 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - LDAP support
ii dovecot-lmtpd 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - LMTP server
ii dovecot-lucene 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - Lucene support
ii dovecot-managesieved 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - ManageSieve server
ii dovecot-pop3d 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - POP3 daemon
ii dovecot-sieve 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - Sieve filters support
ii dovecot-solr 2:2.3.4-2~stretch amd64 secure POP3/IMAP server - Solr support</pre>
<p><br>
</p>
<p><br>
</p>
<div class="moz-cite-prefix">Am 04.12.18 um 16:04 schrieb Larry
Rosenman:<br>
</div>
<blockquote type="cite"
cite="mid:CA+S=X76qMZT_hfRJfysZxeKaG9-qKA-1E6VW74cfxnDqBdTNRg@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">2.3.4/0.5.4 (dovecot/pigeonhole)
<div><br>
</div>
<div>Note the casing on the \\Seen flag.</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr">On Tue, Dec 4, 2018 at 9:02 AM Jakobus Schürz
<<a href="mailto:wertstoffe@nurfuerspam.de"
moz-do-not-send="true">wertstoffe@nurfuerspam.de</a>>
wrote:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Which
version of dovecot are you using?<br>
<br>
<br>
jakob<br>
<br>
Am 04.12.18 um 15:44 schrieb Larry Rosenman:<br>
> I have the following, and it works:<br>
> require ["include","fileinto","imap4flags","variables"];<br>
> global "MyFlags";<br>
> if header :contains
["X-LERCTR-Spam-Flag","X-TNTSCAN-Spam-Flag"] "YES"<br>
> {<br>
> redirect "<a href="mailto:spamtrap@spambouncer.org"
target="_blank" moz-do-not-send="true">spamtrap@spambouncer.org</a>";<br>
> addflag "MyFlags" "\\Seen Junk";<br>
> fileinto :flags "${MyFlags}" "SPAM";<br>
> stop;<br>
> }<br>
><br>
> FWIW.<br>
><br>
><br>
> On Tue, Dec 4, 2018 at 8:25 AM Jakobus Schürz <<a
href="mailto:wertstoffe@nurfuerspam.de" target="_blank"
moz-do-not-send="true">wertstoffe@nurfuerspam.de</a>><br>
> wrote:<br>
><br>
>> Now i tried an additional rule in my "normal" working
sieve-filter:<br>
>><br>
>> if address :domain :matches "from" "company.example"<br>
>> { setflag "\\seen"; fileinto :create
"INBOX/foo/test"; stop; }<br>
>><br>
>> and sent an email from my company-account. The folder
INBOX/foo/test gets<br>
>> created, but the message inside is not marked as
seen.<br>
>><br>
>> So i think, this is a bug in dovecot/pigeonhole,
which ignores the<br>
>> \\seen-Flag being set by sieve-script.<br>
>><br>
>> I tried to set the seen-flag to the message with
doveadm. This works<br>
>> correctly.<br>
>><br>
>><br>
>> BG Jakob<br>
>><br>
>><br>
>><br>
>> Am 04.12.18 um 14:23 schrieb Jakobus Schürz:<br>
>><br>
>> Ok. I tried another Thunderbird-specific Flag:<br>
>><br>
>> require ["imap4flags", "vnd.dovecot.pipe", "copy",
"imapsieve", "environment", "variables"];<br>
>> if environment :matches "imap.email" "*" {<br>
>> set "email" "${1}";<br>
>> }<br>
>> addflag "Junk";<br>
>> addflag "\\seen";<br>
>> addflag "$label3";<br>
>> pipe :copy "learn-spam.sh";<br>
>> pipe :copy "learn-spam-sa.sh" [ "${email}" ];<br>
>><br>
>> When i move an unflagged email to Folder Junk, it is
shown in Thunderbird<br>
>> as "personal", Junk but Unseen.<br>
>><br>
>> So, the rule is really working, except for the
\\seen-Flag.<br>
>><br>
>> I have the line<br>
>><br>
>> addflag "\\seen";<br>
>><br>
>> from the dovecot-wiki!<br>
>><br>
>> BG jakob<br>
>><br>
>><br>
>><br>
>> Am 04.12.18 um 14:06 schrieb Jakobus Schürz:<br>
>><br>
>> Hi Ralph!<br>
>><br>
>> This is, what calls the correct sive-filter rules. I
have that already<br>
>> in use.<br>
>> But the file<br>
>> <a class="moz-txt-link-freetext" href="file:/etc/dovecot/sievepipe/report-spam">file:/etc/dovecot/sievepipe/report-spam</a><br>
>><br>
>> contains my sieve-script from my first posting.<br>
>> So, the difference from setflag to addflag is,
setflag sets the flags,<br>
>> and only the given flags (removing all other flags),
and addflag adds a<br>
>> flag to the existing flags...<br>
>><br>
>> I fiddled around a little...<br>
>> The sieve-script sets the Junk-Flag, when it looks
like:<br>
>><br>
>> require ["imap4flags", "vnd.dovecot.pipe", "copy",
"imapsieve",<br>
>> "environment", "variables"];<br>
>><br>
>> if environment :matches "imap.email" "*" {<br>
>> set "email" "${1}";<br>
>> }<br>
>><br>
>> addflag "Junk \\seen";<br>
>> pipe :copy "learn-spam.sh";<br>
>> pipe :copy "learn-spam-sa.sh" [ "${email}" ];<br>
>><br>
>> But the \\seen-Flag is not set.<br>
>><br>
>> When i comment out the addflag-line, the Junk-Flag is
not set. So the<br>
>> line works correct... but only for the Junk-Flag, not
for the seen-Flag..<br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="gmail_signature"
data-smartmail="gmail_signature">
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">
<div>
<div dir="ltr">Larry Rosenman <a
href="http://www.lerctr.org/~ler"
target="_blank" moz-do-not-send="true">http://www.lerctr.org/~ler</a><br>
<span>Phone: <span title="Call with Google Voice"><span
title="Call with Google Voice"><span
title="Call with Google Voice">+1
214-642-9640</span></span></span> (c)
E-Mail: </span><a
href="mailto:larryrtx@gmail.com" target="_blank"
moz-do-not-send="true">larryrtx@gmail.com</a><br>
US Mail: 5708 Sabbia Dr, Round Rock, TX 78665-2106</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
</body>
</html>