After login to IMP Webmail you see no message in the folders but only numbers of messages in every folder are shown. In the main Webmail window the message "There are no messages in this mailbox." is shown.
If you look into IMAP session 'strace' output, the error like below is shown:
15917 read(0, "00000007 UID SORT (DATE) US-ASCII ALL\r\n", 8192) = 39
15917 write(1, "00000007 NO This command is disabled by the system administrator.\r\n", 67) = 67
Make sure that 'IMAP_DISABLETHREADSORT' is set to zero in the 'imapd' configuration file (/etc/courier-imap/imapd):
Change it as written above and restart courier-imap.