[Dovecot] Cannot STORE \Seen flag on some mails
Hi,
I'm running Dovecot 1.2.17 on FreeBSD (exact output of 'dovecot -n' is atttached to this mail). The machine is serving a public mailinglist archive which is read-only; all mail arriving for the archive is marked as \Seen using Sieve script.
This setup works well most of the time, but I noticed that for *some* mails, the \Seen flag doesn't seem to be stored. Right now I have 31255 mails in one of my folders and I can't seem to mark five of them as \Seen - the others work just fine.
I first suspected a client issue so I did a little IMAP session by hand:
- OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready. . LOGIN "xxxxxx" "yyyyyy" . OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT IDLE CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS ACL RIGHTS=texk] Logged in . SELECT "Lists/Archive/squish"
- FLAGS (\Answered \Flagged \Deleted \Seen \Draft $NotJunk)
- OK [PERMANENTFLAGS ()] Read-only mailbox.
- 31250 EXISTS
- 0 RECENT
- OK [UNSEEN 27126] First unseen.
- OK [UIDVALIDITY 1350573750] UIDs valid
- OK [UIDNEXT 31265] Predicted next UID
- OK [HIGHESTMODSEQ 9512] Highest . OK [READ-ONLY] Select completed. . SEARCH UNSEEN
- SEARCH 27126 27127 28484 29835 29838 . OK Search completed (0.000 secs). . STORE 27126 FLAGS \SEEN . OK Store completed. . SEARCH UNSEEN
- SEARCH 27126 27127 28484 29835 29838 . OK Search completed (0.000 secs). . LOGOUT
- BYE Logging out . OK Logout completed.
Note how the first 'SEARCH UNSEEN' command shows that '27126' is unseen, the subsequent 'STORE' command succeeds - but then 'SEARCH UNSEEN' still shows 27126 as unseen!
I have all four logging levels being piped to /var/log/maillog (I verified this by running dovecot --log-error) but the file does not show any problems. I checked the file permissions of the Maildir directories, and it all looks dandy to me.
Does anybody have some suggestions how to debug this further, or what the reason for this may be?
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
Am 11/27/2012 1:53 PM, schrieb Frerich Raabe:
I first suspected a client issue so I did a little IMAP session by hand:
[..]
Note how the first 'SEARCH UNSEEN' command shows that '27126' is unseen, the subsequent 'STORE' command succeeds - but then 'SEARCH UNSEEN' still shows 27126 as unseen!
Sorry, I only now realized that my IMAP session wasn't very useful since the dovecot-acl file didn't allow my user to modify the \Seen flag (it only allowed it for the user which runs the Sieve script filing the mail into the archive [and marking it as seen]) in the first place.
If I relax the ACL, I can mark the mail as seen myself. I guess that means the question is - why didn't the sieve_before manage to set the flag in all cases.
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
On 27.11.2012, at 15.06, Frerich Raabe wrote:
Am 11/27/2012 1:53 PM, schrieb Frerich Raabe:
I first suspected a client issue so I did a little IMAP session by hand:
[..]
Note how the first 'SEARCH UNSEEN' command shows that '27126' is unseen, the subsequent 'STORE' command succeeds - but then 'SEARCH UNSEEN' still shows 27126 as unseen!
Sorry, I only now realized that my IMAP session wasn't very useful since the dovecot-acl file didn't allow my user to modify the \Seen flag (it only allowed it for the user which runs the Sieve script filing the mail into the archive [and marking it as seen]) in the first place.
If I relax the ACL, I can mark the mail as seen myself. I guess that means the question is - why didn't the sieve_before manage to set the flag in all cases.
Difficult to say, but I don't think it's worth debugging with v1.2. Might be fixed already in v2.1..
Am 11/28/2012 2:26 AM, schrieb Timo Sirainen:
On 27.11.2012, at 15.06, Frerich Raabe wrote:
If I relax the ACL, I can mark the mail as seen myself. I guess that means the question is - why didn't the sieve_before manage to set the flag in all cases.
Difficult to say, but I don't think it's worth debugging with v1.2. Might be fixed already in v2.1..
Hm, maybe indeed a reason to stop tip-toeing around upgrading to v2.1... the christmas season is coming, maybe this upgrade would be a good proejct for the vacation. ;-)
Thanks for your comment!
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
Am 11/28/2012 9:52 AM, schrieb Frerich Raabe:
Am 11/28/2012 2:26 AM, schrieb Timo Sirainen:
On 27.11.2012, at 15.06, Frerich Raabe wrote:
If I relax the ACL, I can mark the mail as seen myself. I guess that means the question is - why didn't the sieve_before manage to set the flag in all cases.
Difficult to say, but I don't think it's worth debugging with v1.2. Might be fixed already in v2.1..
Hm, maybe indeed a reason to stop tip-toeing around upgrading to v2.1... the christmas season is coming, maybe this upgrade would be a good proejct for the vacation. ;-)
For the record, upgrading to Dovecot 2.1.10 and the Pigeonhole plugin helped as far as I can see. Upgrading wasn't too painful (the doveconf-based conversion helped even though the generated configuration file was incomplete) either. Ever since I upgraded I now longer saw the described behaviour. Just in case anybody ever has the same issue and finds this thread in some email archive. :-)
-- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing
participants (2)
-
Frerich Raabe
-
Timo Sirainen