[Dovecot] Pigeonhole Sieve IMAP flag question
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.
Using Dovecot 1.2.9 and Pigeonhole Sieve 0.1.14.
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 <
Tobi
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 <
> 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.
Julian Cowley wrote:
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.
Using Dovecot 1.2.9 and Pigeonhole Sieve 0.1.14.
You have found a bug. Fixed (including cosmetic changes):
http://hg.rename-it.nl/dovecot-1.2-sieve/rev/9e18561e357f
I've added various tests to the test suite to prevent this from reoccurring in the future. Apparently, the situation where only one flag was set and subsequently removed was not tested.
Regards,
-- Stephan Bosch stephan@rename-it.nl
On Wed, 30 Dec 2009, Stephan Bosch wrote:
Julian Cowley wrote:
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.
Using Dovecot 1.2.9 and Pigeonhole Sieve 0.1.14.
You have found a bug. Fixed (including cosmetic changes):
http://hg.rename-it.nl/dovecot-1.2-sieve/rev/9e18561e357f
I've added various tests to the test suite to prevent this from reoccurring in the future. Apparently, the situation where only one flag was set and subsequently removed was not tested.
Built 0.1.14 with the 9e18561e357f changeset. Tested and it works. Thanks for the quick fix!
participants (3)
-
Julian Cowley
-
Stephan Bosch
-
Tobias Lang