andyedinborough/aenetmail — Issue #4: Regexp in LIST command does not work properly
Author: jigga-j
Created: 2011-11-24 11:18:03+00:00
State: open

Hi,

first I would like to say a big thank you for this implementation of IMAP client.
I've encountered a problem using "ImapClient.ListMailboxes(reference, pattern)"

I had no returning mailboxes from iCloud but Gmail does the job.
The difference of LIST response of them was the missing double-quotation marks
at iCloud.

Gmail-Response:
* LIST (\HasNoChildren) "/" "Drafts"

iCloud-Respone:
* LIST (\NoInferiors) "/" INBOX

The problem was at the regular expression in the ListMailboxes() method. If I changed it from:
\* LIST \(([^\)]*)\) \"([^\"]+)\" \"([^\"]+)\"

to:
\* LIST \(([^\)]*)\) \"([^\"]+)\" \"?([^\"]+)\"?

I also get the list of mailbox from iCloud.

best regards