c864fdd520b0c3f10a4b9bc5373368f4ae8faaff |
|
28-Dec-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Add per-mailbox sync lock that is always used.
Both importing and exporting gets the lock before they even sync the
mailbox. The lock is kept until the import/export finishes. This guarantees
that no matter how dsync is run, two dsyncs can't be working on the same
mailbox at the same time.
This lock is in addition to the optional per-user lock enabled by the -l
parameter. If the -l parameter is used, the same lock timeout is used for
the per-mailbox lock. Otherwise 30s timeout is used.
This should help to avoid email duplication when replication is enabled for
public namespaces, and maybe in some other rare situations as well. |
69a71891361b2b27ff68ed84b29278486628464a |
|
27-Sep-2017 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dsync: Add hashed_headers setting
This makes it possible to configure them |
f3c24c2c92802cb773315eba1132254932d8709b |
|
23-Jun-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Use header hashing version 3 |
a76faea3eb26c4cd67886fbe02c604f74d54be8c |
|
17-May-2017 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: Try to commit transactions every dsync_commit_msgs_interval messages
This was first attempted to be implemented by
ec0cc8fa647794e44a1afaa448f495a713048dc4, but it was later partially
reverted by 5973d496b16721af6d2c1fa90b016aacddf13554. This current
commit should fix its problems. |
4f7951e71128c120d8a502d6406cc603fcc8eb0b |
|
01-Dec-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: When logging "Mailbox changed caused a desync", log also the reason.
The reason is usually somewhere in the debug logs, but it's difficult to
find from there. |
ee8294dbc7bb549557f6ba1264d66b55fbef69b6 |
|
10-Oct-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
doveadm-sync: Add end-date support |
ae949831f1f668b5501b4b125e7f7b1767fb109b |
|
11-Aug-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
doveadm sync/backup: Added -S <max size> parameter to skip too large mails. |
afd6d387ea65843b59fb6051fb567719d2a5279c |
|
08-Aug-2016 |
Aki Tuomi <aki.tuomi@dovecot.fi> |
dsync: Add support for features
Add empty_header_workaround as first feature |
0dffa25d211be541ee3c953b23566a1a990789df |
|
06-Jun-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
global: unsigned int:1 -> bool:1
perl -i -pe 's/unsigned int ([^,:;]+):1;/bool $1:1;/' **/*.[ch] |
45af47783693b3ba2768c5ad34eeff68132382d0 |
|
26-Jan-2016 |
Timo Sirainen <timo.sirainen@dovecot.fi> |
dsync: When comparing headers' hashes to match messages, try to normalize the input.
This is especially useful because some IMAP servers return different data
depending on whether we're fetching only specific header fields, all headers
or entire body. For now we're assuming that any non-ASCII is going to be
replaced with '?', which helps at least with Zimbra and Yahoo. The header
hashing algorithm is now versionable, so it can be modified more easily in
future.
This change should make imapc_features=zimbra-workarounds setting obsolete. |
14b1d2a2634e75b988078baee1e8ad678de28a04 |
|
20-Oct-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added DSYNC_BRAIN_FLAG_NO_NOTIFY to enable MAILBOX_TRANSACTION_FLAG_NO_NOTIFY
It's arguable that this should be enabled by default, but people might like
to keep mail_log notifications for dsync. |
1a1d00fd04bfcf8436b00b58d527e46b23523c9d |
|
27-Aug-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -D parameter to disable mailbox renaming.
The renaming logic is annoyingly complex and there are some bugs left in it.
With this parameter renames are never even attempted, but instead a rename
would be done (slowly) with mailbox delete + create + fill.
Although with imapc protocol mailbox renames are rarely detected anyway. |
ce0e25f26d6e67480ee39b5ca0ad634fa60c4605 |
|
18-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Use storage's mail_error to choose the doveadm exit code.
Instead of always assuming that all errors are EX_TEMPFAIL. |
24bd831901b8fd59718e353b36eaef6a950f09a2 |
|
13-Mar-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added an extra "finish" state to allow slave-dsync to report error to master-dsync.
I'm not sure if that's actually necessary, but just trying to follow the
different possibilities on how dsync run can finish made me unsure about it.
This should make it at least clear that if a slave-dsync has a failure flag
set at deinit master-dsync will know about it before it returns success. |
2e652d2651b2800f99a17dcb3014a009fe4660d3 |
|
20-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -F parameter to sync only mails with[out] specific flag. |
70df8f39fb3db7c49b18c855178f8172176a037a |
|
20-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: If same GUID already exists in storage, try to copy it instead of recreating the mail.
This way most mailbox backends can reduce disk space by only doing a
reference count update.
This feature isn't enabled by default. A virtual "All Mails" mailbox needs
to be configured using the virtual plugin. Then you need to give this
mailbox as -a parameter, e.g.:
doveadm sync -a "Virtual/All Mails" ...
Currently this is implemented by reading through all the GUIDs in the
virtual mailbox. This of course isn't very efficient for things like
incremental replication. An upcoming conversation plugin will keep track of
all the mails' GUIDs, so in future replication should be able to have this
functionality efficiently as well. |
3561c7bb472a78af74d755219cc0fc71c85ff5c2 |
|
19-Jan-2015 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -t <timestamp> parameter to save only mails newer than <timestamp>
If one side has old mails that don't exist on the other side, they are
ignored (not synced and not deleted). |
d519a0449d0e536a32db93305516fdbd7db6773d |
|
29-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Added DSYNC_BRAIN_FLAG_NO_MAIL_PREFETCH to avoid opening mails unnecessarily. |
0219a05495ca78d0ccc2a4d5dcfcf17aa859481f |
|
15-Sep-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Moved all doveadm-specific code to doveadm-dsync.c |
9f240e2ce97176146b63506a8ee04034f712cf45 |
|
11-May-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: mailbox_metadata.cache_fields must be copied to permanent memory.
Any other call to mailbox_get_metadata() would have cleared the memory. |
40440c0fee87be994ba7eb60fc3512a9355708aa |
|
28-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: If incremental dsync finds that its state is stale, retry (later) with full sync.
This works only when the master itself notices such changes locally. Remote
changes aren't noticed, because the master doesn't send the state to remote
dsync and the master is also the one that decides which mailboxes are
synced. The fix to this probably means sending the state string to remote
dsync and have it check if the state is still valid (= protocol change). |
089acbfed9532c40fdc7fe31ed5e32cc1824e846 |
|
28-Apr-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Finished previous change to actually compile |
d487aa885845c33fb358d5b3b514eece6791db0e |
|
25-Mar-2014 |
Timo Sirainen <tss@iki.fi> |
dsync: Support multiple -n parameters. |
d0ff92b81b05166d800e04bbd2054a664305a330 |
|
22-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -P parameter to do a purge for the remote storage after syncing. |
ec047a9c54a02338e85fb1767120b0923f6d4148 |
|
17-Sep-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Improved debug/error logging for changes during sync. |
36723cf206a7b64b9d972ab0719bbfaacc9316fa |
|
26-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -1 parameter to do a "one way sync" without reverting changes.
This can be useful during migration when you don't want to delete any mails,
but you also don't want to send changes to the old server either. |
47255691575e06a1c95ce78ff0a1b502199de3ab |
|
24-Jun-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: If verbose_proctitle=yes, show the current state in it. |
fd32c46c360e61de2c957c3d2241eaacab7b3eec |
|
26-May-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -x parameter to exclude mailboxes from sync.
Multiple -x parameters can be added. Giving \flag as parameter means that
the mailbox with the given SPECIAL-USE \flag is skipped. For example:
doveadm sync -x '\All' -x '\Flagged' -x '\Important' mdbox:~/mdbox |
9f99b5c3e607c41c16a6380203d401250d9e2603 |
|
25-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
doveadm sync/backup: Added -g <guid> to sync only the specified mailbox (by GUID)
Similar to -m <mailbox name>. |
f48fdb57185ca68e8c079e174f3e04da36646880 |
|
21-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: -m '' parameter now syncs mailbox list, but no actual mails. |
55d33f807765482eb47374aaaced1fe714e0b256 |
|
14-Mar-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Added support for syncing mailbox attributes. |
ea245d7a9683e7bb9cd74fcdf1a26d049b2947eb |
|
26-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: If I/O gets stalled, log the state in which it happened. |
4fa4166f9b7770e11bc9969f78d66841f05e5939 |
|
19-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Renamed -a parameter to -N. It also now skips invisible namespaces. |
0e03baa885b89cd42fb76fe0282f272f035638cd |
|
16-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: -l parameter locking is now done on the server with "lower" hostname.
This allows running multi-master replication on two servers without two
dsyncs mixing up changes by running at the same time. |
979d89c147520f2934c14c31aeb9310fd2d62a46 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Automatically figure out which mailboxes can sync with message GUIDs. |
887a9fbbb2ca6afd53365ba2ccae0ef8728d6948 |
|
10-Feb-2013 |
Timo Sirainen <tss@iki.fi> |
dsync: Renamed "guid_requests" to "mail_requests"
The mails aren't necessarily requested by their GUID. |
c7be65f5adbc2990fbe6eeffb6df5054a8a49d9d |
|
15-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Don't start reading a mailbox until we know we actually need to sync it. |
707f172cd4e4c91af86ff5bd82a60a873dec6f70 |
|
15-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Added back support for syncing only one mailbox (-m parameter) |
ec66a68735096e81df73176231b49179222ad9ce |
|
14-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Added -a parameter to sync all namespaces, not just the default one. |
5332128f69ad688cc024897c2a92f6b37ef8d05c |
|
14-Dec-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Added debugging and rawlogging support. |
c307328f59c963eba21091ecd36c9435d42b47d8 |
|
20-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
doveadm sync/backup: Added -s <state> parameter to do a fast stateful sync.
Initially use an empty string for the input state. The output state is
written to stdout. |
e83126866761632b437e532dfdc30be01d14039d |
|
21-Oct-2012 |
Timo Sirainen <tss@iki.fi> |
doveadm: "backup" command is working again. |
a85473f7c11c8734bdee9c2cbe4b767f144a18aa |
|
07-Sep-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: Renamed "slave" to "ibc" (= inter-brain communicator) |
678d0463849ba777106eb7875f27db07a5d8e3df |
|
19-Aug-2012 |
Timo Sirainen <tss@iki.fi> |
Hash table API is now (mostly) type safe. |
7bd5b1c64cc987715bdaf8cc4907c3c37d5d7b29 |
|
22-May-2012 |
Timo Sirainen <tss@iki.fi> |
Initial version of dsync rewrite.
* doveadm backup not implemented at all yet
* syncing mailbox renames is somewhat broken (at least renaming \noselect
mailboxes)
* saving/restoring "state" is implemented by dsync brain, but not by
doveadm. this should be easy to do, just need to figure out how the
replication code wants it. |
f8aa3440094a546a35821f93370541a2f2875d47 |
|
16-Feb-2012 |
Timo Sirainen <tss@iki.fi> |
dsync: If message with same GUID is saved multiple times in session, copy it instead of re-saving.
This only works if the messages are in different mailboxes. It would be
possible to fix it also for copying within same mailbox, but that's probably
rare enough that it's not worth the extra code. |
885a3c2287ae3e5827aa580ea06b231de38abb47 |
|
29-Dec-2011 |
Timo Sirainen <tss@iki.fi> |
Merged dsync into "doveadm dsync".
dsync symlink is installed for backwards compatibility. |