docker-offlineimap/offlineimap
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
..
folder Don't cache empty IMAP folders 2011-09-07 19:13:13 +02:00
repository Improve repo.Base.py:syncfoldersto parameter/var names 2011-09-03 17:16:42 +02:00
ui Shorten list of messages to be deleted in UI output 2011-08-23 20:55:28 +02:00
__init__.py v6.3.4 2011-08-10 21:44:58 +02:00
accounts.py Make syncfoldersto to accept a single folder only 2011-08-17 21:02:21 +02:00
CustomConfig.py Use SafeConfigParser for the configuration 2011-08-30 22:16:35 +02:00
error.py Introduce new error level FOLDER_RETRY 2011-09-06 19:00:21 +02:00
imaplib2.py imaplib2: bump to upstream version 2.28 (rev 8228a0f) 2011-08-15 12:21:38 +02:00
imaplibutil.py imaplibutil: Have SELECT throw an OfflineImapError when the connection died 2011-09-06 19:00:21 +02:00
imapserver.py Allow Imapserver.releaseconnection() to drop a connection 2011-09-06 20:03:33 +02:00
imaputil.py Merge branch 'ss/better-error-throwing-and-id-sequence' into next 2011-09-06 20:15:05 +02:00
init.py Always call ui.terminate() 2011-06-16 18:57:35 +02:00
localeval.py Update FSF address 2006-08-12 05:15:55 +01:00
mbnames.py explicitly define symbols to import instead of 'import *' 2011-05-09 22:43:03 +02:00
syncmaster.py Remove weird SigListener class 2011-05-08 14:25:16 +02:00
threadutil.py fix broken ui Blinkenlights in multi-threaded mode 2011-05-18 18:38:05 +02:00