[Dovecot] Pigeonhole Sieve IMAP flag question
Julian Cowley
julian at lava.net
Wed Dec 30 00:43:34 EET 2009
On Tue, 29 Dec 2009, Tobias Lang wrote:
> Am 29.12.2009 um 12:58 schrieb Julian Cowley:
>> Hello,
>>
>> Here is a small script that I've been running to test a problem I've
>> been seeing. Shouldn't this result in the mail being delivered to the
>> inbox as a new message (ie. without the \Seen flag)?
>>
>> require "imap4flags";
>>
>> addflag "\\Seen";
>> removeflag "\\Seen";
>>
>> Every message gets delivered to the inbox as though it's already been
>> read.
>
> Hello Julian,
>
> by removing the "Seen" flag, you mark the message as read. New mails
> arrives with the "Seen" flag set - thus your command <<addflag
> "\\Seen">> is useless. Check out RFC 3501 for the meaning of the
> different flags.
Are you sure about that? Apart from explicitly changing the flags using
the IMAP STORE command, a message only gets the \Seen flag if it is
FETCH'ed by an IMAP client. However, I'm attempting to change the flags
before it even hits the inbox.
What I'm actually trying to do is save the message to a folder but mark it
as seen, and then deliver it to the inbox as unseen:
require ["fileinto", "imap4flags"];
addflag "\\Seen";
fileinto "archive";
removeflag "\\Seen";
keep;
The archive folder works as expected (the \Seen flag is set), but the
inbox also has the \Seen flag set, which is what I don't want.
More information about the dovecot
mailing list