Hi all We migrated our IMAP server from Courier to Dovecot. The minor problem appeared: Dovecot LIST command now shows mailbox listing in some weird order. (I suppose, it is filesystem directory order) Previously, with Courier, it was sorted, i.e., the INBOX was the first, followed by other system folders. This is not a problem with our webmail, because it sorts folders by its own. But with some IMAP clients, we have folders intermixed. Is there a way to influence the folder sort order in Dovecot? WBR, valery
Am 28.02.2013 14:54, schrieb Valery V. Sedletski:> Hi all > > We migrated our IMAP server from Courier to Dovecot. The minor problem > appeared: Dovecot LIST command > now shows mailbox listing in some weird order. (I suppose, it is filesystem > directory order) Previously, with Courier, > it was sorted, i.e., the INBOX was the first, followed by other system > folders. This is not a problem with our webmail, > because it sorts folders by its own. But with some IMAP clients, we have > folders intermixed. > > Is there a way to influence the folder sort order in Dovecot? > > WBR, > valery > >comming from courier it may be a namespace problem http://wiki2.dovecot.org/Migration/Courier Dovecot configuration Courier by default uses "INBOX." as the IMAP namespace for private mailboxes. If you want a transparent migration, you'll need to configure Dovecot to use a namespace with "INBOX." prefix as well. mail_location = maildir:~/Maildir namespace { prefix = INBOX. separator = . inbox = yes } Best Regards MfG Robert Schetterer -- [*] sys4 AG http://sys4.de, +49 (89) 30 90 46 64 Franziskanerstra?e 15, 81669 M?nchen Sitz der Gesellschaft: M?nchen, Amtsgericht M?nchen: HRB 199263 Vorstand: Patrick Ben Koetter, Axel von der Ohe, Marc Schiffbauer Aufsichtsratsvorsitzender: Joerg Heidrich
>> >> Is there a way to influence the folder sort order in Dovecot? >> >> WBR, >> valery >> >> > >comming from courier it may be a namespace problem > >http://wiki2.dovecot.org/Migration/Courier > >Dovecot configuration > >Courier by default uses "INBOX." as the IMAP namespace for private >mailboxes. If you want a transparent migration, you'll need to configure >Dovecot to use a namespace with "INBOX." prefix as well. > >mail_location = maildir:~/Maildir > >namespace { > prefix = INBOX. > separator = . > inbox = yes >} >Yes, I knew about that. In Courier, we had 'INBOX.' namespace prefix and '.' as a separator. Now we have empty prefix and a '/' as a separator. So, the settings are as follows: namespace { location = maildir:/usr/mailsuite/data/%d/%n type = private separator = / prefix inbox = yes } But I used the courier-dovecot-migrate.pl script from Timo, as recommended. Where might be the traces of Courier (namespace settings etc.) remained? It seems that Courier and Dovecot use separate sets of files in user mailbox. Maybe, the migrate script expects the settings to be prefix = 'INBOX.' and separator = '.', what we don't want, so, we must modify the migrate script to change namespace settings when migrating? WBR, valery
> >however what you used at migrate, some from your old clients may not >update their folder searchlist to/at new namespace, or have fixed prefix >setup etc, i didnt remember exactly but i think you can have both >namespace setups somehow for stay compatible with "old clients" >try search list and wiki > >Yes, thanks -- I'll look into wiki... 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. So, it is not a migration problem -- note that it is the LIST command output, so it is not got influenced by some IMAP client folder searchlist/mask or its namespace settings (like in Thunderbird) WBR, valery
>> >> 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?>michaelWBR, valerius
On Sex, 2013-03-01 at 13:01 +0000, Valery V. Sedletski wrote:> > So, it is legal to even list each folder several times? >http://www.dovecot.org/imap-client-coding-howto.html "LIST reply is very loosely defined. It may be very much out of order. It may even contain duplicates."