docker-offlineimap/offlineimap/folder
Sebastian Spaeth 26721c60d4 Don't cache empty IMAP folders
If a folder is empty, most servers will return EXISTS 0 and imaplib2
passes back ['0'] as return value to a select(). It returns [None] if
no EXISTS response was given by the server at all.

Attempting to fetch the UIDs of 0 emails which leads to
various error messages (One server responds with "NO No matching
messages", Gmail seems to say "BAD Bad message sequence 1:*" for some
(although it is working fine for me with Gmail, so it might behave
different for different people).

In case we get an None or 0 back, we simply stop caching messages as the
folder is empty. This should fix the various error reports that have
popped up.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2011-09-07 19:13:13 +02:00
..
__init__.py Add Gmail IMAP special support. 2008-01-03 04:56:55 +01:00
Base.py Fix string formatting 2011-08-23 20:58:55 +02:00
Gmail.py Rework undocumented listjoin to create UID sequences 2011-09-06 20:03:33 +02:00
IMAP.py Don't cache empty IMAP folders 2011-09-07 19:13:13 +02:00
LocalStatus.py Make flags a set rather than a list 2011-08-19 18:56:10 +02:00
LocalStatusSQLite.py Fix sqlite upgrade code to use correct API call 2011-09-02 21:59:35 +02:00
Maildir.py Maildir relative paths change was not complete 2011-08-23 20:56:24 +02:00
UIDMaps.py Replaced tabs with spaces to unify python sources 2011-08-16 22:33:19 +02:00