Better error throwing and ID sequences

Sebastian Spaeth Sebastian at
Mon Aug 15 13:05:07 BST 2011

Here is another series that I want to propose for merging. It applies to
next and requires the bumped imaplib2 version.

The patches do:

#1 clean up and document the mysterious imaputil/listjoin() function (it
   is useful in any case)

#2 Improve our log output by saying "delete msg (1:1000)" rather than
   listing 1000 numbers.

#3 Rather than list all UIDs that we SEARCH for (when maxsize or maxage
   is used), shorten them to ranges if possible: 1:15,18,...
   This will prevent us from easily overrunning the IMAP command line
   length as has recently be reported to happen.

#4 Clean up the code around maxsize will I am at it.

#5 Simply use 1:* to get all message IDs rather than constructing the
   unnecessary maxmessageid variable in a complex way.

#6 More error throwing, this patch uses the variable names and therefore
   requires the preceding patches.

I've been running this (bumped imaplib2 and this series) and it seems to
work just fine.

-------------- 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