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

Nicolas Sebrecht nicolas.s-dev at
Sat Mar 28 01:28:26 GMT 2015

On Fri, Mar 27, 2015 at 05:08:50PM -0400, Janna Martl wrote:
> On Fri, Mar 27, 2015 at 06:13:50PM +0100, Nicolas Sebrecht wrote:

> >Under the hood, relying on the maxage implementation for computation
> >would be right. Notice we would need to store the initial min(UID) in
> >the cache.
> I'm confused; if one folder is empty, then all we'd do is ask for
> SINCE(maxage) from the nonempty one, copy those messages to the empty
> one,

See below.

>      and then refuse to sync those two accounts anymore.

Wait, wait... WHAT?!!? OfflineIMAP, the IMAP syncer should refuse a
sync?  No, no. I think this won't happen. Also, allowing other syncs is
not hard to achieve. ,-p

>                                                          How would this
> require storing more information?

I don't think users would install and configure OfflineIMAP for just one
sync. At least, this wouldn't help to the purpose of providing an
alternative of maxage.

To reply to the first sentence, what you describe is enough for a first
sync, of course. Allowing other syncs is easy enough and worth it, IMHO.

1. Apply SINCE(datetime) to one side.
2. Extract min(UID) from the list.
3. Store this min(UID) in the cache of "side one".
4. Sync.

All above happen on first sync.

5. For each next syncs:
      retrieve this min(UID) from the cache,
      apply SEARCH(min_uid:*) on "side one",
      apply SEARCH(1:*) on "side two",

(3) is just about writing a file, easy.
(5) ditto, read the cache file. The sync logic should not be hard to do
    if we re-use the maxage code.

Nicolas Sebrecht

More information about the OfflineIMAP-project mailing list