set seen flag and junk moving a mail manually to JUNK

Jakobus Schürz wertstoffe at nurfuerspam.de
Tue Dec 4 13:28:43 EET 2018


Hi there!

I want to set the \seen and the Junk Flag to an email, which i move
manually to my Junk-Folder.

I tried a lot... but nothing worked like expected.

I have a sieve-filter, which takes an email and copy it to a pipe to
rspamc. This filter is working correctly, i get a debug-message from the
script, which is called through the sieve-filter.
But adding another rule (addflag "Junk"; setflag "\\seen";) to this rule
is getting ignored...

Here is my sieve-rule:

require ["imap4flags", "vnd.dovecot.pipe", "copy", "imapsieve", "environment", "variables"];

if environment :matches "imap.email" "*" {
  set "email" "${1}";   
}
addflag "Junk";
setflag "\\seen";
pipe :copy "learn-spam.sh" [ "${email}" ];

How said before, the script learn-spam.sh is called, when i move a
Message via drag&drop in thunderbird from the INBOX to the Junk-Folder.
But the message in the Junk-Folder is unseen, recent and has no Junk-Flag...

What's wrong?

BR

Jakob

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dovecot.org/pipermail/dovecot/attachments/20181204/198ed99f/attachment.html>


More information about the dovecot mailing list