 ===================================================================
 --- sope-mime/NGImap4/ChangeLog	(revision 1660)
 +++ sope-mime/NGImap4/ChangeLog	(working copy)
-@@ -1,3 +1,45 @@
+@@ -1,3 +1,50 @@
++2009-09-22  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
++
++	* NGImap4Client.m (_sopeSORT:qualifier:encoding:): added support
++	for sorting by message size.
++
 +2009-07-01  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 +
 +	* NGImap4Connection.m (-initWithClient:password:): we need to copy

 2009-04-02  Wolfgang Sourdeau  <wsourdeau@inverse.ca>
 
 	* NGLdapConnection.m (useSSL,startTLS): new method enabling
Index: sope-mime/NGImap4/NGImap4Functions.m
===================================================================
--- sope-mime/NGImap4/NGImap4Functions.m	(revision 1660)

+        else if ([_sortSpec rangeOfString: @"FROM"].length) {
+          s =  [[[env from] lastObject] email];
+          [dict setObject: (s != nil ? s : (id)@"")  forKey: uid];
+        }
+        else if ([_sortSpec rangeOfString: @"SIZE"].length) {
+          s = [o objectForKey: @"size"];
+          [dict setObject: (s != nil ? s : [NSNumber numberWithInt: 0])
+                   forKey: uid];
+          b = NO;
+        }
+        else {
+          envDate = [env date];
