What server it is? Does it support SORT? If so, it is the server issue. Server should use INTERNALDATE in case of non-existing Date header (RFC5256).
It is hMailserver. SORT is supported. Here is the server response for the message without date header (complete log below):
61 FETCH (UID 30234 RFC822.SIZE 62927 FLAGS (\Seen) INTERNALDATE "16-Dec-2011 13:45:26 +0100" ...
So, the INTERNALDATE is returned to Roundcube.
Any other thoughts? FYI, Thunderbird sorting is ok.
Regards, R.
"IMAPD" 4305400 8233 "2011-12-18 05:57:17.670" "127.0.0.1" "RECEIVED: A0007 SORT (DATE) US-ASCII ALL" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: * SORT 61 26 24 23 45 41 40 38 30 13 12 11 10 9 8 7 6 5 4 3 2 1 14 15 16 17 18 20 19 21 22 25 27 28 29 32 31 33 34 35 36 39 37 42 43 44 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 62 63[nl]A0007 OK Search completed" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "RECEIVED: A0008 FETCH 61,26,24,23,45,41,40,38,30,13,12,11,10,9,8,7,6,5,4,3,2,1,14,15,16,17,18,20,19,21,22,25,27,28,29,32,31,33,34,35 (UID RFC822.SIZE FLAGS INTERNALDATE BODY.PEEK[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO CC USER-AGENT X-RC-ATTACHMENTCC X-RC-ATTACHMENT LIST-HELP LIST-SUBSCRIBE LIST-UNSUBSCRIBE LIST-POST LIST-OWNER LIST-ARCHIVE)])" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: * 61 FETCH (UID 30234 RFC822.SIZE 62927 FLAGS (\Seen) INTERNALDATE "16-Dec-2011 13:45:26 +0100" BODY[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO CC USER-AGENT X-RC-ATTACHMENTCC X-RC-ATTACHMENT LIST-HELP LIST-SUBSCRIBE LIST-UNSUBSCRIBE LIST-POST LIST-OWNER LIST-ARCHIVE)] {212}" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: )" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: * 26 FETCH (UID 29612 RFC822.SIZE 22749 FLAGS (\Seen) INTERNALDATE "24-Nov-2011 10:53:52 +0100" BODY[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO CC USER-AGENT X-RC-ATTACHMENTCC X-RC-ATTACHMENT LIST-HELP LIST-SUBSCRIBE LIST-UNSUBSCRIBE LIST-POST LIST-OWNER LIST-ARCHIVE)] {206}" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: )" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: * 24 FETCH (UID 29526 RFC822.SIZE 29561 FLAGS (\Seen) INTERNALDATE "22-Nov-2011 12:58:27 +0100" BODY[HEADER.FIELDS (DATE FROM TO SUBJECT CONTENT-TYPE CC REPLY-TO LIST-POST DISPOSITION-NOTIFICATION-TO CC USER-AGENT X-RC-ATTACHMENTCC X-RC-ATTACHMENT LIST-HELP LIST-SUBSCRIBE LIST-UNSUBSCRIBE LIST-POST LIST-OWNER LIST-ARCHIVE)] {206}" "IMAPD" 4305400 8233 "2011-12-18 05:57:17.686" "127.0.0.1" "SENT: )"
List info: http://lists.roundcube.net/dev/ BT/aba52c80