[Dovecot] IMAP folders sort order

Valery V. Sedletski valerius at afterlogic.com
Fri Mar 1 15:01:48 EET 2013


>>
>> But I tried to create a fresh account in Dovecot (not migrated from  
>> Courier), and it
>> still shows a intermixed folder order:
>>
>> a list "" *
>> * LIST (\HasNoChildren) "/" "Spam"
>> * LIST (\HasNoChildren) "/" "Sent"
>> * LIST (\HasNoChildren) "/" "Drafts"
>> * LIST (\HasNoChildren) "/" "Trash"
>> * LIST (\HasNoChildren) "/" "INBOX"
>> * LIST (\HasNoChildren) "/" "Pub"
>> a OK List completed.
>
>Why does this matter?  IMAP does NOT enforce any sort of required  
>sorting order, and no IMAP client can assume a sort order.  So  
>enforcing a sort order on the server is just a waste of resources.
>

Just a cosmetic problem, of course. Some IMAP clients do sort folders,
others do not, so they show different folder sort order in Dovecot, if 
migrated from Courier (Courier seems to sort folders, so that the system 
ones appear first). We just needed a seamless migration.

>FWIW, this is completely legal IMAP output also (albeit inefficient):
>
>a list "" *
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "Sent"
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "Drafts"
>* LIST (\HasNoChildren) "/" "Trash"
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "Spam"
>* LIST (\HasNoChildren) "/" "INBOX"
>* LIST (\HasNoChildren) "/" "Pub"
>a OK List completed.
>

So, it is legal to even list each folder several times?

>michael

WBR,
valerius




More information about the dovecot mailing list