'List a subset of the available mailboxes
This command is allowed in the Authenticated and Selected states.
@type reference: L{str}
@param reference: The context in which to interpret C{wildcard}
@type wildcard: L{str}
@param wildcard: The pattern of mailbox names to match, optionally
including either or both of the \'*\' and \'%\' wildcards.  \'*\' will
match zero or more characters and cross hierarchical boundaries.
\'%\' will also match zero or more characters, but is limited to a
single hierarchical level.
@rtype: C{Deferred}
@return: A deferred whose callback is invoked with a list of L{tuple}s,
the first element of which is a L{tuple} of mailbox flags, the second
element of which is the hierarchy delimiter for this mailbox, and the
third of which is the mailbox name; if the command is unsuccessful,
the deferred\'s errback is invoked instead.'

def list(self, reference, wildcard):

    cmd = 'LIST'
    args = ('"%s"    "%s"' % (reference, wildcard.encode('imap4-utf-7')))
    resp = ('LIST',)
    d = self.sendCommand(Command(cmd, args, wantResponse=resp))
    d.addCallback(self.__cbList, 'LIST')
    return d
