When querying the imap mailbox for all messages with UID in [1,inf],
isync currently hardcodes the upper limit to 1000000000, which can
actually be exceeded, which results in missing messages on the slave.
This is not merely theoretical: I missed a message with UID=1343495243
just now; and after raising that limit to 2000000000, I got all my
missing messages sync'ed successfully:
> diff -ur isync-1.2.1-orig/src/drv_imap.c isync-1.2.1/src/drv_imap.c
> --- isync-1.2.1-orig/src/drv_imap.c 2015-09-12 17:15:52.000000000 +0800
> +++ isync-1.2.1/src/drv_imap.c 2016-11-17 22:41:12.305619933 +0800
> @@ -2300,7 +2300,7 @@
> imap_submit_load( ctx, buf, 0, sts );
> }
> if (maxuid == INT_MAX)
> - maxuid = ctx->gen.uidnext ? ctx->gen.uidnext - 1 : 1000000000;
> + maxuid = ctx->gen.uidnext ? ctx->gen.uidnext - 1 : 2000000000;
> if (maxuid >= minuid) {
> if ((ctx->gen.opts & OPEN_FIND) && minuid < newuid) {
> sprintf( buf, "%d:%d", minuid, newuid - 1 );
But this is only a quick and dirty workaround: what if the UID exceeds
2000000000? By packet sniffering, I found Outlook Express using the
IMAP command `UID FETCH 0:*', which seems a reasonable way provided that
UIDs returned by the server does not overflow the integer type isync
uses for these numbers.
Any idea on this issue?
--
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
------------------------------------------------------------------------------
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel