InterIMAP is a fast bidirectional synchronization program for QRESYNC-capable
IMAP4rev1 servers. PullIMAP retrieves messages a remote IMAP mailbox and
-deliver them to a SMTP session. Consult the manuals for more information.
+deliver them to an SMTP session. Consult the manuals for more information.
https://guilhem.org/man/interimap.1.html
https://guilhem.org/man/pullimap.1.html
# also, lUID < local.UIDNEXT and rUID < remote.UIDNEXT (except for interrupted syncs)
# mapping.idx must be found among local.idx (and remote.idx)
],
+
+ # We have no version number in the schema, but if we ever need a
+ # migration, we'll add a new table, and assume version 1.0 if
+ # the table is missing.
);
# Invariants:
* Using `interimap` on two identical servers with a non-existent or
empty *database* will duplicate each message due to the absence of
- local ↔ remote UID association.
+ local ↔ remote UID association. Hence one needs to manually empty
+ the mail store on one end when migrating to `interimap` from another
+ synchronisation solution.
* `interimap` is single threaded and doesn't use IMAP command
pipelining. Synchronization could be boosted up by sending
fcntl($STATE, F_SETLK, $struct_flock) or die "Can't lock $statefile: $!";
my $flags = fcntl($STATE, F_GETFD, 0) or die "fcntl F_GETFD: $!";
fcntl($STATE, F_SETFD, $flags | FD_CLOEXEC) or die "fcntl F_SETFD: $!";
+
+ # We have no version number in the statefile, but if we ever need a
+ # migration, we'll add a 1-byte header for the version number, and
+ # assume version 1.0 if the size of the file is a multiple of 4
+ # bytes. (We can also use the fact that bytes 5 to 8 are never all 0.)
};