I'm running Xubuntu 13.04 and have the newest version of libcurl/curl installed:
$ curl -V
curl 7.29.0 (i686-pc-linux-gnu) libcurl/7.29.0 OpenSSL/1.0.1c zlib/1.2.7 libidn/1.25 librtmp/2.3
Using the following command I tried to list the mails in my Inbox
curl -u 'user:password' -X "EXAMINE INBOX" --url 'imaps://mymailserver.com:993/INBOX'
But instead I get only the body(text) of my first(oldest) email in the inbox. I tried some other commands as mentioned in this question. But every command returns the text body of my first mail. The same happens when I run the query via libcurl.