docker-offlineimap/offlineimap/folder
Łukasz Żarnowiecki 6b8ee4a183 Handle maxage for davmail correctly
"imapobj.search" returns a list with one string element of numbers
separated by one whitespace character for regular box (GMail, AOL...).
['1 2 3 4 5 6 7 8 9 10 11 12']
But if we would like to sync from Davmail it would return a list of
numbers.
['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12'].

The code "return res_data[0].split()" in the first case will return what
we already have when using Davmail, hence only one email will be
fetched.  But if only the first sync would be with maxage the emails
will be removed, because offlineimap will think that they were removed
by us.

The patch distinguishes between syncing with Davmail and regular box and
applies split on the first element only when it finds whitespace
character.  It also handles the case when the first element is empty on
first sync.

Closes #327

Signed-off-by: Łukasz Żarnowiecki <dolohow@outlook.com>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2016-05-07 13:29:44 +02:00
..
__init__.py Use "from . import" for relative imports 2012-02-06 17:41:43 +01:00
Base.py Inform when maxage/startdate is in the future 2016-05-05 23:50:24 +02:00
Gmail.py folder: properly factorize initialization and dropping of self.message 2016-04-09 18:12:18 +02:00
GmailMaildir.py maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option 2015-04-07 11:54:35 +02:00
IMAP.py Handle maxage for davmail correctly 2016-05-07 13:29:44 +02:00
LocalStatus.py SQLite: close db when done 2016-04-09 19:55:26 +02:00
LocalStatusSQLite.py SQLite: close db when done 2016-04-09 19:55:26 +02:00
Maildir.py folder: properly factorize initialization and dropping of self.message 2016-04-09 18:12:18 +02:00
UIDMaps.py maxage: fix timezone issues, remove IMAP-IMAP support, add startdate option 2015-04-07 11:54:35 +02:00