workaround for imaputil.imapsplit failure on gmail folders with quotes in the name

Sebastian Spaeth Sebastian at
Fri Jan 20 10:47:37 GMT 2012

On Thu, 22 Dec 2011 03:28:29 +0000, Mark Eichin <eichin at> wrote:
> offlineimap/repository/ IMAPRepository.getfolders does a flags,
> delim, name = imaputil.imapsplit(string) on the individual results of
> a listfunction call.  Turns out I have a couple of folders with quotes
> (0x22) in the folder name (but not around the entire thing); imapsplit
> mishandles this - the quotes are backslashed by the time it sees them,
> but it doesn't deal with that, and so it returns an extra field which
> should be part of the name.
> An example folder name of this form is: "Make" Magazine (ORA)
> I have a few others as well.

Hi Mark, I have examined the issue, and reworked the regex that is
responsible for catching these things.

The fixed version has been pushed to the master branch in my git
repo. Alternatively grab

It would be great if you could verify that things work now.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <>

More information about the OfflineIMAP-project mailing list