PARTIALLY REMOVING MAXAGE (was: [PATCH v4] make maxage use UIDs to avoid timezone issues)

Janna Martl janna.martl109 at gmail.com
Tue Mar 31 13:06:33 UTC 2015


On Tue, Mar 31, 2015 at 04:59:14AM -0400, Janna Martl wrote:
>On Tue, Mar 31, 2015 at 04:53:28AM -0400, Janna Martl wrote:
>>remove IMAP-IMAP support for maxage; add startdate, folder_startdate to compensate
>>
>>maxage was fundamentally wrong in the IMAP-IMAP case: it assumed that
>>remote messages have UIDs in the same order as their local counterparts,
>>which could be false, e.g. when messages are copied in quick succession.
>>So, remove support for maxage in the IMAP-IMAP case.
>>
>>Instead, support a special case of date restriction in IMAP-IMAP syncs:
>>suppose there's a pre-existing IMAP folder that you want to sync to a
>>new, empty folder, but you only want to sync the messages after a
>>certain date. This date can be specified by the configuration option
>>folder_startdate. On all subsequent syncs, the messages in the original
>>folder after folder_startdate, and all the messages in the new folder,
>>are considered.
>>
>>Also add the option startdate, which is similar to maxage but involves
>>syncing messages after a fixed date, instead of a fixed number of days
>>ago. This is not supported in the IMAP-IMAP case for the same reasons as
>>maxage.
>
>More notes about this:
>
>* I took out the bit in folder/IMAP.py _msgs_to_fetch(), where we expand
>the list to min(uids within maxage). The reason was that it would only
>be used on an initial sync (where the Maildir was empty), and the extra
>messages would get filled in on the next sync. I don't have a strong
>opinion about this.
>
>* The startdate option doesn't have anything to do with what we were
>talking about; it was something that I'd kind of wanted, and seemed easy
>once I'd done the rest of this.
>
>* I think I should test this more, but am sending it so you can comment.

Also I forgot to mention that it's supposed to go on top of

http://github.com/nicolas33/offlineimap.git ns/timezone-v4



More information about the OfflineIMAP-project mailing list