Just using NIL for ref and * in the pat parameter doesn't seem to be working out.
Leaving aside the small matter that "*" is an extraordinarily bad idea to send to an IMAP server, you have to use an IMAP mailbox wildcard.
mail_list (imapstream,NIL,"{imapserver.example.com}*");
"*" is a local mailbox wildcard.
-- Mark --
http://staff.washington.edu/mrc Science does not emerge from voting, party politics, or public debate. Si vis pacem, para bellum.