stateless synchronization between two imap accounts
Ploc
pub2013 at acampado.net
Thu Nov 28 15:46:14 GMT 2013
stateless synchronization between two imap accounts
I used to be an impasync user. But one day this piece of software had
been removed from debian repos by its author. I'm now trying to find an
alternative to imapsync. I currently paying a strong attention to
offlineimap and mbsync.
I try to reproduce the same behaviour as in imapsync : stateless
synchronisation between two imap accounts.
One of these imap accounts is the master account, the other one is the
slave account. The master account is the one that I use on a daily
basis, as my main mail account. The slave account is juste a backup
account synchronized from time to time from the master account. This
solution make it possible to have a secondary backup mail account in
case of hardware or software failure on the master account. It is even
useful in case of accidental deletion of mails on the master account,
which might be backuped on the slave account (if created before the last
synchronization).
The stateless statement is important for me, as I want to be able to
synchronize my two imap accounts from various computers, even if I
reinstall the system, leading to restart from a fresh install without
cache data.
If I consider a piece of software such as imapsync (for imap
synchronization) or weex (for ftp synchronization), these softwares
might use caching or not, they always have a "rebuild" mode that lead
the software to build or rebuild its cache data. This is permitted by
the fact that one account is the master and the other one is the slave.
As there is no two-way synchronization, it is easy to rebuild the cache
data.
How does offlineimap determine if a mail has been deleted from an
account, or newly received from the other account ?
It appears that offlineimap seems to be a stateful piece of software.
As offlineimap maintains a cache of all mails it knows, offlineimap is
in a way a stateful application, while imapsync is stateless. As
imapsync does only a 1-way synchronization, it is easy for imapsync to
be stateless : imapsync only has to compare mails from the two
repositories and synchronize them considering that the original
repository as the reference repository.
Considering offlineimap, what happens if the cached data of offlineimap
are deleted ? Can the synchronization be recovered ? In this case, how
can offlineimap determine if a mail has been deleted from an account, or
newly received on the other account ? Cached timestamps are helpless
whitout cached data or cached metadata ?
In my case, I use the new parameter "readonly = True" ? Is there a
special way of rebuilding cached data ? As one of the repository is
readonly, every mail deleted from this repository should also be deleted
from the other repository. Does OfflineIMAP work like that ?
More information about the OfflineIMAP-project
mailing list