[Dovecot] FETCH FLAGS in response to SORT and SEARCH commands

Michael Doppler m.doppler at synedra.com
Sun Dec 25 13:56:49 EET 2005


Hi,

thanks for your extensive reply!

> At the end of each IMAP command Dovecot checks if there have been  
> external changes to mailbox (eg. by another IMAP client). If flags  
> have changed, the flag changes are sent to client. This is how IMAP  
> specification defines it should work.

I see. I already skimmed through one of the IMAP RFCs but was not  
sure after reading it whether the FLAGS are also to be expected  
after   SEARCH and SORT commands.

> Strange. UW-IMAP at least does the same thing, and I'd have thought  
> Cyrus also does it, so this shouldn't be a Dovecot-specific  
> problem.. It's definitely a Squirrelmail bug anyway.

I already prepared a patch for squirrelmail that fixes their bug, I  
will send it to the developers a soon as it has been tested  
thoroughly enough.

> Looks like you're using Squirrelmail at the same time you have  
> another IMAP client open since you have those Junk-flags added.  
> Most people probably don't do that which is why Squirrelmail  
> doesn't break with them.

The strange thing is that I definitely didn't use another client at  
the same time. I even replicated our production server in a vmware  
and tried the same sequence with a single telnet session which still  
produced those flags the first time after I have logged in. Another  
strange thing is that the same FLAGS responses get repeated for the  
same messages ( see ids 307, 381, 971 in my original post ), that is  
only a minor issue though.

I moved a lot of mails from another imap account to the one i get the  
flags with, maybe something went wrong with the maildir while moving  
those messages. As soon as I have time I will compile a debug  
version, attach to the imap process and step through the code to see  
what happens.

> Yep. I think Squirrelmail should be fixed. If this problem occurs  
> for other IMAP clients too, I might add yet another workaround  
> option to fix this.

As long as no proprietary clients have troubles with this I wouldn't  
add a workaround. If other open source clients have problems with  
that, they should be fixed as well. I will see if I can find someone  
who can test with outlook and evolution and check how those clients  
react.

regards,
Michael


More information about the dovecot mailing list